Payments
Fetch Card Details of a Payment
Fetch Card Details of a Payment using Razorpay Payments API.
GET
Available in🇮🇳 India🇸🇬 Singapore🇺🇸 United States
Use this endpoint to retrieve the details of the card used to make a payment.
Path Parameters
string
required
Unique identifier of the payment for which you want to retrieve card details.
Response Parameters
object
Details of the card used to make the payment.
string
The unique identifier of the card used by the customer to make the payment.
string
The name of the entity. Here, it is
card.string
Name of the cardholder.
integer
The last 4 digits of the card number.
string
The card network. Possible values:
American ExpressDiners Club(Only available for private limited and registered businesses)MaestroMasterCardRuPayUnknownVisa
string
The card type. Possible values:
creditdebitprepaidunknown
string
The card issuer. The 4-character code denotes the issuing bank. This attribute will not be set for the card issued by a foreign bank.
boolean
Indicates whether the card can be used for EMI payment method. Possible values:
true: Card can be used for EMI payments.false: Card cannot be used for EMI payments.
string
The sub-type of the customer’s card. Possible values:
customerbusiness
Errors
The API {key/secret} provided is invalid.
The API {key/secret} provided is invalid.
Code:
4xxThe API credentials passed in the API call differ from the ones generated on the Dashboard.Solution: The API keys must be active and entered correctly with no whitespace before or after.The id provided does not exist.
The id provided does not exist.
Code:
400The payment_id provided is incorrect.Solution: Enter the correct payment_id.Payment was not done using card.
Payment was not done using card.
Code:
400The payment for the payment_id entered was not completed using a card.Solution: Use a payment_id which was completed using a card.