Fetch Card Details of a Payment
GET
/v1/payments/:id/card
Click to copy
Use this endpoint to retrieve the details of the card used to make a payment.
Is this page helpful?
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X GET https://api.razorpay.com/v1/payments/pay_DtFYPi3IfUTgsL/card
Success
Failure
1{2"id": "card_JXPULjlKqC5j0i",3"entity": "card",4"name": "Gauav Kumar",5"last4": "4366",6"network": "Visa",7"type": "credit",8"issuer": "HSBC",9"international": false,10"sub_type": "consumer",11"token_iin": null12}
Path Parameters
id
*
string
Unique identifier of the payment for which you want to retrieve card details.
Response Parameters
card
object
Details of the card used to make the payment.
Show child parameters (8)
Errors
The API {key/secret} provided is invalid.
Error Status: 4xx
The API credentials passed in the API call differ from the ones generated on the Dashboard.
Solution
The id provided does not exist.
Error Status: 400
The payment_id
provided is incorrect.
Solution
Payment was not done using card.
Error Status: 400
The payment for the payment_id
entered was not completed using a card.
Solution
Fetch Card Details of a Payment
GET
/v1/payments/:id/card
Click to copy
Use this endpoint to retrieve the details of the card used to make a payment.
Is this page helpful?
Path Parameters
id
*
string
Unique identifier of the payment for which you want to retrieve card details.
Response Parameters
card
object
Details of the card used to make the payment.
Show child parameters (8)
Errors
The API {key/secret} provided is invalid.
Error Status: 4xx
The API credentials passed in the API call differ from the ones generated on the Dashboard.
Solution
The id provided does not exist.
Error Status: 400
The payment_id
provided is incorrect.
Solution
Payment was not done using card.
Error Status: 400
The payment for the payment_id
entered was not completed using a card.
Solution
Curl
change language
change language
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]2-X GET https://api.razorpay.com/v1/payments/pay_DtFYPi3IfUTgsL/card
Success
Failure
1{2"id": "card_JXPULjlKqC5j0i",3"entity": "card",4"name": "Gauav Kumar",5"last4": "4366",6"network": "Visa",7"type": "credit",8"issuer": "HSBC",9"international": false,10"sub_type": "consumer",11"token_iin": null12}