Routing Simulation
Provider selection, fallback, retry, and routing trace tests in sandbox.
Routing simulation is how you answer "which provider, in what order, and why?" before production. In sandbox there is no money movement; the decision mechanism and event/webhook behavior run close to the real flow.
Sandbox vs Production
| Sandbox | Production | |
|---|---|---|
| Outcome | Simulated / test | Real provider response |
| Money | None | Real |
| Purpose | Integration and fallback validation | Real collection |
Sandbox success rate is not a promise of live approval rate.
Routing Inputs
| Input | Effect |
|---|---|
| Payment method / card network | Capability matching |
| Country / issuer | Local or 3DS-required route |
| Amount / currency | Min-max and fee rules |
routing_strategy | Narrow or multi-candidate list |
| Secure mode | Filter for 3DS-capable providers |
| Provider "health" test | Degraded / timeout scenarios |
Rule Logic (Verbal)
Example thought experiments (your account rules may differ):
- TR + local network → preferred local sandbox provider
- Secure mode enabled → 3DS-capable candidate required
- High amount → stricter capability or extra step
Fallback and Retry
- If the first candidate is not suitable or there is a transient error, the next candidate may be tried.
- Hard decline: Do not loop with the same card; request a new method.
- Soft decline: Fallback or controlled retry; verify status with payment GET.
3DS Routes
When secure mode is enabled, candidates that do not support 3DS are filtered out. Getting REQUIRES_ACTION in sandbox shows whether integration can handle challenge and callback.
Observability
After each confirm, ask:
- Which candidate was selected, which was filtered out?
- When did fallback kick in?
- How many charge attempts were created?
- Which webhook/event arrived?
Example Scenario Table
| Scenario | Expectation |
|---|---|
| TR card | Local route |
| Secure mode | 3DS-capable candidate |
| Provider degraded | Second candidate |
| Soft decline | Next candidate or REQUIRES_PAYMENT_METHOD |
| Unsupported currency | Config filtered out |