Authorization: Bearer <access_token> (401 when missing or expired) and X-API-Key (403 when missing or not matching).
Withdraws COP balance to a bank account in Colombia, your own or a third party's.
Balance holder. Comes from the access token: the withdrawal is debited from the COP account of your credentials' user. It is never sent in the body.
Beneficiary. Identified by document type and number. It may be the holder itself (one of its accounts) or a third party:
- If already registered, it must be verified and its name must match the one sent (format, accents and order are tolerated).
- If not registered, it is registered with the data sent (names or company name).
- If the bank account is not registered for the beneficiary, it is registered.
Payout method. zulu picks how the money goes out and reports it in method:
BRE_B: whenbreBKeyis sent and the amount is within the Bre-B maximum (12,110,000 COP).ACH: online transfer, when the beneficiary's bank (bankCode) is known and supported, the amount is in whole pesos and within the current caps (GET /v1/limits).MANUAL: in any other case, or when the online transfer could not go out. The withdrawal stays in progress and zulu pays it through the traditional channel; it is not an error.
Balance. The amount (plus the dispersion fee, when one applies) is debited from the COP balance when the withdrawal is created. If the balance is not enough, the withdrawal is refused and nothing is recorded.
Statuses. status uses the same vocabulary in every response and webhook:
| Status | Meaning |
|---|---|
CREATED | Withdrawal created; the Bre-B transfer is in flight. |
IN_PROGRESS | Withdrawal being paid (ACH or manual). |
SENT | The money was sent to the beneficiary's bank. |
COMPLETED | Withdrawal completed. |
REJECTED | Withdrawal rejected. |
Retries. Every call creates a new withdrawal. On a 5xx or a timeout, do not retry blindly: check its status before sending it again so the payment is not duplicated. In the sandbox you can send Idempotency-Key (coming to production).
Authentication
Request
Headers
- Idempotency key (up to 255 characters), valid for 24 hours per workspace. Repeating the call with the same key and body returns the original response with
Idempotency-KeystringoptionalSandbox · coming soonIdempotent-Replayed: true; a different body answers 422 and, while the first call is still running, 409. Production ignores it today: every call creates a new resource.max. 255 charactersExample: "7f9c2ba4-e88f-4c6e-9d43-6a8b8f0f5d21"
Body
- COP amount to withdraw, greater than 0. To go out by online ACH it must be in whole pesos; it is rounded to cents.
amountnumberrequired> 0Example: 150000 - Free-text comment recorded on the withdrawal.
notestringoptionalExample: "Pago factura 1234" - Beneficiary of the withdrawal and the account the money goes to. If already registered, it must be verified and its name must match the one sent (format, accents and order are tolerated); otherwise it is registered with this data.
destinationobjectrequiredShow 10 fields
- Beneficiary type.
entityTypestringrequiredValues
- personNatural person (an individual).
- companyCompany (legal entity).
- Beneficiary document type (for example
documentTypestringrequiredCC,CE,PPT,PASorNIT;GET /v1/document-types).min. 1 charactersExample: "CC" - Document number. For companies the NIT is accepted with or without its check digit.
documentNumberstringrequiredmin. 1 charactersExample: "1020304050" - First name(s). Required when
firstNamestringoptionalentityTypeisperson.Example: "Luis" - Middle name.
middleNamestringoptional - Last name. Required when
lastNamestringoptionalentityTypeisperson.Example: "Gómez" - Second last name.
secondLastNamestringoptional - Company name. Required when
companyNamestringoptionalentityTypeiscompany.Example: "Acme S.A.S." - Colombian (COP) bank account of the beneficiary.
bankAccountobjectrequiredShow 3 fields
- Bank code (4-digit ACH code,
bankCodestringoptionalGET /v1/banks). Required for the withdrawal to go out by ACH; Bre-B and manual payment do not need it. When omitted and the account is not registered with its bank in zulu, a withdrawal withoutbreBKeystaysMANUAL.Example: "0807" - Account type.
accountTypestringrequiredsavings/savingmeanahorrosandcheckingmeanscorriente.Values
- ahorrosSavings account.
- corrienteChecking account.
- savingsAlias of
ahorros. - savingAlias of
ahorros. - checkingAlias of
corriente.
- Account number. Leading zeros are significant.
accountNumberstringrequiredmin. 1 charactersExample: "0012345678"
- Bre-B key of the account sent in
breBKeyobjectoptionalbankAccount. Optional: when sent and the amount is within the Bre-B maximum, the withdrawal goes out by Bre-B. The key's account number and type are taken frombankAccount, so it must be the account the key points to. When sent, all of its fields are required. Get all four withGET /v1/bre-b/keys/{key}.Show 4 fields
- The Bre-B key.
keystringrequiredmin. 1 charactersExample: "@luisgomez" - Key type. The public vocabulary (
keyTypestringrequiredALPHA,PHONE,EMAIL,DOCUMENT,MERCHANT) and GOU's codes (1document …5merchant) are accepted;resolveBreBKeyreturns it ready to send.min. 1 charactersExample: "ALPHA" - Tax id (NIT) of the key's bank.
bankOrgIdstringrequiredmin. 1 charactersExample: "890903938" - Clearing house of the key.
bankCamerastringrequiredmin. 1 charactersExample: "TFY"
Responses
201Withdrawal created.
Body
- Identifier of the withdrawal in zulu (the order id). An alphanumeric code, not a UUID; in the sandbox it starts with
transactionIdstringrequiredSBX-.Example: "SBX-OR-NPTRFI261124K7Q2M9-X4" - Withdrawal status.
statusstringrequiredValues
- CREATEDCreated. For a Bre-B withdrawal, the transfer is in flight.
- IN_PROGRESSIn progress: the withdrawal is being paid (ACH or manual) or the conversion awaits settlement.
- SENTThe money was sent to the beneficiary's bank. Withdrawals only (never FX).
- COMPLETEDCompleted.
- REJECTEDRejected. The sandbox reverses the debit automatically; in production operations reverses it.
- How the money is sent.
methodstringrequiredValues
- BRE_BBre-B:
breBKeywas sent and the amount is within the Bre-B maximum. - ACHOnline ACH: a bank with an ACH code, whole pesos and within the current caps.
- MANUALManual payment: in any other case, or when the online transfer could not go out. Not an error.
- BRE_BBre-B:
400Invalid body or missing fields (including those of `breBKey` when it is sent).
401The access token is missing, invalid or expired.
403The `X-API-Key` is not valid (gateway), or the user of the credentials is not verified.
409Conflict with the current state.
422The operation can not be processed; nothing is recorded.
429Too many requests: wait the seconds in `Retry-After`.
500Internal error. Check the withdrawal's status before retrying.
Errors
The exact causes this operation can answer, from the error catalog. Compare error and the HTTP status; the cause text is stable but meant for people.
| HTTP | error | cause | Description |
|---|---|---|---|
| 400 | BadRequestApiError | error in struct validation | One or more fields fail their validation. values carries one message per field, keyed by its JSON path, naming the Go validator that failed. |
| 400 | BadRequestApiError | invalid json body: %s | The 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. |
| 403 | ForbiddenApiError | the user is not verified | The user behind the credentials is not verified. In the sandbox: the workspace "verified" setting. |
| 409 | ResourceConflictApiError | idempotency key "%s" is still being processed | Another call with the same Idempotency-Key is still running. Retry in a few seconds to receive its response. |
| 422 | UnprocessableEntityApiError | idempotency key "%s" was used with a different request | The Idempotency-Key was already used in the last 24 hours with a different body or operation. Use a new key for every distinct operation. |
| 422 | UnprocessableEntityApiError | the user does not have an entity to withdraw from | The user has no entity to withdraw from. |
| 422 | UnprocessableEntityApiError | the beneficiary with document "%s" is not verified | The beneficiary registered with that document is not verified. Test data: document 1111111111. |
| 422 | UnprocessableEntityApiError | the 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". |
| 422 | UnprocessableEntityApiError | insufficient COP balance to withdraw %.2f | The COP balance does not cover the amount plus the dispersion fee. The figure in the message is that sum. |
| 422 | UnprocessableEntityApiError | the user does not have a COP balance account | The user has no COP balance account. In the sandbox: the workspace "COP account" setting. |
| 422 | UnprocessableEntityApiError | bank with code "%s" is not supported | The bankCode is not an available bank (see GET /v1/banks). Test data: 9999. |
| 422 | UnprocessableEntityApiError | account type "%s" is not supported | Unsupported account type. Body validation stops it first (400), so in practice it does not appear. |
| 422 | UnprocessableEntityApiError | document type "%s" is not supported | The 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. |
| 422 | UnprocessableEntityApiError | destination field "%s" is not valid | A 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. |
| 500 | InternalServerApiError | unexpected error %s | The withdrawal failed at an internal step. Check the withdrawal before retrying so the payment is not duplicated. |
Also, like every authenticated endpoint: 401 Unauthorized, 403 Forbidden, 429 Too Many Requests (with Retry-After) and 500.
Examples
A person's bank account (ACH)201
Request
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"
}
}
}'Response 201
{
"transactionId": "SBX-OR-NPTRFI261124K7Q2M9-X4",
"status": "IN_PROGRESS",
"method": "ACH"
}A person's Bre-B key201
Request
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": 50000,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
},
"breBKey": {
"key": "@luisgomez",
"keyType": "ALPHA",
"bankOrgId": "890903938",
"bankCamera": "TFY"
}
}
}'Response 201
{
"transactionId": "SBX-OR-NPTRFI2611243HWD8T-6P",
"status": "CREATED",
"method": "BRE_B"
}A company's bank account201
Request
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": 2500000,
"destination": {
"entityType": "company",
"documentType": "NIT",
"documentNumber": "900123456",
"companyName": "Acme S.A.S.",
"bankAccount": {
"bankCode": "0051",
"accountType": "corriente",
"accountNumber": "4567890123"
}
}
}'Response 201
{
"transactionId": "SBX-OR-NPTRFI261124M2ZK4R-Q8",
"status": "IN_PROGRESS",
"method": "ACH"
}An amount with cents: manual payment201
Request
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.5,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 201
{
"transactionId": "SBX-OR-NPTRFI261124T5V8B1-3N",
"status": "IN_PROGRESS",
"method": "MANUAL"
}A Bre-B transfer that fails (test data `@failbreb`)201
Request
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": 50000,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
},
"breBKey": {
"key": "@failbreb",
"keyType": "ALPHA",
"bankOrgId": "890903938",
"bankCamera": "TFY"
}
}
}'Response 201
{
"transactionId": "SBX-OR-NPTRFI261124C4F7H2-9R",
"status": "CREATED",
"method": "MANUAL"
}Unsupported account type400
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "cuenta",
"accountNumber": "0012345678"
}
}
}'Response 400
{
"error": "BadRequestApiError",
"cause": "error in struct validation",
"values": {
"destination.bankAccount.accountType": "failed validation on the \"oneof\" tag with value required \"ahorros corriente savings saving checking\""
}
}A person without names400
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 400
{
"error": "BadRequestApiError",
"cause": "error in struct validation",
"values": {
"destination.firstName": "failed validation on the \"required_if\" tag with value required \"EntityType person\"",
"destination.lastName": "failed validation on the \"required_if\" tag with value required \"EntityType person\""
}
}Amount sent as text400
Request
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",
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 400
{
"error": "BadRequestApiError",
"cause": "invalid json body: json: cannot unmarshal string into Go struct field CreateTransferOutRequest.amount of type float64"
}Unverified user403
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 403
{
"error": "ForbiddenApiError",
"cause": "the user is not verified"
}Unverified beneficiary (`1111111111`)422
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1111111111",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 422
{
"error": "UnprocessableEntityApiError",
"cause": "the beneficiary with document \"1111111111\" is not verified"
}Name other than the registered one (`2222222222`)422
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "2222222222",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 422
{
"error": "UnprocessableEntityApiError",
"cause": "the name does not match the beneficiary registered with document \"2222222222\""
}Insufficient balance422
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "0007",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 422
{
"error": "UnprocessableEntityApiError",
"cause": "insufficient COP balance to withdraw 150000.00"
}Unsupported bank (`9999`)422
Request
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,
"destination": {
"entityType": "person",
"documentType": "CC",
"documentNumber": "1020304050",
"firstName": "Luis",
"lastName": "Gómez",
"bankAccount": {
"bankCode": "9999",
"accountType": "ahorros",
"accountNumber": "0012345678"
}
}
}'Response 422
{
"error": "UnprocessableEntityApiError",
"cause": "bank with code \"9999\" is not supported"
}