post https://test.payu.in/merchant/postservice.php
The Get User Cards API is used to fetch all the cards corresponding to the user. In this API, the card number and other sensitive information are not returned.
HTTP Method: POST
Sample request
curl --request POST \
--url 'https://test.payu.in/merchant/postservice.php?form=2' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'accept: text/html; charset=UTF-8' \
--data key=JPM7Fg \
--data command=get_payment_instrument \
--data var1=JPM7Fg:abc \
--data hash=750351ed44241b9739d2e374de45dd0be3c2f6d68305ceb81084960387b71722b0f8d224900f57202488a557ecfa6f2e22895f27585a413388684a142bb8e41e
Sample response
{
"status": 1,
"msg": "Cards fetched Succesfully",
"user_cards": {
"a52aa1c09e11ac56926005": {
"one_click_status": "",
"one_click_flow": "",
"card_type": "CC",
"expiry_year": "2030",
"network_token": {
"token_bin": "439040",
"is_expired": "0",
"token_exp_yr": "2030",
"token_exp_mon": "11",
"token_value": "4390406210204342"
},
"expiry_month": "11",
"is_expired": "0",
"card_mode": "CC",
"card_no": "XXXXXXXXXXXX6937",
"one_click_card_alias": "",
"card_token": "a52aa1c09e11ac56926005",
"card_name": "raghu_visa",
"name_on_card": "DUMMY",
"card_brand": "VISA",
"card_bin": "439040621",
"isDomestic": "Y",
"card_cvv": 0,
"PAR": "V0010013022320257414953977387"
}
}
}
Response parameters
Field | Description | Example |
---|---|---|
status | The status of the response. Can be: • 1: Success • 0: Failure | 1 |
msg | The description of the response indicating whether cards were fetched successfully or not. | Cards fetched Succesfully |
user_cards | A JSON object containing all saved cards for the user. Each card is identified by its unique card token as the key. For more details, refer to Card JSON object field description | Refer to Card JSON object field description |
Card JSON object field description
Field | Description | Example |
---|---|---|
one_click_status | Status for one-click payment feature. | "" |
one_click_flow | Flow type for one-click payment processing. | "" |
card_type | The type of the card. Can be: • CC: Credit Card • DC: Debit Card | CC |
expiry_year | The expiry year of the card. | 2030 |
expiry_month | The expiry month of the card. | 11 |
is_expired | Indicates whether the card has expired: • 0: Card is active • 1: Card has expired | 0 |
card_mode | The payment mode of the card (CC for Credit Card, DC for Debit Card). | CC |
card_no | The masked card number showing only the last four digits for security. | XXXXXXXXXXXX6937 |
one_click_card_alias | Alias name for the card used in one-click payments. | "" |
card_token | The unique PayU token assigned to this saved card. | a52aa1c09e11ac56926005 |
card_name | The name/label assigned to the saved card by the user. | raghu_visa |
name_on_card | The cardholder's name as it appears on the card. | DUMMY |
card_brand | The brand/network of the card (VISA, MASTERCARD, AMEX, etc.). | VISA |
card_bin | The Bank Identification Number (first 6-9 digits) of the card. | 439040621 |
isDomestic | Indicates whether the card is domestic or international: • Y: Domestic card • N: International card | Y |
card_cvv | Indicates whether CVV is required for transactions: • 0: CVV not required • 1: CVV required | 0 |
PAR | Payment Account Reference - a unique identifier for the card across all tokens, used for offers and risk checks. | V0010013022320257414953977387 |
network_token | A JSON object containing network token details for secure payments. For more information, refer to Network token JSON object field description | Refer to Network token JSON object field description |
Network token JSON object fields description
Field | Description | Example |
---|---|---|
token_bin | The Bank Identification Number for the network token. | 439040 |
is_expired | Indicates whether the network token has expired: • 0: Token is active • 1: Token has expired | 0 |
token_exp_yr | The expiry year of the network token. | 2030 |
token_exp_mon | The expiry month of the network token. | 11 |
token_value | The actual network token value used for secure transactions. | 4390406210204342 |