capabilities.work

Cancel Pending Payment

A 3-step recipe with dLocal. We can help you get access.

Recipe · 3 steps

Cancel Pending Payment

with dLocal

Create an alternative payment and cancel it if it is still PENDING.

  1. Create an alternative (non-card) payment using a REDIRECT payment method flow.
  2. Retrieve the lightweight status snapshot to decide whether the payment is still cancellable.
  3. Cancel the pending alternative payment to release the order.
What you'll need to have ready
  • country: ISO 3166-1 alpha-2 country code (e.g. BR).
  • currency: ISO-4217 currency code (e.g. BRL).
  • amount: Transaction amount.
  • orderId: Merchant-provided order identifier.
  • paymentMethodId: Local alternative payment method code (e.g. PIX, a cash voucher code).
  • payerName: Full name of the payer.
  • payerEmail: Email address of the payer.
  • payerDocument: National identification document of the payer.
For your developer

Arazzo workflow dlocal:cancel-pending-payment, 3 operations: createPayment → retrievePaymentStatus → cancelAlternativePayment. Specs on APIs.io.