Customer Payouts
Customer Payouts let you send outgoing IBAN transfers to your customers in batches of up to 100 transactions. This feature is designed for merchants in Costa Rica that need to issue mass payments to their customers efficiently and securely.
Related API reference
- Create a customer payout batch
- Get a customer payout batch status
- List customer payout batches
- Get the customer payouts configuration
- Get customer payout statistics
- Get the customer payout origin account balances
- Customer Payouts
Available endpoints
Every endpoint requires your Secret API Key (Authorization: Bearer onvo_..._secret_key_...).
| Method | Path | Use |
|---|---|---|
POST | /v1/customer-payouts/batch | Creates a batch of transfers. |
GET | /v1/customer-payouts/batch/{batchId} | Returns the status of the batch and of each transaction. |
GET | /v1/customer-payouts/account | Lists your account's batches in the key's mode, with pagination. |
GET | /v1/customer-payouts/config | Returns your account's Customer Payouts configuration. |
GET | /v1/customer-payouts/statistics | Returns counts and amounts grouped by batch status. |
GET | /v1/customer-payouts/balance | Returns the balance of each origin account, what is in progress, and what you can still send. |
Prerequisites
| Requirement | test mode | live mode |
|---|---|---|
| Costa Rica account: the feature is only available for accounts registered in Costa Rica. | Yes | Yes |
| Secret API Key: every operation is authenticated with your Secret API Key for that mode. | Yes | Yes |
| Feature enabled: activated by the ONVO team. Contact support to request it. | No | Yes |
| Origin account configured per currency: for every currency you will use (USD and/or CRC), ONVO configures the origin IBAN and its holder's identification. If either is missing for the batch currency, the batch is rejected. | No | Yes |
You can start integrating in test mode without any prior setup from ONVO. Activation and origin accounts are only needed to go live, and you can check them with GET /v1/customer-payouts/config.
GET /v1/customer-payouts/config returns the same configuration with the test key and the live key, and it always describes the live state. If your account has no configuration yet, your first test batch creates a default one with enabled: false and no origin accounts. That does not enable live mode.
Supported currencies
- USD: US dollars.
- CRC: Costa Rican colones.
In live mode, each currency needs its own origin account configured. Not every destination account accepts USD: if the recipient's account does not support the currency, the transaction fails individually with the code returned by the banking network.
Limits and restrictions
Batch limits
- Minimum 1 and maximum 100 transactions per batch.
- All transactions in a batch must use the same currency.
Transaction limits
Amounts are sent in cents, as a numeric string (for example, "10000").
USD (US dollars):
- Minimum: $1.00 USD (
100cents). - Maximum: $500,000.00 USD (
50000000cents).
CRC (Costa Rican colones):
- Minimum: ₡500.00 CRC (
50000cents). - Maximum: ₡250,000,000.00 CRC (
25000000000cents).
IBAN format
- Only Costa Rican IBANs are accepted.
- Format:
CR[0-9]{2}[0-9]{15,22}. - Example:
CR05015202001026284066.
Transaction fields
| Field | Required | Description |
|---|---|---|
recipientIban | Yes | Recipient's Costa Rican IBAN. |
recipientIdType | Yes | Recipient's identification type, from 0 to 6. See identification types. |
recipientIdNumber | Yes | Identification number, in the format that matches recipientIdType. |
recipientName | No | Name of the destination account holder, 8 to 150 characters. Recommended: if you omit it, a generic name derived from the identification is sent. |
amount | Yes | Amount in cents, as a numeric string. |
currency | Yes | USD or CRC. |
reference | No | Transfer description, 15 to 200 characters. If you omit it, Customer payout - {transactionId} is used. |
The body does not accept extra fields: any property not listed in this table returns a 400 error.
Identification types
The recipientIdType field sets the format recipientIdNumber must have:
| Value | Type | Format | Example |
|---|---|---|---|
0 | National ID | 0#-####-#### | 01-1393-1919 |
1 | Resident (DIMEX) | 1 followed by 11 digits | 129381746112 |
2 | State entity | 2-###-###### | 2-100-000001 |
3 | Legal entity | 3-###-###### | 3-101-212393 |
4 | Autonomous institution | 4-000-###### | 4-000-042141 |
5 | Diplomat | 5 followed by 11 digits | 512345678901 |
6 | Foreigner | 9 followed by up to 17 characters | 9CA9381461127 |
Fees and balance
Each transaction may carry a fee, according to the configuration ONVO set for your account (feeType, feeAmount, minFee, maxFee, and feeCurrency in GET /v1/customer-payouts/config):
fixed:feeAmountis a fixed amount in cents per transaction.percentage:feeAmountis in basis points (150= 1.50% of the amount), bounded byminFeeandmaxFeewhen they are set.
The fee is calculated and frozen when the batch is created. The create response includes totalCommissionAmount and commissionCurrency, and each transaction in the batch status includes commissionAmount and commissionCurrency.
When the batch is created, the amount of each transaction and its fee are debited from your balance. If a transaction fails, or the whole batch is rejected, the amount and the fee of those transactions are returned to your balance. A completed transaction keeps the debit.
Origin account balance
GET /v1/customer-payouts/balance tells you how much you can send from each configured origin account before you create a batch.
curl https://api.onvopay.com/v1/customer-payouts/balance \
-H "Authorization: Bearer $ONVO_SECRET_KEY"
200 response:
{
"data": [
{
"currency": "CRC",
"iban": "CR05015202001026284066",
"status": "available",
"balance": "1500000",
"pendingAmount": "250000",
"availableAmount": "1250000"
},
{
"currency": "USD",
"iban": "CR05015202001026284077",
"status": "unavailable",
"balance": null,
"pendingAmount": "0",
"availableAmount": null
}
],
"retrievedAt": "2026-10-27T00:46:58.007Z"
}
Each entry is one currency with a configured origin account:
| Field | Description |
|---|---|
currency | Currency of the origin account (CRC or USD). |
iban | IBAN of the origin account your transfers in that currency are sent from. |
status | available, or unavailable when the balance could not be read right now. |
balance | Available balance of the account, in cents. null when status is unavailable. |
pendingAmount | Sum, in cents, of your transfers from that account that are still pending or processing. Fees are not included: they are charged to your ONVO balance. |
availableAmount | balance minus pendingAmount: what you can still send. It can be negative when in-progress transfers exceed the balance. null when status is unavailable. |
- It is a read at request time and reserves no funds: creating a batch still runs its own checks.
- If an account comes back
unavailable, retry later. One currency failing does not affect the others. - Only currencies with a configured origin account are listed.
- In
testmode, each test origin account has a simulated balance of 10,000,000.00 andpendingAmountfollows your test batches. - If your account has no Customer Payouts configuration, you get a
400withcode: "customer_payouts.not_configured". The feature does not need to be enabled.
Batch statuses
A payout batch moves through the following statuses:
pending: batch created, waiting to be processed.processing: the batch was submitted and its transactions are being processed.completed: every transaction finished processing. This does not mean all of them succeeded: check the status of each transaction.failed: the whole batch was rejected on submission or could not be processed. Its transactions end upfailed.
Transaction statuses
Each transaction within a batch can have the following statuses:
pending: transaction created or registered, waiting to be paid.processing: the transaction is held in processing.completed: transaction completed successfully.failed: the transaction was rejected. CheckerrorCodeanderrorMessage.
completed and failed are final: a transaction that reached one of them never changes again.
Asynchronous processing
Batches are processed asynchronously, in both live and test mode:
- When you create a batch, you get a
201response with thebatchIdand statuspending. The outcome is never in the create response. - The batch is processed in the background.
- Query
GET /v1/customer-payouts/batch/{batchId}until the batch reachescompletedorfailed. Each query of an in-flight batch also refreshes its status. - Each transaction is resolved individually and has its own outcome.
Do not assume a fixed processing time: poll until the batch reaches a final status.
Test mode
In test mode the payout is simulated end to end: no money moves and the destination account is never contacted. Even so, the batch goes through the same statuses as a real one, so the integration you build against test mode is the same one that works in production.
Use your test Secret API Key (onvo_test_secret_key_...). You do not need ONVO to enable the feature or configure origin accounts: test batches are always sent from these test origin accounts, even if your account already has real origin accounts configured.
| Currency | Origin identification | Origin IBAN |
|---|---|---|
| CRC | 3-101-000001 | CR00000000000000000001 |
| USD | 3-101-000001 | CR00000000000000000002 |
Fees are still calculated with your account's configuration, so your tests show the fee you will be charged in production. If ONVO has not configured your account yet, the default fee applies.
The destination IBAN decides the outcome
Test mode only accepts the IBANs in this table. Any other destination is rejected with customer_payouts.invalid_testing_iban, and the error's detail field lists the valid IBANs. The transaction currency must match the IBAN's; otherwise you get customer_payouts.invalid_testing_iban_currency.
| Test IBAN | Currency | What it simulates |
|---|---|---|
CR46016111095130920101 | CRC | The transfer completes. |
CR46016111095130920102 | USD | The transfer completes. |
CR46016111095130920103 | CRC | The transfer is rejected for insufficient funds. |
CR46016111095130920104 | USD | The transfer is rejected for insufficient funds. |
CR46016111095130920105 | CRC | The transfer is held, then rejected for an invalid destination account. |
CR46016111095130920106 | CRC | The transfer stays pending, then completes. |
CR46016111095130920107 | CRC | The whole batch is rejected on submission. |
Status sequence for each scenario
| IBAN | Transaction statuses | Final batch status |
|---|---|---|
…0101, …0102 | pending → completed | completed |
…0103, …0104 | pending → failed | completed |
…0105 | pending → processing → failed | completed |
…0106 | pending → pending → completed | completed |
…0107 | pending → failed | failed |
…0105is the only scenario that showsprocessingon the transaction. Together with…0106it covers both intermediate readings your integration has to handle.- The two-step scenarios (
…0105and…0106) take about twice as long as the rest. This is a fixed internal cadence, not a model of how long a real transfer takes. - If a batch includes a
…0107IBAN, the whole batch is rejected and every transaction ends upfailed, including those that use other IBANs. - The
…0103and…0104scenarios show that acompletedbatch can contain failed transactions.
What a failed transaction reports
| IBAN | errorCode | errorMessage |
|---|---|---|
…0103, …0104 | 21 | Fondos Insuficientes |
…0105 | 4 | Cuenta destino invalida |
…0107 | -1 | Error en el envio del lote: simulacion de rechazo en modo prueba |
The codes and messages are the ones the banking network returns, which is why they arrive in Spanish and unaccented in production too. Treat errorCode as an opaque string: this set is what test mode can produce, not the full list of rejections a real transfer can hit.
A failed transaction in test mode also returns the amount and the fee to your test balance, just like in production.
Recommended integration flow
- Check configuration (
liveonly): queryGET /v1/customer-payouts/configto confirmenabledistrueand the origin account for the currency is configured. Intestmode you can skip this step. - Check the balance (optional): query
GET /v1/customer-payouts/balanceand confirm the currency'savailableAmountcovers the batch total. - Prepare the batch: gather between 1 and 100 transactions in the same currency.
- Create the batch: send it with
POST /v1/customer-payouts/batch. - Store the
batchId: you need it to query the outcome. - Check status: use
GET /v1/customer-payouts/batch/{batchId}until the batch iscompletedorfailed. - Handle outcomes: process each transaction according to its status. Failed ones carry
errorCodeanderrorMessage, and their amount and fee were already returned to your balance.
Create a batch
curl https://api.onvopay.com/v1/customer-payouts/batch \
-X POST \
-H "Authorization: Bearer $ONVO_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"transactions": [
{
"recipientIban": "CR46016111095130920101",
"recipientIdType": 0,
"recipientIdNumber": "01-1393-1919",
"recipientName": "María Rodríguez Solano",
"amount": "100000",
"currency": "CRC",
"reference": "Monthly supplier payment"
}
]
}'
201 response:
{
"batchId": "batch_1727800000000_a1b2c3d4",
"status": "pending",
"transactionCount": 1,
"totalAmount": "100000",
"totalCommissionAmount": "300",
"commissionCurrency": "CRC",
"currency": "CRC",
"createdAt": "2026-10-01T16:00:00.000Z"
}
Get a batch status
curl https://api.onvopay.com/v1/customer-payouts/batch/batch_1727800000000_a1b2c3d4 \
-H "Authorization: Bearer $ONVO_SECRET_KEY"
200 response:
{
"batchId": "batch_1727800000000_a1b2c3d4",
"status": "completed",
"totalAmount": "100000",
"currency": "CRC",
"createdAt": "2026-10-01T16:00:00.000Z",
"processedAt": "2026-10-01T16:00:01.000Z",
"completedAt": "2026-10-01T16:00:06.000Z",
"transactions": [
{
"transactionId": "txn_1727800000000_e5f6a7b8",
"recipientIban": "CR46016111095130920101",
"amount": "100000",
"currency": "CRC",
"commissionAmount": "300",
"commissionCurrency": "CRC",
"status": "completed",
"reference": "Monthly supplier payment",
"errorCode": null,
"errorMessage": null,
"createdAt": "2026-10-01T16:00:00.000Z",
"completedAt": "2026-10-01T16:00:06.000Z"
}
]
}
If the batch does not exist or belongs to another account, you get a 404.
Errors when creating a batch
There are three shapes of 400 error, depending on where the problem is detected.
Body validation (IBAN format, identification, reference, recipientName, currency, or fields that are not allowed). message is a list with one entry per problem:
{
"statusCode": 400,
"message": ["transactions.0.Invalid IBAN format"],
"error": "Bad Request"
}
Batch or account rules. message is a string and there is no code. The activation and origin account errors only happen in live mode:
message | Cause |
|---|---|
Customer payouts not configured for this account. Please contact the support team. | The feature is not configured for your account (live only). |
Customer payouts feature is disabled for this account. Please contact the support team. | The feature is disabled (live only). |
Customer payouts are only available for Costa Rica accounts | The account is not from Costa Rica. |
Origin ID for {currency} is not configured for this account | The origin identification for the currency is missing (live only). |
Origin IBAN for {currency} is not configured for this account | The origin IBAN for the currency is missing (live only). |
Maximum batch size is 100 transactions | The batch exceeds 100 transactions. |
All transactions in a batch must use the same currency | The batch contains more than one currency. |
Minimum amount is {min} cents for {currency} | An amount is below the minimum. |
Maximum amount is {max} cents for {currency} | An amount is above the maximum. |
Test mode. Includes a stable code:
code | Cause |
|---|---|
customer_payouts.invalid_testing_iban | An IBAN is not one of the test IBANs. detail lists the valid ones. |
customer_payouts.invalid_testing_iban_currency | The currency does not match the test IBAN's. |
{
"statusCode": 400,
"type": "OnvoAPIError",
"code": "customer_payouts.invalid_testing_iban_currency",
"message": "The provided transactions contain valid recipientIban number(s), but the currency does not match, make sure to use CRC or USD. Also check the currency is the right for the testing IBAN number provided.",
"detail": "CR46016111095130920102 simulates USD",
"path": "/v1/customer-payouts/batch",
"timestamp": "2026-10-01T16:00:00.000Z"
}
In test mode, the test IBAN check runs before the other batch rules.
Important considerations
- One currency per batch: you cannot mix USD and CRC in the same batch.
- Outcome is always asynchronous: the create response always returns
pending; you get the outcome by querying the batch. - A
completedbatch does not mean full success: check the individual status of each transaction. - Per-transaction rejections: errors such as an invalid destination account or a currency the destination account does not support are reported on the transaction (
errorCode/errorMessage), not when the batch is created. - Completed transfers cannot be reversed: a completed transfer cannot be reversed through the API.
- Statistics:
GET /v1/customer-payouts/statisticsgroups all of the account's batches by status, without separatingtestandlivemode. For per-mode reports, useGET /v1/customer-payouts/account.