Legacy Decision Gateway

August 4, 2026 ยท View on GitHub

/decision_gateway is retained for compatibility with older integrations. It does not use the modern /decide-gateway body - it expects the legacy decider payload built from full internal transaction objects (orderReference, orderMetadata, txnDetail, txnCardInfo, merchantAccount). Posting a /decide-gateway body here is rejected with a 400. New integrations should use /decide-gateway, whose request is far simpler.

curl --location "$BASE_URL/decision_gateway" \
  --header "$AUTH_HEADER" \
  --header "Content-Type: application/json" \
  --data '{
    "orderReference": {
      "id": 1,
      "orderId": "order_001",
      "amount": 1000.0,
      "currency": "USD",
      "dateCreated": "2026-03-31T00:00:00.000000000Z",
      "merchantId": "merchant_demo",
      "status": "NEW",
      "orderType": "ORDER_PAYMENT",
      "udfs": [],
      "customerId": "cust_123",
      "preferredGateway": null,
      "metadata": null
    },
    "orderMetadata": {
      "id": 1,
      "dateCreated": "2026-03-31T00:00:00.000000000Z",
      "lastUpdated": "2026-03-31T00:00:00.000000000Z",
      "orderReferenceId": 1,
      "partitionKey": null
    },
    "txnDetail": {
      "id": 1,
      "dateCreated": "2026-03-31T00:00:00.000000000Z",
      "orderId": "order_001",
      "status": "PENDING_VBV",
      "txnId": "txn_001",
      "merchantId": "merchant_demo",
      "txnUuid": "pay_001",
      "currency": "USD",
      "txnAmount": 1000.0,
      "txnObjectType": "ORDER_PAYMENT",
      "txnType": "ORDER_PAYMENT",
      "gateway": "stripe",
      "partitionKey": null
    },
    "txnCardInfo": {
      "id": 1,
      "txnId": "txn_001",
      "txnDetailId": 1,
      "dateCreated": "2026-03-31T00:00:00.000000000Z",
      "paymentMethodType": "CARD",
      "paymentMethod": "CREDIT",
      "authType": "THREE_DS",
      "cardIsin": "411111",
      "cardType": "CREDIT",
      "partitionKey": null
    },
    "merchantAccount": {
      "id": 1,
      "merchantId": "merchant_demo",
      "gatewayPriorityLogic": "",
      "useCodeForGatewayPriority": true,
      "gatewaySuccessRateBasedDeciderInput": "{}"
    },
    "enforceGatewayList": ["stripe", "adyen"],
    "priorityLogicScript": null,
    "priorityLogicOutput": null
  }'
This is the legacy Groovy-era decider schema. All five objects are required, and each has its own required fields - the payload above is the minimum that deserializes. Watch for four things that commonly trip people up. `orderReference.udfs` is an **array**, not an object. Every `id` is an integer, not a string. `merchantAccount.gatewaySuccessRateBasedDeciderInput` is a required string, so `null` is rejected. And `orderMetadata`, `txnDetail` and `txnCardInfo` must each carry a `partitionKey` **key** (the value may be `null`, but omitting the key fails with `missing field partitionKey`). Prefer `/decide-gateway` for all new work.