Skip to main content
Available in🇮🇳 India
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 the token_id using the Dashboard or the APIs given below.

2.1. Fetch Token by Payment ID

Use the below endpoint to fetch token_id using the payment_id. GET /payments/:id
Handy TipsYou can also retrieve the token_id from the payment.authorized webhook.
id mandatory : string The unique identifier of the payment to be retrieved. For example, pay_1Aa00000000002.

2.2. Fetch Tokens by Customer ID

Use the below endpoint to fetch all tokens linked to a customer. A customer can have multiple tokens tied to them. These tokens can be used to create subsequent payments for multiple products or services. GET /customers/:id/tokens
id mandatory : string The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_1Aa00000000002.

2.3. Delete Tokens

The following endpoint deletes a token. DELETE /customers/:customer_id/tokens/:token_id
customer_id mandatory : string The unique identifier of the customer with whom the token is linked. For example, cust_1Aa00000000002.token_id mandatory : string The unique identifier of the token that is to be deleted. For example, token_1Aa00000000001.