---
title: "Decide gateway"
method: POST
path: "/decide-gateway"
tags: ["Gateway Decision"]
---

# Decide gateway

`POST /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.

## Request body

- DecideGatewayRequest
  - `merchantId` string, required
  - `paymentInfo` PaymentInfo, required
    - `paymentId` string, required
    - `amount` number, float, required
    - `currency` string, required
    - `country` string
    - `customerId` string
    - `paymentType` 'ORDER_PAYMENT' | 'MANDATE_PAYMENT', required
    - `paymentMethodType` 'CARD' | 'UPI' | 'WALLET' | 'NETBANKING', required
    - `paymentMethod` 'CREDIT' | 'DEBIT', required
    - `authType` 'THREE_DS' | 'NO_THREE_DS'
    - `cardIsin` string
  - `eligibleGatewayList` string[], required
  - `rankingAlgorithm` 'SrBasedRouting' | 'PlBasedRouting' | 'NtwBasedRouting', required
  - `eliminationEnabled` boolean

## Response `200`

Gateway decision result

- DecidedGateway
  - `decided_gateway` string
  - `routing_approach` string
  - `gateway_priority_map` object
  - `routing_dimension` string
  - `routing_dimension_level` string
  - `reset_approach` string
  - `is_scheduled_outage` boolean
  - `is_rust_based_decider` boolean
  - `latency` number

## Other responses

- `400` — Bad request

## Changes

- **2026-04-10** `9618544de91a` — 4 breaking, 3 warning, 5 info
  - removed the enum value `NTW_BASED_ROUTING` of the request property `rankingAlgorithm`
  - removed the enum value `NTW_SR_HYBRID_ROUTING` of the request property `rankingAlgorithm`
  - removed the enum value `PL_BASED_ROUTING` of the request property `rankingAlgorithm`
  - removed the enum value `SR_BASED_ROUTING` of the request property `rankingAlgorithm`
  - …8 more

[Change history](https://skmtc.dev/juspay/apis/decision-engine/changes/decide-gateway/post.md)

---

[API](https://skmtc.dev/juspay/apis/decision-engine.md) · [All operations](https://skmtc.dev/juspay/apis/decision-engine/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/juspay/decision-engine/revisions/9618544de91a/schema)
