Obtain customer cards/v1/customers/{customer_id}/cardsConsult a client's saved cards in order to be able to show them when making a payment..
GET
Request's parameters
customer_idstring
Localization: pathCustomer's IdREQUIRED
Response parameters
id
Localization: bodyCard IDstring
date_registered
Localization: bodystring
date_created
Localization: bodyCard's date created.string
date_last_updated
Localization: bodyCard's last modified date.string
Request
curl
curl -X GET \
'https://api.mercadopago.com/v1/customers/{customer_id}/cards' \
-H 'Authorization: Bearer ACCESS_TOKEN_ENV'
Answer
json
[
{
"id": "277090284",
"date_created": "2018-07-18T13:28:32.000-04:00",
"date_last_updated": "2018-08-07T12:21:32.243-04:00",
"customer_id": "329653963-byLEdchVPhPc4H",
"expiration_month": 11,
"expiration_year": 2020,
"first_six_digits": "423564",
"last_four_digits": "5682",
"payment_method": {
"id": "visa",
"name": "Visa",
"payment_type_id": "credit_card",
"thumbnail": "http://img.mlstatic.com/org-img/MP3/API/logos/visa.gif",
"secure_thumbnail": "https://www.mercadopago.com/org-img/MP3/API/logos/visa.gif"
},
"security_code": {
"length": 3,
"card_location": "back"
},
"issuer": {
"id": 25,
"name": "Visa"
},
"cardholder": {
"name": "APRO",
"identification": {
"number": "19119119100",
"type": "CPF"
}
},
"user_id": "12123adfasdf123u4u",
"live_mode": true
}
]
Errors
400bad_request
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
140
150
200
201
202
203
204
205
206
207
208
401bad_request
unauthorized
404bad_request
not_found
Was this information helpful?