API versions
The Third-Party Payments API has two active versions. Both allow you to create disbursements by JSON or by file, to bank accounts or to BRE-B keys. The main difference is who defines the payment mode of disbursements from Wompi Account.
| Version | Production | Sandbox |
|---|---|---|
| v1 | https://api.payouts.wompi.co/v1 | https://api.sandbox.payouts.wompi.co/v1 |
| v2 | https://api.payouts.wompi.co/v2 | https://api.sandbox.payouts.wompi.co/v2 |
Payment mode
Disbursements from Wompi Account are processed in one of two modes:
| Value | Mode | What it means |
|---|---|---|
AGGREGATOR_DIRECT | Direct | The payment is disbursed with the funds of your Wompi Account. The fixed fee per transaction, the variable fee if applicable and VAT are charged. |
AGGREGATOR_MANAGED | Managed by Wompi | Wompi manages the disbursement. In addition, depending on the plan configuration, a fee may or may not be charged, and a financing cost is charged. |
The mode does not apply to disbursements from your own bank account.
Differences between v1 and v2
| v1 | v2 | |
|---|---|---|
| Payment mode | Wompi defines it based on your merchant configuration. It is not sent. | You send it in the optional dispersionType field. If you do not send it, AGGREGATOR_DIRECT is applied. |
dispersionType field | Does not apply. | Optional: AGGREGATOR_DIRECT or AGGREGATOR_MANAGED. |
idempotency-key header | Optional | Required |
| Preview BRE-B key | Not available | GET /breb/keys/resolve/{keyValue} |
How the mode is defined in v1
In v1 the mode is assigned based on your merchant configuration:
- Merchant enabled for the Managed mode: disbursements from Wompi Account are processed as Managed by Wompi.
- Merchant not enabled: disbursements are processed as Direct.
You do not need to change your v1 integration.
How the mode is defined in v2
In v2 you choose the mode of each batch with the dispersionType field:
{
"reference": "payout-001",
"accountId": "84a339e8-c277-45bd-b652-50f0b689edf7",
"paymentType": "PROVIDERS",
"dispersionType": "AGGREGATOR_MANAGED",
"transactions": [
{
"amount": 150000,
"name": "Juan Perez",
"email": "juan@example.com",
"key": "@juanperez"
}
]
}
If you do not send dispersionType, the batch is processed as AGGREGATOR_DIRECT. See the rules and errors in Payment mode.
Versioning and compatibility strategy
- v1 keeps operating with the same contract. Wompi defines the mode based on your merchant configuration.
- v2 is the recommended version for new integrations and for choosing the mode of each disbursement.
- The other batch and transaction fields are the same in both versions.
Migrating from v1 to v2
- Change the base URL to
https://api.payouts.wompi.co/v2(in sandbox,https://api.sandbox.payouts.wompi.co/v2). - Send a unique
idempotency-keyon every disbursement creation. - If you want the Managed by Wompi mode, send
"dispersionType": "AGGREGATOR_MANAGED". If you do not send the field, the disbursement will be Direct.
If your merchant is enabled for the Managed mode in v1 and you migrate to v2 without sending dispersionType, your disbursements will become Direct. Send AGGREGATOR_MANAGED to keep the Managed mode.