Skip to main content
POST
Decide routing

Authorizations

Authorization
string
header
required

JWT token obtained from /auth/login

Headers

x-connected-merchant-id
string

The merchant to decide for. Optional with a session or API key, which defaults to its own merchant and may also name one of its sub-merchants. Required with a service credential.

x-request-id
string

Identifies the call. One is generated if absent and returned as a response header.

Body

application/json
payment_id
string
required
Minimum string length: 1
amount
integer
required

Amount in currency minor units.

Required range: 0 <= x <= 18446744073709552000
currency
string
required

Currency code, e.g. USD.

routing_config
object
required
merchant_reference_id
string | null

Your own reference, echoed in the response.

payment_method_type
string | null

Payment method family, e.g. card.

payment_method_sub_type
string | null

Payment method subtype, e.g. credit.

authentication_type
string | null
capture_method
string | null
payment_type
string | null

The payment_type rule key: normal, new_mandate, update_mandate, setup_mandate, recurring_mandate, non_mandate or ppt_mandate. A rule that tests payment_type matches only when it is sent.

setup_future_usage
string | null
transaction_initiator
string | null
surcharge_amount
integer | null

Amount in currency minor units.

Required range: 0 <= x <= 18446744073709552000
business_country
string | null

ISO 3166 alpha-2 country code.

billing_country
string | null

ISO 3166 alpha-2 country code.

business_label
string | null
card
object | null
customer_device_platform
string | null
customer_device_type
string | null
customer_device_display_size
string | null
pay_later
string | null
wallet
string | null
upi
string | null
voucher
string | null
bank_redirect
string | null
bank_debit
string | null
bank_transfer
string | null
real_time_payment
string | null
gift_card
string | null
card_redirect
string | null
open_banking
string | null
mobile_payment
string | null
crypto
string | null
reward
string | null
network_token
string | null
metadata
object | null
customer_id
string | null

Response

Routing decision. connectors is the order to try: the first is the choice, the rest the retry order.

id
string
required

Unique per decision (dec_ + a time-ordered UUID), so a retried payment's decisions stay apart.

payment_id
string
required
merchant_reference_id
string | null
required

The request's merchant_reference_id.

created_at
string<date-time>
required
connectors
object[]
required

The order to try connectors in: the first is the choice, the rest the retry order. Empty when no connector is left.

outcome
object
required

How the order was reached. New values may be added to each enum, so treat an unknown value as its nearest documented meaning.

rule
object | null
required

The rule layer's result. Null when it failed, and a warnings entry then says why.

success_rate
object | null
required

Null when success-rate routing did not run (the sr-routing setting is off, or the A/B arm has no SR layer).

cost
object | null
required

Null when the cost step did not run.

volume_steering
object | null
required

Null when no volume commitment was considered.

debit_routing
object | null
required
warnings
object[]
required

Problems the decision routed around. Routing problems never fail the call.