Skip to content
developers

Payout / Use cases

Payroll over Bre-B

Pay payroll to your employees' Bre-B keys in seconds, confirming each holder before paying, with a fallback that never leaves anyone unpaid.

A company pays its employees twice a month. Every employee registered their Bre-B key (their mobile number, their e-mail or an alphanumeric one) and wants the payment within seconds, on a Saturday too.

The flow

  1. Resolve each employee's key and confirm the holder is them.
  2. Send one withdrawal per employee with breBKey.
  3. Follow the statuses: Bre-B completes in seconds; a manual fallback arrives at the next business cutoff.

1. Confirm each key

GET/v1/bre-b/keys/{key}Resolve a Bre-B keySandbox · coming soon

Compare the resolution's documentNumber and fullName with your employee records before paying. If they do not match, do not pay: the key may have changed hands.

2. One withdrawal per employee

pay-payroll.js

export async function payEmployee(employee, resolution, token) {
  const response = await fetch('https://sandbox.zulu.com.co/v1/transfer', {
    method: 'POST',
    headers: { Authorization: `Bearer ${token}`, 'X-API-Key': process.env.ZULU_API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({
      amount: employee.netPayCop,
      note: `Payroll ${employee.period}`,
      destination: {
        entityType: 'person',
        documentType: resolution.documentType,
        documentNumber: resolution.documentNumber,
        firstName: employee.firstName,
        lastName: employee.lastName,
        bankAccount: { bankCode: resolution.bankCode, accountType: resolution.accountType, accountNumber: resolution.accountNumber },
        breBKey: { key: resolution.key, keyType: resolution.keyType, bankOrgId: resolution.bankOrgId, bankCamera: resolution.bankCamera },
      },
    }),
  });

  return response.json(); // { transactionId, status, method }
}

Send the withdrawals one by one or in small groups, and honor Retry-After if you get a 429.

3. Statuses and fallback

ResponseWhat it means
CREATED + BRE_BIn flight over Bre-B; completes in seconds.
CREATED + MANUALBre-B did not go out: zulu pays it through the traditional channel. The employee gets paid anyway.
IN_PROGRESS + ACH or MANUALThe amount was above the Bre-B maximum and went out another way.
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
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

4. Test it

In the sandbox, mix into your batch key @failbreb (manual fallback), an amount above the Bre-B maximum and document 1111111111 (unverified beneficiary), and check your system reports each case.