Skip to main content
POST
Decide routing
See the request examples for one-time card, recurring card and Apple Pay payments.

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
Example:

"pay_demo"

amount
integer
required

Amount in currency minor units.

Required range: 0 <= x <= 18446744073709552000
Example:

1000

currency
string
required

Currency code, e.g. USD.

Example:

"USD"

routing_config
object
required
merchant_reference_id
string | null

Your own reference, echoed in the response.

Example:

"order_demo"

payment_method_type
string | null

Payment method family, e.g. card.

Example:

"card"

payment_method_sub_type
string | null

Payment method subtype, e.g. credit.

Example:

"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.

Example:

"non_mandate"

setup_future_usage
string | null

Intended future use of the payment method: on_session when the customer will be present, or off_session when they may be absent.

Example:

"on_session"

transaction_initiator
string | null

Who initiated the payment: customer or merchant.

Example:

"customer"

surcharge_amount
integer | null

Amount in currency minor units.

Required range: 0 <= x <= 18446744073709552000
Example:

50

business_country
string | null

ISO 3166 alpha-2 country code.

billing_country
string | null

ISO 3166 alpha-2 country code.

Example:

"US"

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

Wallet used for the payment. For Apple Pay, send payment_method_type: wallet, payment_method_sub_type: apple_pay and wallet: apple_pay.

Example:

"apple_pay"

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

Additional string-valued rule parameters. Entries cannot overwrite payment fields or configured rule keys.

Example:
customer_id
string | null

Customer identifier supplied by your integration.

Example:

"cus_demo"

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.