Razorpay Docs (original) (raw)

Fetch All Payments

Use this endpoint to retrieve details of all the payments. By default, only the last 10 records are displayed. You can use the count and skip parameters to retrieve the specific number of records that you need.

1

curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]

2

-X GET https://api.razorpay.com/v1/payments?from=1593320020&to=1624856020&count=2&skip=1

2

"entity": "collection",

6

  "id": "pay_KbCFyQ0t9Lmi1n",

10

  "status": "authorized",

13

  "international": false,

14

  "method": "netbanking",

16

  "refund_status": null,

18

  "description": "Test Transaction",

23

  "email": "gaurav.kumar@gmail.com",

24

  "contact": "+919000090000",

26

    "address": "Razorpay Corporate Office"

31

  "error_description": null,

36

    "bank_transaction_id": "5733649"

38

  "created_at": 1667397881

41

  "id": "pay_KbCEDHh1IrU4RJ",

45

  "status": "authorized",

48

  "international": false,

51

  "refund_status": null,

53

  "description": "Test Transaction",

57

  "vpa": "gaurav.kumar@okhdfcbank",

59

  "payer_account_type": "credit_card",

60

  "vpa": "gaurav.kumar@examplebank",

63

  "email": "gaurav.kumar@gmail.com",

64

  "contact": "+919000090000",

66

    "address": "Razorpay Corporate Office"

71

  "error_description": null,

76

    "rrn": "230901495295",

77

    "upi_transaction_id": "6935B87A72C2A7BC83FA927AA264AD53"

79

  "created_at": 1667397781
Query Parameters

UNIX timestamp, in seconds, from when payments are to be fetched.

UNIX timestamp, in seconds, till when payments are to be fetched.

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.

Number of records to be skipped while fetching the payments.

Response Parameters

Unique identifier of the payment.

Indicates the type of entity.

The payment amount in currency subunits. For example, for an amount of ₹1.00 enter 100.

The currency in which the payment is made. Refer to the list of

that we support.

The status of the payment. Possible values:

The payment method used for making the payment. Possible values:

Order id, if provided. Know more about

.

Description of the payment, if any.

Indicates whether the payment is done via an international card or a domestic one. Possible values:

The refund status of the payment. Possible values:

The amount refunded in currency subunits. For example, if amount_refunded = 100, it is equal to ₹1.00.

Indicates if the payment is captured. Possible values:

Customer email address used for the payment.

Customer contact number used for the payment.

Fee (including GST) charged by Razorpay.

GST charged for the payment.

Error that occurred during payment. For example, BAD_REQUEST_ERROR.

Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP.

The point of failure. For example, customer.

The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, payment_authentication.

The exact error reason. For example, incorrect_otp.

Contains user-defined fields, stored for reference purposes.

Timestamp, in UNIX format, on which the payment was created.

The unique identifier of the card used by the customer to make the payment.

Details of the card used to make the payment.

Show child parameters (9)

Details of the UPI payment received. Only applicable if method is upi.

Show child parameters (3)

The 4-character bank code which the customer's account is associated with. For example, UTIB for Axis Bank.

The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, gauravkumar@exampleupi.

The name of the wallet used by the customer to make the payment. For example, payzapp.

A dynamic array consisting of a unique reference numbers.

Show child parameters (3)

Errors

The API {key/secret} provided is invalid.

The API credentials passed in the API call differ from the ones generated on the Dashboard.

from must be between 946684800 and 4765046400

The time range entered is invalid.

Fetch All Payments

Use this endpoint to retrieve details of all the payments. By default, only the last 10 records are displayed. You can use the count and skip parameters to retrieve the specific number of records that you need.

Query Parameters

UNIX timestamp, in seconds, from when payments are to be fetched.

UNIX timestamp, in seconds, till when payments are to be fetched.

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.

Number of records to be skipped while fetching the payments.

Response Parameters

Unique identifier of the payment.

Indicates the type of entity.

The payment amount in currency subunits. For example, for an amount of ₹1.00 enter 100.

The currency in which the payment is made. Refer to the list of

that we support.

The status of the payment. Possible values:

The payment method used for making the payment. Possible values:

Order id, if provided. Know more about

.

Description of the payment, if any.

Indicates whether the payment is done via an international card or a domestic one. Possible values:

The refund status of the payment. Possible values:

The amount refunded in currency subunits. For example, if amount_refunded = 100, it is equal to ₹1.00.

Indicates if the payment is captured. Possible values:

Customer email address used for the payment.

Customer contact number used for the payment.

Fee (including GST) charged by Razorpay.

GST charged for the payment.

Error that occurred during payment. For example, BAD_REQUEST_ERROR.

Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP.

The point of failure. For example, customer.

The stage where the transaction failure occurred. The stages can vary depending on the payment method used to complete the transaction. For example, payment_authentication.

The exact error reason. For example, incorrect_otp.

Contains user-defined fields, stored for reference purposes.

Timestamp, in UNIX format, on which the payment was created.

The unique identifier of the card used by the customer to make the payment.

Details of the card used to make the payment.

Show child parameters (9)

Details of the UPI payment received. Only applicable if method is upi.

Show child parameters (3)

The 4-character bank code which the customer's account is associated with. For example, UTIB for Axis Bank.

The customer's VPA (Virtual Payment Address) or UPI id used to make the payment. For example, gauravkumar@exampleupi.

The name of the wallet used by the customer to make the payment. For example, payzapp.

A dynamic array consisting of a unique reference numbers.

Show child parameters (3)

Errors

The API {key/secret} provided is invalid.

The API credentials passed in the API call differ from the ones generated on the Dashboard.

from must be between 946684800 and 4765046400

The time range entered is invalid.

1

curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]

2

-X GET https://api.razorpay.com/v1/payments?from=1593320020&to=1624856020&count=2&skip=1

2

"entity": "collection",

6

  "id": "pay_KbCFyQ0t9Lmi1n",

10

  "status": "authorized",

13

  "international": false,

14

  "method": "netbanking",

16

  "refund_status": null,

18

  "description": "Test Transaction",

23

  "email": "gaurav.kumar@gmail.com",

24

  "contact": "+919000090000",

26

    "address": "Razorpay Corporate Office"

31

  "error_description": null,

36

    "bank_transaction_id": "5733649"

38

  "created_at": 1667397881

41

  "id": "pay_KbCEDHh1IrU4RJ",

45

  "status": "authorized",

48

  "international": false,

51

  "refund_status": null,

53

  "description": "Test Transaction",

57

  "vpa": "gaurav.kumar@okhdfcbank",

59

  "payer_account_type": "credit_card",

60

  "vpa": "gaurav.kumar@examplebank",

63

  "email": "gaurav.kumar@gmail.com",

64

  "contact": "+919000090000",

66

    "address": "Razorpay Corporate Office"

71

  "error_description": null,

76

    "rrn": "230901495295",

77

    "upi_transaction_id": "6935B87A72C2A7BC83FA927AA264AD53"

79

  "created_at": 1667397781