Skip to content
developers

Payout

Withdraw COP balance

POST/v1/transferProduction

Base URL
Sandboxhttps://sandbox.zulu.com.co/v1
Productionhttps://api.zulutransfer.com/v1

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: when breBKey is 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:

StatusMeaning
CREATEDWithdrawal created; the Bre-B transfer is in flight.
IN_PROGRESSWithdrawal being paid (ACH or manual).
SENTThe money was sent to the beneficiary's bank.
COMPLETEDWithdrawal completed.
REJECTEDWithdrawal 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

Authorization: Bearer <access_token> (401 when missing or expired) and X-API-Key (403 when missing or not matching).

Request

Headers

  • Idempotency-KeystringoptionalSandbox · coming soon
    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 Idempotent-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

  • amountnumberrequired
    COP amount to withdraw, greater than 0. To go out by online ACH it must be in whole pesos; it is rounded to cents.
    > 0Example: 150000
  • notestringoptional
    Free-text comment recorded on the withdrawal.
    Example: "Pago factura 1234"
  • destinationobjectrequired
    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.
    Show 10 fields
    • entityTypestringrequired
      Beneficiary type.

      Values

      • personNatural person (an individual).
      • companyCompany (legal entity).
    • documentTypestringrequired
      Beneficiary document type (for example CC, CE, PPT, PAS or NIT; GET /v1/document-types).
      min. 1 charactersExample: "CC"
    • documentNumberstringrequired
      Document number. For companies the NIT is accepted with or without its check digit.
      min. 1 charactersExample: "1020304050"
    • firstNamestringoptional
      First name(s). Required when entityType is person.
      Example: "Luis"
    • middleNamestringoptional
      Middle name.
    • lastNamestringoptional
      Last name. Required when entityType is person.
      Example: "Gómez"
    • secondLastNamestringoptional
      Second last name.
    • companyNamestringoptional
      Company name. Required when entityType is company.
      Example: "Acme S.A.S."
    • bankAccountobjectrequired
      Colombian (COP) bank account of the beneficiary.
      Show 3 fields
      • bankCodestringoptional
        Bank code (4-digit ACH code, GET /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 without breBKey stays MANUAL.
        Example: "0807"
      • accountTypestringrequired
        Account type. savings/saving mean ahorros and checking means corriente.

        Values

        • ahorrosSavings account.
        • corrienteChecking account.
        • savingsAlias of ahorros.
        • savingAlias of ahorros.
        • checkingAlias of corriente.
      • accountNumberstringrequired
        Account number. Leading zeros are significant.
        min. 1 charactersExample: "0012345678"
    • breBKeyobjectoptional
      Bre-B key of the account sent in bankAccount. 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 from bankAccount, so it must be the account the key points to. When sent, all of its fields are required. Get all four with GET /v1/bre-b/keys/{key}.
      Show 4 fields
      • keystringrequired
        The Bre-B key.
        min. 1 charactersExample: "@luisgomez"
      • keyTypestringrequired
        Key type. The public vocabulary (ALPHA, PHONE, EMAIL, DOCUMENT, MERCHANT) and GOU's codes (1 document … 5 merchant) are accepted; resolveBreBKey returns it ready to send.
        min. 1 charactersExample: "ALPHA"
      • bankOrgIdstringrequired
        Tax id (NIT) of the key's bank.
        min. 1 charactersExample: "890903938"
      • bankCamerastringrequired
        Clearing house of the key.
        min. 1 charactersExample: "TFY"

Responses

  • 201Withdrawal created.

    Body
    • transactionIdstringrequired
      Identifier of the withdrawal in zulu (the order id). An alphanumeric code, not a UUID; in the sandbox it starts with SBX-.
      Example: "SBX-OR-NPTRFI261124K7Q2M9-X4"
    • statusstringrequired
      Withdrawal status.

      Values

      • 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.
    • methodstringrequired
      How the money is sent.

      Values

      • BRE_BBre-B: breBKey was 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.
  • 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.

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.

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"
}