This service is available in v3 only, and in Brazil only.
What is Accounts Payable?
The Accounts Payable API lets you initiate and track Pix payments from your Clara digital account. Payments created through the API go through the same authorization, validation, and audit controls as payments made in the Clara web app. You can use this API to:- Pay to a Pix key, a QR code, or bank details
- Pay immediately or schedule a payment for a later date
- Cancel a scheduled payment before it runs
- Track each payment until it settles, and list payments with filters
Available Endpoints
Creating and cancelling payments requires the
write:accounts-payable/pix grant on your API credential. Getting and listing payments requires read:digital-account.
How payment creation works
Creating a payment is asynchronous. The API answers202 Accepted as soon as it accepts the request. It does not wait for the money to move.
- Observe the outcome by polling
GET /v3/accounts-payable/{externalId}. - Every payment reaches a terminal status (
PAID,FAILED, orCANCELLED) within 3 hours at worst.
Idempotency with externalId
You generate the externalId (a UUID) yourself. It must be unique within your company.
- Sending the same
externalIdagain answers202without creating a second payment. It is safe to retry a create that timed out. - A new payment always needs a new
externalId.
Choosing the destination
There is no destination type field. The API infers the destination from which fields you populate:dictKey and qrCode are mutually exclusive. Sending both, or no destination at all, is rejected with INVALID_REQUEST.
amount sits at the root of the request:
- Required for Pix-key and bank-details payments.
- Optional for QR payments, where the QR itself can define the amount.
dictKeyType is required whenever you send dictKey: CPF, CNPJ, EMAIL, PHONE, or EVP. CPF and CNPJ keys are both digit strings, so the type cannot be inferred from the value.
For a Pix-key or QR payment you can optionally send beneficiary.documentNumber as an owner assertion. For a bank-details payment the full beneficiary is required, and accountType uses the ISO 20022 values:
Scheduling
AddpaymentMethod.desiredPaymentDate (YYYY-MM-DD, America/Sao_Paulo) to schedule a payment. Omit it to pay immediately.
- The earliest date you can schedule is D+1.
- The payment provider decides how weekends and Brazilian bank holidays are handled.
- A dynamic immediate (
cob) QR cannot be scheduled.
Create a Pix payment
Endpoint
POST /v3/accounts-payable/pix
- Pix key
- QR code
- Bank details
- Scheduled
cURL
Sample JSON Response — 202 Accepted
JSON
amount is null while an amount-less QR is still being resolved.
Synchronous errors
Cancel a scheduled payment
Only scheduled payments that have not started executing can be cancelled.Endpoint
DELETE /v3/accounts-payable/pix/{externalId}
cURL Request
cURL
204 No Content.
Get a payment
Endpoint
GET /v3/accounts-payable/{externalId}
cURL Request
cURL
Sample JSON Response
JSON
Statuses
Refunds are not exposed at launch. A refunded payment remains
PAID.When a payment fails
AFAILED payment carries an error object:
JSON
code, not message. The code is the stable contract. The message is informational: it may be reworded without a version change, and it is English-only at launch.
List payments
Endpoint
GET /v3/accounts-payable
Query Parameters (Optional)
Dates are
YYYY-MM-DD in America/Sao_Paulo, and range bounds are inclusive.
Sorting: one key per request. Allowed fields are creationDate, amount, and status; direction is asc or desc. The default is creationDate,desc.
cURL Request
cURL
Sample JSON Response
JSON
Rate limits and outages
- A
429comes from the gateway with no body. TheX-RateLimit-Remaining,X-RateLimit-Replenish-Rate,X-RateLimit-Burst-Capacity, andX-RateLimit-Requested-Tokensheaders carry the quota state. There is noRetry-Afterheader. - A
503means the payment service could not be reached or answered outside its contract. Retry later, and poll the payment byexternalIdbefore you submit it again.
