Collect an exact amount

A one-time payment for your order amount. PIX in Brazil, bank transfer in Peru, Nequi and Bre-B in Colombia, PayPal and Zelle in USD.

POST/v1/funding-accounts

With amount, the funding account is a one-time payment: your customer pays exactly that amount, in the currency, and the account closes when the payment completes.

FieldRequiredWhat it is
methodYespix, bank_transfer, nequi, bre_b…
currencyYesWhat your customer pays: BRL, PEN, COP…
amountYes, for a one-time paymentYour order amount.
payerDepends on the methodThe payer details that payment_method_fields asks for in capabilities.
settlement_currencyNoThe currency your balance is credited in. Defaults to the settlement_asset from capabilities.

PIX requires the payer's name. The key in payer is the field's full name, exactly as capabilities gives it: payer.name.

curl "$CAIBO_API/v1/funding-accounts" \
  -H "Authorization: Bearer $CAIBO_API_KEY" \
  -H "Idempotency-Key: payin-order-8812" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "pix",
    "currency": "BRL",
    "amount": "250.00",
    "payer": { "payer.name": "Ana Souza" }
  }'
201
{
  "id": "fa_01m3sg9w0000000000000000",
  "status": "pending",
  "method": "pix",
  "currency": "BRL",
  "settlement_currency": "USDT",
  "amount": "250.00",
  "created_at": "2026-10-18T12:00:00Z"
}

Once it's active:

{
  "id": "fa_01m3sg9w0000000000000000",
  "status": "active",
  "method": "pix",
  "currency": "BRL",
  "settlement_currency": "USDT",
  "amount": "250.00",
  "instructions": {
    "copy_paste_code": "00020126580014br.gov.bcb.pix...",
    "qr_code_image_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "amount": "250.00",
    "currency": "BRL"
  },
  "created_at": "2026-10-18T12:00:00Z"
}

Show the QR code (qr_code_image_base64, a base64-encoded PNG image) and the PIX copia e cola code (copy_paste_code) so your customer can pay from their bank.

The instructions

instructions is a map of strings whose keys depend on the method. Show them as-is to whoever is paying:

KeyWhat it is
amount, currencyWhat gets paid: always your order amount.
copy_paste_codeThe code to paste into the banking app (PIX copia e cola).
qr_code_image_base64The QR code, as a base64-encoded PNG image.
bank_accountThe account to transfer to.
referenceThe reference the transfer must include.
payment_urlA link to pay.
expires_atUntil when payment is possible, if the method expires.

A new key may appear in the future. Show it or ignore it, but don't fail because of it.

No fees for your customer

instructions.amount is always your order amount. If the bank charges to receive, Caibo absorbs that fee: your customer pays 1,000.00, not 1,002.70, and your balance receives the value of the full 1,000.00.

On a method with a Caibo fee (fee_bps in capabilities, today PayPal and Zelle), your customer still pays exactly the amount, and the fee comes off what you're credited: the funding account shows it in fee and what you'll receive in net_amount. See Collect with PayPal and Zelle.

Wait for the payment

Listen for webhooks, or query the account and its events:

  1. funding_account.active includes instructions. The amount is in instructions.amount; the account's amount is in GET /v1/funding-accounts/{id}.
  2. payin.completed arrives when the bank confirms the payment. Its data is the credited pay-in, with what was credited to your balance.
  3. If the payment expires or doesn't go through, payin.failed arrives and the account moves to closed.
curl "$CAIBO_API/v1/events?resource_id=fa_01m3sg9w0000000000000000" \
  -H "Authorization: Bearer $CAIBO_API_KEY"

Withdraw a request

If nobody has paid yet, you can withdraw the request when its rail allows it (for example, an Interac request for money the payer hasn't approved yet; Canadian rails run in sandbox only for now):

curl -X POST "$CAIBO_API/v1/funding-accounts/fa_01m3sg9w0000000000000000/cancel" \
  -H "Authorization: Bearer $CAIBO_API_KEY" \
  -H "Idempotency-Key: withdraw-order-1042"
  1. The response is 202 with cancellation.status: requested. We ask the provider to withdraw it (funding_account.cancel_requested).
  2. When the provider confirms it ended without a payment, payin.failed arrives with failure_code: cancelled_at_provider, the account moves to closed and cancellation.status to cancelled. Nothing is credited; no funds were held either.
  3. A payment always wins: if the payer paid first, it's credited like any other (payin.completed) and cancellation.status moves to refused (already_paid or refused_by_provider).

If it can't be withdrawn, the response is 409 funding_account_not_cancellable with the reason in reasons: not_a_request, not_open_yet, provider_cannot_cancel, already_paid, already_closed or managed_by_remittance.

Errors on create

HTTPcodeWhy
400invalid_parameter · payerA payer detail is missing, unrecognized, or malformed. Or you sent payer without amount.
400invalid_requestamount isn't a positive decimal, or the currency doesn't exist.
422amount_requiredThat method and currency are collected with an amount: send amount.
422one_payment_unavailableThat method and currency open an account without an amount: don't send amount.
422amount_below_minimumThe amount is below the method's minimum (min_amount on the capability; 32.70 PEN by bank transfer in Peru).
422amount_above_maximumThe amount is above the method's maximum (max_amount on the capability).
422amount_below_feeThe amount doesn't cover the method's fee (fee_bps and fee_fixed on the capability).
422unsupported_methodThat method and currency aren't available for collecting.
503operation_suspendedIt's suspended for now.

If the account can't be opened, it's still created and moves to failed with a failure_code (provider_rejected, provider_unavailable, provider_amount_mismatch, no_route). In that case, create another one with a new Idempotency-Key.

Sur cette page