Actualizar tarjeta - Tarjetas - Mercado Pago Developers
Actualizar tarjeta

PUT

/v1/customers/{customer_id}/cards/{id}
Renueva los datos de una tarjeta asociada a un cliente. Indica los ID y envía los parámetros con la información que quieras actualizar.
Parámetros para la solicitud
expiration_month
number
Localización: requestBodyMes de expiración de la tarjeta
expiration_year
number
Localización: requestBodyAño de expiración de la tarjeta
cardholder.name
string
Localización: requestBodyCard's name.
cardholder.identification
string
Localización: requestBodyCard's owner identification
Parámetros de respuesta
id
string
Localización: body
expiration_month
number
Localización: body
expiration_year
number
Localización: body
first_six_digits
string
Localización: body
Solicitud
curl
curl -X PUT \
    'https://api.mercadopago.com/v1/customers/{customer_id}/cards/{id}' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
  "token": "9b2d63e00d66a8c721607214ceda233a"
}'
Respuesta
json
{
  "id": "8987269652",
  "expiration_month": 7,
  "expiration_year": 2023,
  "first_six_digits": "503143",
  "last_four_digits": "6351",
  "payment_method": {
    "id": "master",
    "name": "Mastercard",
    "payment_type_id": "credit_card",
    "thumbnail": "http://img.mlstatic.com/org-img/MP3/API/logos/master.gif",
    "secure_thumbnail": "https://www.mercadopago.com/org-img/MP3/API/logos/master.gif"
  },
  "security_code": {
    "length": 3,
    "card_location": "back"
  },
  "issuer": {
    "id": 24,
    "name": "Mastercard"
  },
  "cardholder": {
    "name": "APRO",
    "identification": {
      "number": "19119119100",
      "type": "CPF"
    }
  },
  "date_created": "2021-03-16T16:08:21.000-04:00",
  "date_last_updated": "2021-03-16T16:11:54.294-04:00",
  "customer_id": "470183340-cpunOI7UsIHlHr",
  "user_id": "470183340",
  "live_mode": true
}
Errores
400bad_request
100the credentials are required.
101the customer already exist.
102missing customer id.
103parameter must be an object
104parameter length is too large.
105the customer id is invalid.
106the email format is invalid.
107the first_name is invalid.
108the last_name is invalid.
109the phone.area_code is invalid.
110the phone.number is invalid.
111the identification.type is invalid.
112the identification.number is invalid.
113the address.zip_code is invalid.
114the address.street_name is invalid.
115the date_registered format is invalid.
116the description is invalid.
117the metadata is invalid.
118the body must be a Json object
119the card is required.
120card not found.
121the card is invalid.
122the card data is invalid.
123the payment_method_id is required.
124the issuer_id is required.
125invalid parameters.
126invalid parameter. You cannot update the email.
127invalid parameter. Cannot resolve the payment method of card, check the payment_method_id and issuer_id.
128the email format is invalid. Use 'test_payer_[0-9]{1,10}@testuser.com'.
129the customer has reached the maximum allowed number of cards.
140invalid card owner.
150invalid users involved.
200invalid range format (range=:date_parameter:after::date_from,before::date_to).
201range attribute must belong to date entity.
202invalid 'after' parameter. It should be date[iso_8601].
203invalid 'before' parameter. It should be date[iso_8601].
204invalid filters format.
205invalid query format.
206attributes to sort must belong to 'customer' entity.
207order filter must be 'asc' or 'desc'.
208invalid 'sort' parameter format.
401bad_request
unauthorizedunauthorized.
404bad_request
not_foundnot_found.