Payout / Use cases
Instant payments
Pay instantly from your product (marketplace withdrawals, refunds, disbursements) and show your user an honest status at every moment.
A marketplace lets its sellers withdraw their balance whenever they want, and wants the money to arrive instantly when possible, with a clear status when not.
The flow
- The seller asks to withdraw; your system reserves the amount in their internal balance.
- You call
POST /v1/transferwith their Bre-B key if they have one; otherwise with their account. - You show the status from
methodandstatus, and update it with theTRANSACTIONSwebhook.
1. Request the withdrawal
POST/v1/transferWithdraw COP balanceProduction
With breBKey and an amount within the Bre-B maximum, the money arrives in seconds. Without a key, a whole-peso amount to a bank in the catalog goes out by online ACH the same day.
2. The status you see and the one you show
method | status | What to show |
|---|---|---|
BRE_B | CREATED | "Sending… arrives in seconds" |
ACH | IN_PROGRESS / SENT | "Sent to your bank, arrives today" |
MANUAL | IN_PROGRESS | "Processing, arrives next business day" |
| any | COMPLETED | "Paid" |
| any | REJECTED | "We could not pay: check your account" and release the reserved balance |
3. Timeouts without paying twice
A withdrawal that answers 5xx or does not answer may have been created. Do not let the seller request it again until you confirm it: read Retries without duplicates.
| HTTP | error | cause | Description |
|---|---|---|---|
| 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. |
| 500 | InternalServerApiError | unexpected error %s | The withdrawal failed at an internal step. Check the withdrawal before retrying so the payment is not duplicated. |
| 500 | InternalServerApiError | [code:1] unexpected error | Internal error. On operations that move money, check the state before retrying so the operation is not duplicated. |
4. Test it
| Field | Value | Effect | Operations |
|---|---|---|---|
destination.bankAccount.accountNumber | 0000000001 | The withdrawal goes out by ACH (IN_PROGRESS), reaches SENT and ends REJECTED; the debit is reversed and a webhook is sent for each change. | createTransfergetTransactionadvanceTransaction |
destination.bankAccount.accountNumber | 0000000002 | The ACH dispatch does not queue: the withdrawal continues as a manual payment and answers {status: IN_PROGRESS, method: MANUAL}. | createTransfer |
destination.breBKey.key | @failbreb | The Bre-B transfer fails: the withdrawal is left for manual payment and answers {status: CREATED, method: MANUAL}, as in production. | createTransfer |
destination.documentNumber | 1111111111 | The beneficiary is registered but not verified: 422 the beneficiary with document "1111111111" is not verified. | createTransfer |
destination.documentNumber | 2222222222 | The beneficiary is already registered as "Ana Pérez". A name sharing a word (regardless of accents, case or order) passes; any other answers 422 the name does not match the beneficiary registered with document "2222222222". | createTransfer |
destination.bankAccount.bankCode | 9999 | The bank is not in the catalog: 422 bank with code "9999" is not supported. | createTransfer |
Test every row of the status table with the test data and advance the withdrawals with the simulator to see each transition:
POST/v1/sandbox/transactions/{transactionId}/advanceAdvance a transactionSandbox only