Update payment - Payments - Mercado Pago Developers
Update payment

PUT

/v1/payments/{id}
Renew the details of a payment when you need it. Indicate the payment ID and send the parameters with the information you want to update.
Request's parameters
id

REQUIRED

string
Localization: pathUnique Payment Identifier, automatically generated by Mercado Pago
capture
boolean
Localization: bodyDetermines if the payment should be captured (true, default value) or just reserved (false).
date_of_expiration
string
Localization: bodyPayment’s expiration date.
metadata
object
Localization: bodyThe metadata object shows (if used in the integration) the JSON sent by the client containing additional information that needs to be recorded in the payment.
Response parameters
id
number
Localization: bodyUnique Payment Identifier, automatically generated by Mercado Pago
date_created
string
Localization: bodyPayment creation date.
date_approved
string
Localization: bodyPayment approval date. A payment can be generated in an intermediate state and then approved, so the creation date will not always coincide with the Approval Date.
date_last_updated
string
Localization: bodyDate on which the last payment event was recorded.
Request
curl
curl -X PUT \
      'https://api.mercadopago.com/v1/payments/{id}' \
      -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
      -H 'Content-Type: application/json' \ 
      -d '{
  "capture": true,
  "metadata": {},
  "status": "cancelled",
  "transaction_amount": 58.8
}'
Answer
json
{
  "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": "BRL",
  "description": "Point Mini a maquininha que dá o dinheiro de suas vendas na hora",
  "taxes_amount": 0,
  "shipping_amount": 0,
  "collector_id": 448876418,
  "payer": {
    "id": 123,
    "email": "test_user_80507629@testuser.com",
    "identification": {
      "number": 19119119100,
      "type": "CPF"
    },
    "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_medium@2x.png",
        "category_id": "electronics",
        "quantity": 1,
        "unit_price": 58.8
      }
    ],
    "payer": {
      "registration_date": "2019-01-01T15:01:01.000Z"
    },
    "shipments": {
      "receiver_address": {
        "street_name": "Av das Nacoes Unidas",
        "street_number": 3003,
        "zip_code": 6233200,
        "city_name": "Buzios",
        "state_name": "Rio de Janeiro"
      }
    }
  },
  "external_reference": "MP0001",
  "transaction_amount": 58.8,
  "transaction_amount_refunded": 0,
  "coupon_amount": 0,
  "transaction_details": {
    "net_received_amount": 56.16,
    "total_paid_amount": 58.8,
    "overpaid_amount": 0,
    "installment_amount": 58.8
  },
  "fee_details": [
    {
      "type": "coupon_fee",
      "amount": 2.64,
      "fee_payer": "payer"
    }
  ],
  "statement_descriptor": "MercadoPago",
  "installments": 1,
  "card": {
    "first_six_digits": 423564,
    "last_four_digits": 5682,
    "expiration_month": 6,
    "expiration_year": 2023,
    "date_created": "2019-07-10T14:47:58.000Z",
    "date_last_updated": "2019-07-10T14:47:58.000Z",
    "cardholder": {
      "name": "APRO",
      "identification": {
        "number": 19119119100,
        "type": "CPF"
      }
    }
  },
  "notification_url": "https://www.suaurl.com/notificacoes/",
  "processing_mode": "aggregator",
  "point_of_interaction": {
    "type": "PIX",
    "application_data": {
      "name": "NAME_SDK",
      "version": "VERSION_NUMBER"
    },
    "transaction_data": {
      "qr_code_base64": "iVBORw0KGgoAAAANSUhEUgAABRQAAAUUCAYAAACu5p7oAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAIABJREFUeJzs2luO3LiWQNFmI+Y/Zd6vRt36KGNXi7ZOBtcagHD4kNLeiLX33v8DAAAAABD879sDAAAAAAA/h6AIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCAAAAAJmgCAAAAABkgiIAAAAAkAmKAAAAAEAmKAIAAAAAmaAIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCA...",
      "qr_code": "00020126600014br.gov.bcb.pix0117test@testuser.com0217dados adicionais520400005303986540510.005802BR5913Maria Silva6008Brasilia62070503***6304E2CA",
      "ticket_url": "https://www.mercadopago.com.br/payments/123456789/ticket?caller_id=123456&hash=123e4567-e89b-12d3-a456-426655440000"
    }
  }
}
Errors
400bad_request
8The name of the parameters is wrong
1004Invalid parameters for payment_method API
2018The action requested is not valid for the current payment state.
2078Capture attribute must be boolean.
2079Invalid value for capture attribute.
403bad_request
4The caller is not authorized to access this resource.
3002The caller is not authorized to perform this action.
404bad_request
2000Payment not found.