Skip to content
developers

Payout

Payouts and method selection

The anatomy of POST /v1/transfer, how zulu picks between Bre-B, ACH and manual payment, the order it validates in and what to do with each response.

POST/v1/transferWithdraw COP balanceProduction

The request

POST /v1/transfer

curl https://sandbox.zulu.com.co/v1/transfer \
  -H "Authorization: Bearer $ZULU_ACCESS_TOKEN" \
  -H "X-API-Key: $ZULU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": 150000,
  "note": "Pago factura 1234",
  "destination": {
    "entityType": "person",
    "documentType": "CC",
    "documentNumber": "1020304050",
    "firstName": "Luis",
    "lastName": "Gómez",
    "bankAccount": {
      "bankCode": "0007",
      "accountType": "ahorros",
      "accountNumber": "0012345678"
    }
  }
}'
  • amount: in COP, as a JSON number, up to 2 decimals. Only a whole-peso amount can go out by online ACH.
  • note: a free comment kept on the withdrawal.
  • destination: the beneficiary (a person with names, or a company with companyName) and their account. With breBKey, the withdrawal can go out over Bre-B.

The balance holder comes from the access token: you never send it in the body.

How the method is picked

  1. If you send breBKey and the amount is within the Bre-B maximum, it goes out by BRE_B.
  2. Otherwise it goes out by online ACH if the user may disperse by ACH, the bank (bankCode) is in the catalog, the account is savings or checking, the amount is in whole pesos and it fits today's caps.
  3. In any other case, or if the online transfer could not go out, it goes MANUAL.
RuleOperations
Bre-B accepts up to 12,110,000 COP per transfer: a withdrawal with breBKey and an amount up to 12,110,000 goes Bre-B; above it, ACH and manual payment are evaluated.createQrCodecreateTransfersimulateBreBTransferIn
Online ACH only with whole pesos: an amount with decimals (for example 150000.50) goes MANUAL.createTransfer
Online ACH requires canUseAchDispersion, a bank with a 4-digit ACH code, a savings or checking account, up to 250,000,000 COP and room in the daily caps (count and sum). If anything fails, or the dispatch does not queue, the withdrawal goes MANUAL.createTransfer
Initial status: Bre-B CREATED; ACH and manual IN_PROGRESS.createTransfer

Validation order

zulu validates in this order and answers the first failure, recording nothing:

RuleOperations
A withdrawal amount is rounded to cents (2 decimals), like production's round2.createTransfer
Dispersion fee = round(fixed + amount × rate / 100). The balance must cover amount + fee, and that total is what insufficient COP balance to withdraw shows.createTransfer
Validation order: verified user (403) → origin entity (422) → verified beneficiary and name (422) → method → balance with the fee (422) → COP account (422) → bank and account type (422) → order and debit → dispatch. The first failure answers; nothing is recorded.createTransfer

The response

Response 201

{
  "transactionId": "SBX-OR-NPTRFI261124K7Q2M9-X4",
  "status": "IN_PROGRESS",
  "method": "ACH"
}

Keep transactionId: with it you read the withdrawal and recognize it in the TRANSACTIONS webhook.

Statuses

StatusWhat it means
CREATEDWithdrawal created; the Bre-B transfer is in flight.
IN_PROGRESSBeing paid (ACH or manual).
SENTThe money was sent to the beneficiary's bank.
COMPLETEDWithdrawal completed.
REJECTEDWithdrawal rejected; rejectionReason says why.
RuleOperations
Simulated timings: Bre-B COMPLETED after 3 s; ACH SENT after 30 s and COMPLETED after 60 s; manual SENT at the next 15:30 business cutoff and COMPLETED at 09:00 of the next business day (with Colombian holidays). advanceTransaction skips the wait.createTransferlistTransactionsgetTransactionadvanceTransaction
A REJECTED withdrawal returns the debit to the balance in the sandbox. In production operations performs the reversal.getTransactionadvanceTransaction

Retries without duplicates

Every call creates a new withdrawal. If you get a 5xx or a timeout, do not retry until you know whether the withdrawal was created:

  • In production, confirm the withdrawal in zulu's customer portal (or with the zulu team) before sending it again: the API read is still Sandbox · coming soon.
  • In the sandbox, look it up with GET /v1/transactions?search=… (your note or the beneficiary's document, bounded to today), or send Idempotency-Key and retry with the same key.

Errors

HTTPerrorcauseDescription
400BadRequestApiErrorerror in struct validationOne or more fields fail their validation. values carries one message per field, keyed by its JSON path, naming the Go validator that failed.
400BadRequestApiErrorinvalid json body: %sThe body is not valid JSON, or a field has the wrong type (a string where a number goes, for example). Answered before the fields are validated.
403ForbiddenApiErrorthe user is not verifiedThe user behind the credentials is not verified. In the sandbox: the workspace "verified" setting.
409ResourceConflictApiErroridempotency key "%s" is still being processedAnother call with the same Idempotency-Key is still running. Retry in a few seconds to receive its response.
422UnprocessableEntityApiErroridempotency key "%s" was used with a different requestThe Idempotency-Key was already used in the last 24 hours with a different body or operation. Use a new key for every distinct operation.
422UnprocessableEntityApiErrorthe user does not have an entity to withdraw fromThe user has no entity to withdraw from.
422UnprocessableEntityApiErrorthe beneficiary with document "%s" is not verifiedThe beneficiary registered with that document is not verified. Test data: document 1111111111.
422UnprocessableEntityApiErrorthe name does not match the beneficiary registered with document "%s"The name sent shares no word with the registered beneficiary's (format, accents and order are tolerated). Test data: document 2222222222, registered as "Ana Pérez".
422UnprocessableEntityApiErrorinsufficient COP balance to withdraw %.2fThe COP balance does not cover the amount plus the dispersion fee. The figure in the message is that sum.
422UnprocessableEntityApiErrorthe user does not have a COP balance accountThe user has no COP balance account. In the sandbox: the workspace "COP account" setting.
422UnprocessableEntityApiErrorbank with code "%s" is not supportedThe bankCode is not an available bank (see GET /v1/banks). Test data: 9999.
422UnprocessableEntityApiErroraccount type "%s" is not supportedUnsupported account type. Body validation stops it first (400), so in practice it does not appear.
422UnprocessableEntityApiErrordocument type "%s" is not supportedThe documentType of a beneficiary being registered is not in the catalog (GET /v1/document-types) or does not apply to its entity type (NIT is for companies). It is checked on registration, like the bank; an already registered beneficiary keeps its document.
422UnprocessableEntityApiErrordestination field "%s" is not validA value being registered can not be stored: the account must have 1 to 20 digits (spaces and hyphens are ignored), the document 1 to 20 characters, and names can not be blank (up to 80 characters; the company name up to 200). The message names the field.
500InternalServerApiErrorunexpected error %sThe withdrawal failed at an internal step. Check the withdrawal before retrying so the payment is not duplicated.