Gateway Decision

Decide gateway

Core routing decision API. Given a payment context and a list of eligible gateways, returns the optimal gateway to route to.

The engine applies a sequence of filters (currency, card brand, auth type, EMI, etc.) then scores remaining gateways using success rate history, elimination status, and contract obligations.

post/decide-gateway

Request body

merchantIdstring required
eligibleGatewayListstring[] required
rankingAlgorithm'SrBasedRouting' | 'PlBasedRouting' | 'NtwBasedRouting' required
eliminationEnabledboolean

Example request

{
  "merchantId": "test_merchant",
  "paymentInfo": {
    "paymentId": "pay_001",
    "amount": 1000,
    "currency": "USD",
    "country": "US",
    "customerId": "cust_123",
    "paymentType": "ORDER_PAYMENT",
    "paymentMethodType": "CARD",
    "paymentMethod": "CREDIT",
    "authType": "THREE_DS",
    "cardIsin": "411111"
  },
  "eligibleGatewayList": [
    "stripe",
    "paypal",
    "adyen"
  ],
  "rankingAlgorithm": "SrBasedRouting"
}

Response

Gateway decision result

decided_gatewaystring
routing_approachstring
gateway_priority_mapobject
routing_dimensionstring
routing_dimension_levelstring
reset_approachstring
is_scheduled_outageboolean
is_rust_based_deciderboolean
latencynumber

Example response

{
  "decided_gateway": "stripe",
  "routing_approach": "SR_SELECTION_V3_ROUTING",
  "gateway_priority_map": {
    "stripe": 0.94,
    "adyen": 0.87,
    "paypal": 0.72
  }
}

Changes