API ReferenceIntegrationsKnowledge Base


This section contains the details of the Payment APIs that are used for making a payment in Razorpay.

Payment Entity#

To ease your understanding, the response for each request is shown on the right panel. The responses can be formatted either in JSON, the default pattern, or the object form, if you are using the language SDKs.

The various parameters are explained below:

string Unique identifier of the payment.
string Indicates the type of entity.
string The payment amount represented in smallest unit of the currency passed. For example, amount = 100 translates to 100 paisa, that is ₹1 (default currency is INR).
string The currency in which the payment is made. Refer the list of international currencies that we support.
string The status of the payment. Possible values:
string The payment method used for making the payment. Possible values:
- emi
string Order ID, if provided. Read Orders API to learn more.
description `
string Description of the payment, if any.
boolean Indicates whether the payment is done via an international card or a domestic one.
string The refund status of the payment. Possible values include:
- null
- partial
- full.
integer The amount refunded in smallest unit of the currency passed.
For example, if amount_refunded = 100, here 100 stands for 100 paise, which is equal to ₹1. INR is the default currency.
boolean Indicates if the payment has been captured.
string Customer email address used for the payment.
string Customer contact number used for the payment.
string Fee (including GST) charged by Razorpay.
integer GST charged for the payment.
string Code for the error that occurred during payment. For example, BAD_GATEWAY_ERROR.
string Description of the error that occurred during payment.
dictionary Contains user-defined fields, stored for reference purposes.
integer Timestamp, in UNIX format, on which the payment was created.

Capture a Payment#

The below endpoint captures a payment.


Path Parameters#

id mandatory
string Unique identifier of the payment to be captured.

Request Parameters#

amount mandatory
string The amount to be captured (should be equal to the authorized amount, in the smallest unit of the chosen currency).

This endpoint captures a specific payment. Capture is done after a payment status has been successfully set as “authorized”.

After the capture, the funds are transferred to your account in T + 3 days. The amount sent in the capture request must come from a verified source and be the amount that you are expecting to receive.

While creating a capture request, in the amount field enter only the amount associated with the Order that is stored in your database.

Attempting to capture a payment whose status is not authorized will produce an error.

Fetch a Payment#

The following endpoint is used for retrieving a specific payment object using its payment id.


Request Parameters#

string The id of the payment to be retrieved.

Fetch Multiple Payments#

The following endpoint is used for retrieving list of payments based on optional parameters:


Request Parameters#

integer Timestamp, in seconds, from when payments are to be fetched.
integer Timestamp, in seconds, till when payments are to be fetched.
integer Number of payments to be fetched.
Default value is 10. Maximum value is 100. This can be used for pagination, in combination with the skip parameter.
integer The number of records to be skipped while fetching the payments.

By default only last 10 are returned. You can use the countand skip parameters to retrieve the specific number of records that you need.

Fetch Payments based on Orders#

The following endpoint retrieves payments corresponding to an Order:


Fetch the Card Details for a Payment#

You can retrieve the details of the card that has been used to make a payment.

Request Parameters#

The following endpoint is used for retrieving the card details of a payment:


Response Entities#

string Unique ID of a card used for the payment.
string The value for this attribute will always be card.
string Name of the card holder.
string The last 4 digits of the card number.
string The card network

Possible values:
- American Express
- Diners Club
- Maestro
- MasterCard
- RuPay
- Unknown
- Visa
string Possible values include:
- Credit
- Debit
- Unknown
string The card issuer

4-character code denoting the issuing bank

This attribute will not be set for the card that has been issued by a foreign bank.
boolean This attribute will be set to true if the card has been issued by a foreign bank.
boolean This attribute is set to true if the card can be used for EMI payment method.

Update the Payment#

You can modify an existing payment to update the Notes field only. Notes can be used to record additional information about the payment. You can add up to 15 key-value pairs with each value of the key not exceeding 256 characters.

Using the PATCH operation, you can replace the entire notes object for the entity.

Request Parameters#

To modify the Notes field in a particular payment, construct the API request as follows:

id mandatory
string ID of the payment, which requires the Notes field to be updated
notes mandatory
string Notes of the entity to be modified