Disbursements API
This API allows managing disbursement accounts towards clients or partners. It provides endpoints to create, read, update.
Disbursements are made automatically when a debt has been approved and generated.
The destination of the disbursement will depend on the product configuration (see DPA Products).
The CMS Base URL is used (see introduction).
The Disbursement Account Object
The Disbursement Account Object represents an account for electronic fund disbursement.
Attributes
| Attribute | Description | Type |
|---|---|---|
accountId | Unique identifier of the account | String (UUID) |
clientId | Client identifier (only included when the type is "client") | String (UUID) |
name | Legal name of the account owner | String |
taxId | Tax identifier of the account | String |
partnerId | Identifier of the Partner managing the account | String (UUID) |
type | Type of recipient account (client, partner) | String |
bankAccount | Banking Information | Object |
status | Account status | String |
createdAt | Account creation date | String (Datetime) |
updatedAt | Date of the last account update | String (Datetime) |
Details of nested objects
bankAccount Object
| Attribute | Description | Type |
|---|---|---|
accountNumber | Bank account number | String (UUID) |
bankCode | Issuing bank identifier | String |
bankName | Name of the issuing bank | String |
accountType | Corresponding account type | Integer |
accountType Object
| Type | Value | Description |
|---|---|---|
WireTransfer | 40 | CLABE Account Type for countries like Mexico |
DebitCard | 3 | Savings or Checking Account Type, traditional debit account |
MobilePhone | 10 | Account Type associated with a phone number |
status Object
| State | Value | Description |
|---|---|---|
Created | "created" | The account was created |
In Validation | "in_validation" | The account is in the validation process |
Required Validation | "required_validation" | The account requires manual validation |
Active | "active" | The account is active and validated |
Rejected | "rejected" | The account was rejected, this is due to the account data not matching the account holder |
Disabled | "disabled" | The account is validated but deactivated |
Suspended | "suspended" | The account is suspended for use, for security reasons |
bank Object
| Attribute | Description | Type |
|---|---|---|
bankCode | Issuing bank identifier | String |
bankName | Name of the issuing bank | String |
Available Operations
List Available Banks
Retrieve a list of available banks.
Path Parameters:
| Parameter | Description | Type |
|---|---|---|
country | Country ID in ISO format i.e MEX | string |
Successful Response: The response will be a list of Bank objects.
Get Disbursement Accounts
Path Parameters:
| Parameter | Description | Type |
|---|---|---|
country | Country ID in ISO format i.e MEX | string |
type | Type of account to create client or partner | string |
ownerId | Identifier of the account owner clientId or partnerId | string (UUID) |
x-partner-id | Partner identifier sent as a header, required for client type | string (UUID) |
Query Parameters:
| Parameter | Description | Type |
|---|---|---|
status | Status to filter the accounts to obtain see Status | String |
page | Page number (default: 1) | Integer |
per-page | Items per page (default: 10) | Integer |
sort-by | Field to sort by | String |
sort-direction | Sorting direction (asc or desc) | String |
Successful Response (200)
Returns an array of Disbursement Account objects.
Specific Errors
| Response Code | Description |
|---|---|
| 400 | Invalid request. This can occur if required parameters are missing or if the provided values are not valid. |
Get Disbursement Account
Path Parameters:
| Parameter | Description | Type |
|---|---|---|
country | Country ID in ISO format i.e MEX | string |
type | Type of account to create client or partner | string |
ownerId | Identifier of the account owner clientId or partnerId | string (UUID) |
accountId | Unique identifier of the account | string (UUID) |
x-partner-id | Partner identifier sent as a header, required for client type | string (UUID) |
Successful Response (200)
Returns a Disbursement Account object.
Specific Errors
| Response Code | Description |
|---|---|
| 400 | Invalid request. This can occur if required parameters are missing or if the provided values are not valid. |
| 404 | The account does not exist |
Create Disbursement Account
Creates a disbursement account.
Note: Multiple accounts can be created, but the system will deactivate any previously created (active) account.
Path Parameters:
| Parameter | Description | Type |
|---|---|---|
country | Country ID in ISO format i.e MEX | string |
type | Type of account to create client or partner | string |
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
id | ID of the account owner client or partner | String (UUID) | Yes |
partnerId | Partner managing the account | String (UUID) | Yes |
bankAccount.accountNumber | Account number | String | Yes |
bankAccount.accountType | Bank Account Type | integer | Yes |
bankAccount.bankCode | Issuing bank identifier of the account | String | No* |
bankAccount.bankName | Issuing bank name of the account | String | No* |
name | Legal name of the account owner | String | No* |
taxId | Tax identifier of the account | String | No* |
Notes:
-
The
nameparameter must be provided when the account type ispartner. -
The
taxIdparameter must be provided when the account type ispartner. -
When a request does not specify the bank code and bank name, the system will attempt to determine the bank code and bank name. This is only supported when the account type (accountType) is WireTransfer (40); for other account types, these values must be specified.
Request Body for a Client Type Account
Request Body for a Partner Type Account
Successful Response (201)
The response includes a created Disbursement Account object.
Specific Errors
| Response Code | Description |
|---|---|
| 400 | Invalid request. This can occur if required parameters are missing or if the provided values are not valid. |
| 404 | The client or partner does not exist |
| 409 | Another account is associated with the same bank account and/or duplicate account |
| 403 | Not allowed, the user does not have access to read clients of the partner |
In case of error, the response will include details about the nature of the problem to assist in resolution.
Update an Account
- An account's banking information can be updated when it is in the Rejected status. Once the account is active/validated, no further changes can be made.
Path Parameters:
| Parameter | Description | Type |
|---|---|---|
country | Country ID in ISO format i.e MEX | string |
type | Type of account to create client or partner | string |
ownerId | Identifier of the account owner clientId or partnerId | string (UUID) |
accountId | Unique identifier of the account | string (UUID) |
x-partner-id | Partner identifier sent as a header, required for client type | string (UUID) |
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
bankAccount.accountNumber | Account number | String | Yes |
bankAccount.accountType | Bank account type | integer | Yes |
bankAccount.bankCode | Issuing bank identifier of the account | String | No* |
bankAccount.bankName | Issuing bank name of the account | String | No* |
name | Legal name of the account owner | String | No* |
taxId | Tax identifier of the account | String | No* |
status | The account status (active, disabled), to activate/deactivate the account | String | No* |
Notes:
-
The
nameparameter must be provided when the account type ispartner. -
The
taxIdparameter must be provided when the account type ispartner. -
When a request does not specify the bank code and bank name, the system will attempt to determine the bank code and bank name. This is only supported when the account type (accountType) is WireTransfer (40); for other account types, these values must be specified.
-
When changing the status to active, the previously active account changes to disabled.
-
Only one active account is allowed; only previously validated accounts can be activated and deactivated.
Successful Response (200)
Returns a Disbursement Account object.
Specific Errors
| Response Code | Description |
|---|---|
| 400 | Invalid request. This can occur if required parameters are missing or if the provided values are not valid. |
| 404 | The account does not exist |
| 409 | Another account is associated with the same bank account and/or duplicate account |
| 403 | Not allowed, the user does not have access to read clients of the partner |
Delete an Account
Path Parameters:
| Parameter | Description | Type |
|---|---|---|
country | Country ID in ISO format i.e MEX | string |
type | Type of account to create client or partner | string |
ownerId | Identifier of the account owner clientId or partnerId | string (UUID) |
accountId | Unique identifier of the account | string (UUID) |
x-partner-id | Partner identifier sent as a header, required for client type | string (UUID) |
Successful Response (204)
Successful request (NoContent)
Specific Errors
| Response Code | Description |
|---|---|
| 400 | Invalid request. This can occur if required parameters are missing or if the provided values are not valid. |
| 404 | The client or partner does not exist |
| 409 | Another account is associated with the same bank account and/or duplicate account |
| 403 | Not allowed, the user does not have access to read clients of the partner |
The Disbursement Object
The Disbursement Object represents a fund disbursement.
Get a Disbursement
Retrieve information about a specific disbursement.
Path Parameters:
| Parameter | Description |
|---|---|
payOrderId | ID of the disbursement to retrieve |
Successful Response:
The response will be a Disbursement object.
List Disbursements
Retrieve a list of disbursements.
Query Parameters:
| Parameter | Description | Type |
|---|---|---|
partner-id | Filter by partner ID | String |
debt-id | Filter by debt ID | String |
status | Filter by disbursement status | String |
tracking-key | Filter by tracking key | String |
reference-num | Filter by reference number | String |
from-date | Filter by start date | String |
to-date | Filter by end date | String |
page | Page number (default: 1) | Integer |
per-page | Items per page (default: 10) | Integer |
sort-by | Field to sort by | String |
sort-direction | Sorting direction (asc or desc) | String |
Successful Response:
The response will be a list of Disbursement objects.
Update a Disbursement as Successful
Update its status as long as its current status is sent.
Path Parameters:
| Parameter | Description |
|---|---|
payOrderId | ID of the disbursement to update |
Successful Response:
Successful request (204 - NoContent)
Reconcile a Disbursement
Reconcile a specific disbursement as long as its current status is sent or success.
Path Parameters:
| Parameter | Description |
|---|---|
payOrderId | ID of the disbursement to reconcile |
Successful Response:
Successful request (204 - NoContent)