dLocal · Arazzo Workflow

dLocal Cancel Pending Payment

Version 1.0.0

Create an alternative payment, check its status, and cancel it while it is still PENDING.

1 workflow 1 source API 1 provider
View Spec View on GitHub PaymentsEmerging MarketsPayinsPayoutsFintechLatin AmericaAfricaAsiaLocal Payment MethodsPayment ProcessingArazzoWorkflows

Provider

dlocal

Workflows

cancel-pending-payment
Create an alternative payment and cancel it if it is still PENDING.
Creates an alternative payment, polls its status, and cancels it only while it remains in the PENDING state.
3 steps inputs: amount, country, currency, orderId, payerDocument, payerEmail, payerName, paymentMethodId outputs: cancelledStatus, paymentId
1
createPayment
Create an alternative (non-card) payment using a REDIRECT payment method flow.
2
checkStatus
retrievePaymentStatus
Retrieve the lightweight status snapshot to decide whether the payment is still cancellable.
3
cancelPayment
cancelAlternativePayment
Cancel the pending alternative payment to release the order.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: dLocal Cancel Pending Payment
  summary: Create an alternative payment, check its status, and cancel it while it is still PENDING.
  description: >-
    Handles abandoned alternative (non-card) payments such as cash tickets and
    bank transfers. The workflow creates an alternative payment, polls its
    status, and then branches: when the payment is still PENDING it cancels it
    to release the order, and when it has already resolved it ends without
    cancelling. Every step spells out its request inline so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: paymentsApi
  url: ../openapi/_superseded/d-local-payments-api-openapi.yml
  type: openapi
workflows:
- workflowId: cancel-pending-payment
  summary: Create an alternative payment and cancel it if it is still PENDING.
  description: >-
    Creates an alternative payment, polls its status, and cancels it only while
    it remains in the PENDING state.
  inputs:
    type: object
    required:
    - country
    - currency
    - amount
    - orderId
    - paymentMethodId
    - payerName
    - payerEmail
    - payerDocument
    properties:
      country:
        type: string
        description: ISO 3166-1 alpha-2 country code (e.g. BR).
      currency:
        type: string
        description: ISO-4217 currency code (e.g. BRL).
      amount:
        type: number
        description: Transaction amount.
      orderId:
        type: string
        description: Merchant-provided order identifier.
      paymentMethodId:
        type: string
        description: Local alternative payment method code (e.g. PIX, a cash voucher code).
      payerName:
        type: string
        description: Full name of the payer.
      payerEmail:
        type: string
        description: Email address of the payer.
      payerDocument:
        type: string
        description: National identification document of the payer.
  steps:
  - stepId: createPayment
    description: >-
      Create an alternative (non-card) payment using a REDIRECT payment method
      flow.
    operationId: createPayment
    requestBody:
      contentType: application/json
      payload:
        amount: $inputs.amount
        currency: $inputs.currency
        country: $inputs.country
        payment_method_id: $inputs.paymentMethodId
        payment_method_flow: REDIRECT
        order_id: $inputs.orderId
        payer:
          name: $inputs.payerName
          email: $inputs.payerEmail
          document: $inputs.payerDocument
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      paymentId: $response.body#/id
      status: $response.body#/status
  - stepId: checkStatus
    description: >-
      Retrieve the lightweight status snapshot to decide whether the payment is
      still cancellable.
    operationId: retrievePaymentStatus
    parameters:
    - name: payment_id
      in: path
      value: $steps.createPayment.outputs.paymentId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
    onSuccess:
    - name: stillPending
      type: goto
      stepId: cancelPayment
      criteria:
      - context: $response.body
        condition: $.status == "PENDING"
        type: jsonpath
    - name: alreadyResolved
      type: end
      criteria:
      - context: $response.body
        condition: $.status != "PENDING"
        type: jsonpath
  - stepId: cancelPayment
    description: >-
      Cancel the pending alternative payment to release the order.
    operationId: cancelAlternativePayment
    parameters:
    - name: payment_id
      in: path
      value: $steps.createPayment.outputs.paymentId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cancelledStatus: $response.body#/status
  outputs:
    paymentId: $steps.createPayment.outputs.paymentId
    cancelledStatus: $steps.cancelPayment.outputs.cancelledStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/dlocal-cancel-pending-payment-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.