Payments

Cancel pending payment

Changed on

Cancel pending payments for alternative payment methods (APMs).

post/payments/{payment_id}/cancel

Request

  • Base URL
    https://api.dlocal.com
  • URL
    https://api.dlocal.com/payments/{payment_id}/cancel
  • Auth
    API key in header X-Date and API key in header X-Login and API key in header X-Trans-Key and API key in header Content-Type and API key in header X-Version and API key in header User-Agent and API key in header Authorization

Path parameters

payment_idstring required

The payment ID.

Response

200

idstring
amountnumber float
currencystring
payment_method_idstring
payment_method_typestring
payment_method_flowstring
countrystring
created_datestring
statusstring
status_detailstring
status_codestring
order_idstring
descriptionstring
notification_urlstring

Example response

{
  "id": "D-4-f1500792-7527-4a0e-86ef-3a9472b63f21",
  "amount": 1000,
  "currency": "MXN",
  "payment_method_id": "OX",
  "payment_method_type": "TICKET",
  "payment_method_flow": "DIRECT",
  "country": "MX",
  "created_date": "2020-09-14T19:11:48.000+0000",
  "status": "CANCELLED",
  "status_detail": "The payment was cancelled.",
  "status_code": "400",
  "order_id": "23796c17-2cc5-4fbb-86b5-10da0859a282",
  "description": "test",
  "notification_url": "http://conductor.sandbox.internal/robot-server/rest/generic/notification/new"
}

Changes

    • breaking

      the response's property type changed from integer to number, and format from no format to float for status

    • info

      api tag Payments added