Create cancellation - Cancellations - Mercado Pago Developers
Create cancellation

PUT

/v1/payments/{payment_id}
Cancel a sale for a specific payment.
Request's parameters
payment_id

REQUIRED

string
Localization: pathPayment ID
status
String
Localization: bodyPayment status
Response parameters
id
number
Localization: bodyPayment identifier
date_created
string
Localization: bodyCancelation creation date
date_approved
string
Localization: bodyCancelation approved date
date_last_updated
string
Localization: bodyLast updated date
Request
curl
curl -X PUT \
    'https://api.mercadopago.com/v1/payments/{payment_id}' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
  "status": "cancelled"
}'
Answer
json
{
  "id": 18746874919,
  "date_created": "2021-12-10T17:13:23.000-04:00",
  "date_approved": null,
  "date_last_updated": "2021-12-10T17:31:34.000-04:00",
  "date_of_expiration": "2021-12-13T22:59:59.000-04:00",
  "money_release_date": null,
  "operation_type": "regular_payment",
  "issuer_id": null,
  "payment_method_id": "bolbradesco",
  "payment_type_id": "ticket",
  "status": "cancelled",
  "status_detail": "by_collector",
  "currency_id": "BRL",
  "description": "Meu produto",
  "live_mode": null,
  "sponsor_id": null,
  "authorization_code": null,
  "money_release_schema": null,
  "taxes_amount": 0,
  "counter_currency": null,
  "brand_id": null,
  "shipping_amount": 0,
  "pos_id": null,
  "store_id": null,
  "integrator_id": null,
  "platform_id": null,
  "corporation_id": null,
  "collector_id": null,
  "payers": [
    {
      "first_name": null,
      "last_name": null,
      "email": "test_user_80507629@testuser.com",
      "type": "collector",
      "identification": [
        {
          "number": "32659430",
          "type": "DNI"
        }
      ],
      "phone": [
        {
          "area_code": null,
          "number": null,
          "extension": null
        }
      ],
      "entity_type": null,
      "id": "1003743392",
      "operator_id": null
    }
  ],
  "marketplace_owner": null,
  "metadata": [
    {}
  ],
  "additional_info": [
    {
      "items": [
        {
          "id": "234",
          "title": "My product",
          "description": "E-commerce store cellphone",
          "picture_url": "https://www.mercadopago.com/org-img/MP3/home/logomp3.gif",
          "category_id": "art",
          "quantity": "1",
          "unit_price": "75.76"
        }
      ]
    }
  ],
  "order": [
    {
      "type": "mercadopago",
      "id": "3754501423"
    }
  ],
  "external_reference": "firstname@gmail.com",
  "transaction_amount": 75.76,
  "transaction_amount_refunded": 0,
  "coupon_amount": 0,
  "differential_pricing_id": null,
  "deduction_schema": null,
  "barcode": [
    {
      "content": "23791883300000075763380250600221946300633330"
    }
  ],
  "installments": 1,
  "transaction_details": [
    {
      "payment_method_reference_id": "6002219463",
      "verification_code": "6002219463",
      "net_received_amount": 0,
      "total_paid_amount": 75.76,
      "overpaid_amount": 0,
      "external_resource_url": "https://www.mercadopago.com/mlb/payments/beta/ticket/helper?payment_id=18746874919&payment_method_reference_id=6002219463&caller_id=1003743392&hash=6a8c570f-9c39-4a5c-9b55-85ae1b724bf",
      "installment_amount": 0,
      "financial_institution": null,
      "payable_deferral_period": null,
      "acquirer_reference": null
    }
  ],
  "fee_details": [
    {}
  ],
  "charges_details": [
    {}
  ],
  "captured": true,
  "binary_mode": true,
  "call_for_authorize_id": null,
  "statement_descriptor": null,
  "card": [
    {}
  ],
  "notification_url": "https://webhook.site/17a3a5ce-28d4-4b4f-ba3f-a7595c17c6d8",
  "refunds": [
    {}
  ],
  "processing_mode": "aggregator",
  "merchant_account_id": null,
  "merchant_number": null,
  "acquirer_reconciliation": [
    {}
  ],
  "point_of_interaction": [
    {
      "type": "UNSPECIFIED",
      "business_info": [
        {
          "unit": "online_payments",
          "sub_unit": "checkout_pro"
        }
      ]
    }
  ]
}
Errors
400bad_request
400400--Bad-Request--missing-information-on-header-
401bad_request
55--Must-provide-your-access-token-to -proceed--Valid-token-required-
404bad_request
20002000--Payment-not-found--Payment_Id_does_not_exist-