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 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 (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:
Request
Passget_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
Handy Tips
- To update an existing order, send the same
checkout.actionsobject onPATCH /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
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’s mobile number in E.164 format. For example,
+919876543210. Required if you do not send customer_id.Details of the customer’s device, such as
platform and os. Used to decide which methods and flows are available, such as UPI intent.Response
The result is returned incheckout.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
enabledasfalseand no details object. You can choose to disable it or not show it on your checkout.
Response Parameters
success or failed. If failed, the order is still created or updated. Send the request again with the action to retry.Use the Response to Create a Payment
Values in the response can be passed directly in the Create Payment request.Related Documentation
- Methods API: list of all methods enabled on your account, without order-level checks.
- Create an Order: Orders API reference.