Retrieve tokens using Razorpay APIs to create subsequent payments.
Once you capture a payment, Razorpay Checkout returns a razorpay_payment_id. You can use this ID to fetch the token_id, which is used to create and charge subsequent payments.
You can retrieve thetoken_id in the following ways:
string The status of the payment. Possible values:
created
authorized
captured
refunded
failed
order_id
string The unique identifier of the order.
invoice_id
string The unique identifier of the invoice.
international
boolean Indicates whether the payment is done via an international card or a domestic one.
method
string The payment method used for making the payment. Possible values:
card
netbanking
wallet
emi
upi
amount_refunded
integer The amount refunded in smallest unit of the currency passed.
refund_status
string The refund status of the payment. Possible values:
null
partial
full
captured
boolean Indicates if the payment is captured.
description
string Description of the payment, if any.
email
string Customer email address used for the payment.
contact
integer Customer contact number used for the payment.
customer_id
string The unique identifier of the customer.
token_id
string The unique identifier of the token.
notes
json object Contains user-defined fields, stored for reference purposes.
fee
integer Fee (including GST) charged by Razorpay.
tax
integer GST charged for the payment.
error_code
string Error that occurred during payment. For example, BAD_REQUEST_ERROR.
error_description
string Description of the error that occurred during payment. For example, Payment processing failed because of incorrect OTP.
error_source
string The point of failure. For example, customer.
error_step
string 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.
error_reason
string The exact error reason. For example, incorrect_otp.
created_at
integer Timestamp, in UNIX format, on which the payment was created.
A customer can have multiple tokens and these tokens can be used to create subsequent payments for multiple products or services. The following endpoint retrieves all tokens linked to a customer.
Watch Out!
The UPI tokens are not populated in the API response if the save_vpa feature is not enabled in your account. Please raise a request with our