> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Eligible Payment Methods with Orders API

> Get the eligible payment methods, banks, wallets, apps, saved instruments and their logos that can be used on the checkout for an order, in the Orders API response.

Available in
🇮🇳 India

If you build your own checkout, you need to know which payment methods to show for an order. Add the `get_all_eligible_instruments` action to the [Create Order](https://razorpay.com/docs/api/orders/create.md) or Update Order request. Razorpay returns the methods that can be used on that order in the same response, along with their logos and app details.

## How it Differs from the Methods API

The [Methods API](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md) (`GET /v1/methods`) returns everything enabled on your account. It does not know the order amount, currency or device, so it does not filter the list. It also does not return logos or UPI app packages, so you need extra calls or your own mapping. It is also a separate API call that you must integrate and maintain, which adds to your integration effort.

`get_all_eligible_instruments` is calculated for the order and applies the same checks as Standard Checkout:

| Check | Methods API | `get_all_eligible_instruments` |
| - | - | - |
| Methods, banks and wallets enabled on your account | Yes | Yes |
| Minimum and maximum amount for the method | No | Yes |
| Terminal availability | No | Yes |
| Order rules, such as TPV bank lock | No | Yes |
| Logos for networks, banks, wallets and apps | No | Yes |
| Customer's saved cards and UPI IDs | No | Yes |

## Request

Pass `get_all_eligible_instruments` inside `checkout.actions` when you create or update an order. It takes no inputs of its own, because the order already holds the amount and currency. You can send it alone or along with other checkout actions such as `get_recommended_instruments`.

`POST /v1/orders`

```bash Request theme={null}
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
-X POST https://api.razorpay.com/v1/orders \
-H "Content-Type: application/json" \
-d '{
  "amount": 149900,
  "currency": "INR",
  "customer_id": "cust_KhP5dO1dKmc0Rm",
  "device_details": {
    "platform": "mweb",
    "os": "Android"
  },
  "customer_details": {
    "contact": "+919876543210",
    "email": "priya.sharma@example.com"
  },
  "checkout": {
    "actions": {
      "get_all_eligible_instruments": {}
    }
  }
}'
```

```json Response theme={null}
{
  "id": "order_IluGWxBm9U8zJ8",
  "entity": "order",
  "amount": 149900,
  "amount_paid": 0,
  "amount_due": 149900,
  "currency": "INR",
  "status": "created",
  "attempts": 0,
  "created_at": 1642662092,
  "checkout": {
    "actions": {
      "get_all_eligible_instruments": {
        "status": "success",
        "result": {
          "eligible_instruments": [
            {
              "method": "card",
              "enabled": true,
              "card": {
                "networks": [
                  {
                    "network": "Visa",
                    "logo_url": "https://cdn.razorpay.com/app/visa.svg"
                  },
                  {
                    "network": "Mastercard",
                    "logo_url": "https://cdn.razorpay.com/app/mastercard.svg"
                  },
                  {
                    "network": "RuPay",
                    "logo_url": "https://cdn.razorpay.com/app/rupay.svg"
                  }
                ],
                "apps": [
                  {
                    "app": "apple_pay",
                    "name": "Apple Pay",
                    "logo_url": "https://cdn.razorpay.com/app/apple.svg"
                  },
                  {
                    "app": "cred",
                    "name": "Cred",
                    "logo_url": "https://cdn.razorpay.com/app/cred.svg"
                  }
                ],
                "saved": [
                  {
                    "token": "token_Hf7vKlM2NpQrSt",
                    "last4": "4242",
                    "network": "Visa",
                    "issuer": "HDFC",
                    "type": "debit",
                    "sub_type": "consumer",
                    "international": false,
                    "network_logo_url": "https://cdn.razorpay.com/app/visa.svg",
                    "issuer_logo_url": "https://cdn.razorpay.com/app/hdfc.svg"
                  }
                ]
              }
            },
            {
              "method": "upi",
              "enabled": true,
              "upi": {
                "flows": [
                  "intent",
                  "collect"
                ],
                "payer_account_types": [
                  "bank_account",
                  "credit_card"
                ],
                "saved": [
                  {
                    "token": "token_Ka9pXcR2WvLm",
                    "vpa": "priya.sharma@okhdfcbank"
                  }
                ]
              }
            },
            {
              "method": "netbanking",
              "enabled": true,
              "netbanking": {
                "banks": [
                  {
                    "bank": "YESB",
                    "name": "Yes Bank",
                    "logo_url": "https://cdn.razorpay.com/app/yesb.svg",
                    "intent": true
                  },
                  {
                    "bank": "AIRP",
                    "name": "Airtel Payments Bank",
                    "logo_url": "https://cdn.razorpay.com/app/airp.svg"
                  }
                ]
              }
            },
            {
              "method": "wallet",
              "enabled": true,
              "wallet": {
                "wallets": [
                  {
                    "wallet": "amazonpay",
                    "name": "Amazon Pay",
                    "logo_url": "https://cdn.razorpay.com/app/amazonpay.svg"
                  }
                ]
              }
            },
            {
              "method": "emi",
              "enabled": false
            }
          ]
        }
      }
    }
  }
}
```

> [!NOTE]
>
> **Handy Tips**
>
> * To update an existing order, send the same `checkout.actions` object on `PATCH /v1/orders/{id}`.
> * The result is calculated for the amount and currency on the order. If the order amount changes, send the action again.

### Request Parameters

**amount** `integer` *required*

Order amount in the smallest currency unit. For example, `149900` is ₹1,499.

**customer\_id** `string`

Razorpay customer ID (starts with `cust_`). Required to get the customer's saved cards and UPI IDs in `saved`. Pass it if the customer exists on Razorpay.

**customer\_details.contact** `string`

Customer's mobile number in E.164 format. For example, `+919876543210`. Required if you do not send `customer_id`.

**device\_details** `object`

Details of the customer's device, such as `platform` and `os`. Used to decide which methods and flows are available, such as UPI intent.

**checkout.actions.get\_all\_eligible\_instruments** `object` *required*

Requests all eligible payment methods. Pass an empty object (`{}`).

## Response

The result is returned in `checkout.actions.get_all_eligible_instruments`. Each entry in `eligible_instruments` is one payment method, and all the details of that method are in an object named after it (`card`, `upi`, `netbanking` or `wallet`).

* A method that is not enabled for your account is not returned.
* A method that is enabled but cannot be used on this order is returned with `enabled` as `false` and no details object. You can choose to disable it or not show it on your checkout.

### Response Parameters

**status** `string`

`success` or `failed`. If `failed`, the order is still created or updated. Send the request again with the action to retry.

**error** `object`

Present when `status` is `failed`. Contains the standard error details.

**result.eligible\_instruments** `array`

One entry per payment method.

**properties**

**method** `string`

Payment method. Possible values: `card`, `upi`, `netbanking`, `wallet`, `emi`.

**enabled** `boolean`

`true`: the customer can pay with this method on this order. `false`: the method cannot be used on this order. Show it as disabled or hide it.

**card** `object`

Present when `method` is `card` and `enabled` is `true`.

**properties**

**networks** `array`

Accepted card networks. Each has `network` (such as `Visa`, `Mastercard`, `RuPay`, `Maestro`, `Amex`, `Diners`) and `logo_url`.

**apps** `array`

Apps that can be used to pay by card, such as Apple Pay and CRED. Each has `app`, `name` and `logo_url`.

**saved** `array`

The customer's saved cards that can be used on this order. Returned when you send `customer_id`. An empty array if there are none.

**properties**

**token** `string`

Token of the saved card. Pass it in the Create Payment request along with `customer_id`.

**last4** `string`

Last four digits of the card. For display only.

**network, issuer** `string`

Card network and issuing bank code.

**type, sub\_type** `string`

Card type (`credit`, `debit` or `prepaid`) and sub-type (`consumer`, `business` or `premium`).

**international** `boolean`

`true` if the card is an international card.

**network\_logo\_url, issuer\_logo\_url** `string`

Logos of the card network and the issuing bank.

**upi** `object`

Present when `method` is `upi` and `enabled` is `true`.

**properties**

**flows** `array of strings`

UPI flows that can be used: `intent`, `collect`.

**payer\_account\_types** `array of strings`

Funding sources accepted on UPI: `bank_account`, `credit_card` (RuPay credit card on UPI). The customer chooses the source in their UPI app, so a payment from a source not listed fails.

**saved** `array`

The customer's saved UPI IDs. Returned when you send `customer_id`. Each has a `token` and the `vpa` (for display).

**netbanking** `object`

Present when `method` is `netbanking` and `enabled` is `true`. Netbanking 2.0 banks are returned here along with the other banks.

**properties**

**banks** `array`

Banks that can be used on this order. Each has `bank` (the bank code, pass it as `bank` in Create Payment), `name`, `logo_url` and `intent`.

`intent` is `true` for Netbanking 2.0 banks. Use it to decide whether to send the customer to the bank's page or the bank's app.

**wallet** `object`

Present when `method` is `wallet` and `enabled` is `true`.

**properties**

**wallets** `array`

Wallets that can be used on this order. Each has `wallet` (pass as `wallet` in Create Payment), `name` and `logo_url`.

## Use the Response to Create a Payment

Values in the response can be passed directly in the [Create Payment](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/json/v2) request.

| To pay with | Pass in Create Payment |
| - | - |
| Saved card | `token` from `card.saved[]` and `customer_id` |
| Saved UPI ID | `token` from `upi.saved[]` and `customer_id` |
| Netbanking | `bank` from `netbanking.banks[]` |
| Wallet | `wallet` from `wallet.wallets[]` |

## Related Documentation

* [Methods API](https://razorpay.com/docs/payments/payment-gateway/s2s-integration/payment-methods/methods-api.md): list of all methods enabled on your account, without order-level checks.
* [Create an Order](https://razorpay.com/docs/api/orders/create.md): Orders API reference.
