post https://api.juspay.in/card/add
Add a credit card or debit card of a customer to JusPay Locker. customer_id
parameter identifies the customer to whom this card belongs to.
Response Parameters for the Add Card API: (click to view)
Parameter | Type | Description |
---|---|---|
card_token | String | Token representing the card from which payments must be initiated. Tokens are by definition short lived, so please do not cache them in your system. May also be used to update a card, delete a card, or tokenize a card before it expires. Expired tokens will lead to transactions being declined. |
card_reference | String | A reference identifier that doesn’t change for the stored card. Can be used to store any card metadata; for example: card type, card bin, or even transaction data. |
card_fingerprint | String | Uniquely identifies the card across the board. When the same card is stored across multiple accounts, same fingerprint will be returned. This can be used to identify duplicates. |
⭣The request must include merchant_id, customer_id, and either a token or Card (request) Parameters: (click to open table)
The request must include merchant_id, customer_id, and either a token or Card (request) Parameters: (click to open table)
Field | Type | Description | |
---|---|---|---|
merchant_id | * | String | Merchant ID which represents the merchant storing the card |
customer_id | * | String | Customer ID which represents the user uniquely |
* Use either the
token
parameter or Card (request) Parameters: token
parameter:
Field | Type | Description | |
---|---|---|---|
token | * | String | This is the token generated by the Tokenize API representing the details of a card. If token is used within 15 minutes, then card_number, card_exp_year, and card_exp_month are not required. merchant_id and customer_id are required in either case.Note: This may be a Form parameter, not Query. |
Card (request) Parameters:
Field | Type | Description | |
---|---|---|---|
card_number | * | String | A valid card number (Required only if token is not used. ) |
card_exp_year | * | String | Expiry year of the card (Format: yyyy) Example: "2020" (Required only if token is not used. ) |
card_exp_month | * | String | Expiry month of the card (Format: mm) Example: "06" (Required only if token is not used. ) |
name_on_card | String | Card holder name. Should contain alphabetical characters only. | |
customer_email | String | Email address of the customer. | |
nickname | String | A tag or a label for the card so that the user can easily identify the card. |
* = Required
* = Conditionally required
* = Conditionally required