Actualizar pago

Renueva los datos de un pago cuando lo necesites. Indica el ID del pago y envía los parámetros con la información que quieras actualizar.

PUT

https://api.mercadopago.com/v1/payments/{id}
Request parameters
Header
Authorization
string

REQUERIDO

Access Token obtenido a través del panel de desarrollador. Obligatorio ser enviado en todas las solicitudes.
Path
id
number

REQUERIDO

Identificador único del pago, generado automáticamente por Mercado Pago.
Body
date_of_expiration
string
Fecha de vencimiento del pago. El formato válido del atributo es el siguiente - "yyyy-MM-dd'T'HH:mm:ssz". Por ejemplo - 2022-11-17T09:37:52.000-04:00.
status
string
Es el estado actual de pago. Puede ser de dos tipos siguientes.
pending: The user has not concluded the payment process (for example, to generate a payment by boleto, this payment will be concluded at the moment in which the user makes the non-corresponding payment selected);
approved: The payment was approved and credited;
authorized: The payment was authorized, but still was not captured;
Ver más
transaction_amount
number
Costo del producto. Debe ser un número entero, sin decimales.
Response parameters
id
number
Identificador único del pago, generado automáticamente por Mercado Pago.
date_created
string
Fecha de creación del pago.
date_approved
string
Fecha de aprobación del Pago. Un pago puede generarse en un estado intermedio y luego ser aprobado, por tanto la fecha de creación no siempre coincidirá con la Fecha de Aprobación.
date_last_updated
string
Fecha en la que se registró el ultimo evento sobre el pago.
Errors

400Error

8

The name of the parameters is wrong

1004

Invalid parameters for payment_method API

2018

The action requested is not valid for the current payment state.

2078

Capture attribute must be boolean.

2079

Invalid value for capture attribute.

403Error

4

The caller is not authorized to access this resource.

3002

The caller is not authorized to perform this action.

404Error

2000

Payment not found.

Request
curl -X PUT \
    'https://api.mercadopago.com/v1/payments/{id}'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer APP_USR-8*********932064-12*********edf6d3c99*********2236c703f*********668' \
    -d '{
  "status": "canceled",
  "transaction_amount": 25
}'
Response
{
  "id": 20359978,
  "date_created": "2019-07-10T14:47:58.000Z",
  "date_approved": "2019-07-10T14:47:58.000Z",
  "date_last_updated": "2019-07-10T14:47:58.000Z",
  "money_release_date": "2019-07-24T14:47:58.000Z",
  "issuer_id": 25,
  "payment_method_id": "visa",
  "payment_type_id": "credit_card",
  "status": "approved",
  "status_detail": "accredited",
  "currency_id": "CLP",
  "description": "Pago Pizza",
  "taxes_amount": 0,
  "shipping_amount": 0,
  "collector_id": 448876418,
  "payer": {
    "id": 123,
    "email": "test_user_cl@testuser.com",
    "identification": {
      "number": "12345678-5",
      "type": "RUT"
    },
    "type": "customer"
  },
  "metadata": {},
  "additional_info": {
    "items": [
      {
        "id": "PR0001",
        "title": "Point Mini",
        "description": "Producto Point para cobros con tarjetas mediante bluetooth",
        "picture_url": "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium2x.png",
        "category_id": "electronics",
        "quantity": 1,
        "unit_price": "25"
      }
    ],
    "payer": {
      "registration_date": "2019-01-01T15:01:01.000Z"
    },
    "shipments": {
      "receiver_address": {
        "street_name": "Av das Nacoes Unidas",
        "street_number": "4800",
        "zip_code": "7550000",
        "city_name": "Santiago",
        "state_name": "Región Metropolitana"
      }
    }
  },
  "external_reference": "MP0001",
  "transaction_amount": "25",
  "transaction_amount_refunded": 0,
  "coupon_amount": 0,
  "transaction_details": {
    "net_received_amount": 56,
    "total_paid_amount": "50",
    "overpaid_amount": 0,
    "installment_amount": 58
  },
  "fee_details": [
    {
      "type": "coupon_fee",
      "amount": 2,
      "fee_payer": "payer"
    }
  ],
  "statement_descriptor": "MercadoPago",
  "installments": 1,
  "card": {
    "id": null,
    "first_six_digits": null,
    "last_four_digits": null,
    "expiration_month": null,
    "expiration_year": null,
    "date_created": "2019-07-10T14:47:58.000Z",
    "date_last_updated": "2019-07-10T14:47:58.000Z",
    "cardholder": {
      "name": null,
      "identification": {
        "number": "12345678-5",
        "type": "RUT"
      }
    }
  },
  "notification_url": "https://www.suaurl.com/notificacoes/",
  "processing_mode": "aggregator",
  "point_of_interaction": {
    "type": "visa",
    "application_data": {
      "name": "NAME_SDK",
      "version": "VERSION_NUMBER"
    }
  }
}