token_id using the Dashboard or the APIs given below.
2.1. Fetch Token by Payment ID
The following endpoint fetches thetoken_id using a payment_id.
/payments/:id
Curl
Debit Payment
Handy Tips
token_id via the payment.failed webhook.
Path Parameters
id mandatory
: string The unique identifier of the payment to be retrieved. For example, pay_1Aa00000000002.
2.2. Fetch Tokens by Customer ID
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 tokens linked to a customer.Path Parameters
id mandatory
: string The unique identifier of the customer for whom tokens are to be retrieved. For example, cust_1Aa00000000002.
2.3. Delete Tokens
Path Parameters
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.
2.4. Cancel Token
The following endpoint initiates cancellation of the mandate from NPCI. /customers/:customer_id/tokens/:token_id/cancelRequest
Path Parameters
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 cancelled. For example, token_1Aa00000000001.