v12

latestOpenAPI 3.1.0AGPL-3.0raw.githubusercontent.com2026-08-0464108237.1 KB
Compatibility

Legacy decision gateway

Legacy compatibility route. New integrations should use /decide-gateway.

post/decision_gateway

Request body

orderReferenceobject required

Full internal order object. merchantId inside it identifies the merchant.

merchantAccountobject required

Full internal merchant account object.

txnOfferDetailsobject[] nullable
cardTokenstring nullable
txnTypestring nullable
shouldCreateMandateboolean nullable
enforceGatewayListstring[] nullable
priorityLogicOutputobject nullable

Precomputed priority-logic output.

priorityLogicScriptstring nullable
isEdccAppliedboolean nullable
shouldConsumeResultboolean nullable

Example request

{
  "enforceGatewayList": [
    "stripe",
    "adyen"
  ]
}

Response

Gateway decision result

decided_gatewaystring
fallback_gatewaysstring[]
gateway_priority_mapobject nullable
filter_wise_gatewaysobject nullable
priority_logic_tagstring nullable
routing_approachstring

SR_SELECTION_MULTI_OBJECTIVE indicates the multi-objective post-step promoted a cheaper gateway over the SR head.

gateway_before_evaluationstring nullable

Gateway the SR head selected before the multi-objective / debit-routing post-step replaced it.

priority_logic_outputobject nullable
reset_approach'ELIMINATION_RESET' | 'SRV2_RESET' | 'SRV3_RESET' | 'NO_RESET' | 'SRV2_ELIMINATION_RESET' | 'SRV3_ELIMINATION_RESET'
routing_dimensionstring nullable
routing_dimension_levelstring nullable
is_scheduled_outageboolean
is_dynamic_mga_enabledboolean
gateway_mga_id_mapobject nullable
is_rust_based_deciderboolean
latencyinteger nullable

Example response

{
  "decided_gateway": "stripe",
  "fallback_gateways": [
    "adyen"
  ],
  "gateway_priority_map": {
    "stripe": 0.94,
    "adyen": 0.87
  },
  "routing_approach": "SR_SELECTION_V3_ROUTING",
  "debit_routing_output": {
    "co_badged_card_networks_info": [
      {
        "network": "NYCE",
        "saving_percentage": 1.2
      }
    ],
    "issuer_country": "US",
    "card_type": "Debit"
  },
  "reset_approach": "NO_RESET",
  "multi_objective_info": {
    "outcome": "COST_WON",
    "reason": "Promoted 'adyen' over 'stripe' on expected value — saves 80.00 bps for 3.00pp auth.",
    "srHead": {
      "psp": "adyen",
      "authRate": 0.91,
      "costBps": 100
    },
    "chosen": {
      "psp": "adyen",
      "authRate": 0.91,
      "costBps": 100
    },
    "costSavedBps": 80,
    "qualifiedCount": 3,
    "margin": 0.2,
    "evGapTop2": 0.00182
  }
}