Routing payments
Define processor routes—ordered lists of payment processors—to control how payments are attempted. When a customer pays, PaymentKit tries each processor in order until one succeeds.
Before you begin
Make sure you have:
- At least two connected payment processors.
- Processor IDs handy (find them in Orchestration > Payment processors or via
GET /api/{account_id}/payments/processors).
If you only have one processor connected, PaymentKit will only use your default processor. At this time, payment routes can only be defined via the API.
How payment routes work
PaymentKit will try each processor in the order of your defined route until one succeeds. If a processor is unavailable or doesn’t support the currency, PaymentKit skips to the next processor automatically.
Routes are resolved in precedence order: a route passed on the checkout session takes priority, then the account’s default route. If no route is configured, PaymentKit uses your default processor.
Create a route
name and a non-empty processors list are required; description is optional.
Response:
Use a route in checkout
Pass a single processor_route_id when creating a checkout session. The route itself contains an ordered list of processors — PaymentKit tries each one sequentially until a payment succeeds. You don’t pass multiple processor IDs directly; instead, define the processor list inside the route and reference the route by its ID.
One route ID, multiple processors. The processor_route_id field accepts a single route ID (e.g., proute_xyz789), not an array of processor IDs. To control which processors are used and in what order, configure them within the route via POST /api/{account_id}/processor-routes. For cascade pricing, each tier (cascade_line_items[]) can specify its own processor_route_id to use a different fallback chain.
Pass the processor_route_id when creating a checkout session:
Set a default route (optional)
Apply a route to all checkout sessions without needing to specify it each time. Set default_processor_route_id to null to clear the default.
Token fallback retries (CIT)
When a customer pays with a network token and the charge is declined, PaymentKit can automatically retry the payment once using the card number instead of the token, on the same processor. This section covers that retry, how to tell it apart from a duplicate charge, and the other reasons a payment might fall back from a network token to a card number without a visible retry.
This section covers checkout (CIT) payments.
The retry: soft_decline_token_error
If a network-token charge is declined for a reason unrelated to the card itself, for example a processor-side issue reading the token, PaymentKit retries immediately with the underlying card number. The card itself is usually fine; only the token attempt failed.
- One retry, with the card number, on the same processor as the original attempt.
- One retry per processor, per payment.
- Declines that indicate a problem with the card itself never trigger this retry: lost or stolen card, pick-up card, expired card, incorrect CVC, and unsupported card. Retrying these with the same card would not change the outcome.
This is the only fallback reason that produces two attempts on a payment, one network_token attempt followed by one pan attempt. Seeing both is expected, not a duplicate charge.
This retry is currently supported on a subset of processors. Coverage may expand over time; reach out to support if you need to confirm whether it’s active for a specific processor on your route.
Example: a fallback pair
The first attempt is the original network-token charge. The second is the fallback retry, identified by fallback_reason: soft_decline_token_error. Only one of the two can succeed and result in a captured payment.
If you use processor cascading, a payment can show this same two-attempt pair on each processor the route tries, not just once overall. A cascaded payment that falls back on every processor it attempts is still one customer charge, not one charge per attempt shown.
Other fallback reasons (single attempt, no retry)
The remaining fallback_reason values are resolved before any charge is attempted. In these cases the network token is never charged at all, so the payment shows a single pan attempt, not a pair:
If you see one of these on a payment’s single pan attempt, PaymentKit charged the card number directly. There is no preceding network-token attempt to reconcile against.
Fields on a processor attempt
Two invariants hold on every attempt:
fallback_reasonis only ever non-null whencredential_sourceispan.cryptogram_generated_atis only ever non-null whencredential_sourceisnetwork_token.
Where to find this
Both attempts are visible on the payment’s detail page in the dashboard, and via the processor attempts API:
GET /api/{account_id}/payments/processor_attempts/{external_id}— a single attemptGET /api/{account_id}/payments/processor_attempts/— list, filterable bycredential_sourceandfallback_reasonGET /api/{account_id}/payments/processor_attempts/by_intent/{payment_intent_external_id}— all attempts for a payment intent
Manage routes
List all routes:
Update a route:
Delete a route:
A route cannot be deleted while it is still referenced by a checkout session, used by a cascade pricing tier, or set as the account default. Deletion attempts on a referenced route return 409 Conflict.
View route audit log
Track changes to a processor route over time. The audit log records who made changes, what changed, and when.
Response:
Audit log fields:
Audit logs are retained even after a route is deleted. Query by route external ID to see historical changes.
MIT cascade settings
Control how recurring/subscription payments (Merchant Initiated Transactions) retry across processors when the last successful processor is unavailable.
By default, MITs use only the subscription’s last successful processor. Enable cascade to try fallback processors in order when the primary fails.
Get MIT settings
Response:
Update MIT settings
Settings fields:
How MIT cascade works:
- PaymentKit attempts payment with the subscription’s last successful processor
- If that fails and
cascading_enabledistrue, it triesfallback_processor_1_id - If that also fails, it tries
fallback_processor_2_id - After any success, that processor becomes the new “last successful” for future MITs
Use MIT cascading for high-value recurring payments where maximizing collection success outweighs the cost of multiple processor attempts.