Beneficiaries
The Beneficiaries API allows you to manage the recipient accounts for your transfers. You can create, list, update, and delete beneficiary records, as well as validate account details before sending funds.
The Beneficiary Object
A Beneficiary object, also referred to as a DepositAccount, stores information about a recipient, including their bank account details, name, and contact information.
Attributes
| Attribute | Type | Description |
|---|---|---|
id | integer | Unique numeric identifier for the beneficiary account (e.g., 12345). |
accountNumber | string | The beneficiary's bank account number. |
firstName | string | The first name of the beneficiary. |
lastName | string | The last name of the beneficiary. |
alias | string | A custom alias for the beneficiary account. |
countryDestination | object | An object containing the destination country's details. |
type | integer | The type of account. |
state | string | The state of the beneficiary record (e.g., active). |
createdAt | string | The timestamp when the beneficiary was created (ISO 8601). |
Create a Beneficiary
/depositaccounts/Creates a new beneficiary record (deposit account) to be used for future transfers.
Body Parameters
| Parameter | Type | Description |
|---|---|---|
accountNumber | string | Required. The beneficiary's bank account number. |
firstName | string | Required. The first name of the beneficiary. |
lastName | string | Required. The last name of the beneficiary. |
countryDestinationId | integer | Required. The ID of the destination country. |
type | integer | Required. The type of account (e.g., 0 for a standard bank account). |
alias | string | Optional. A custom alias for easy identification. |
email | string | Optional. The beneficiary's email address. |
phone | string | Optional. The beneficiary's phone number. |
address | string | Optional. The beneficiary's physical address. |
swift | string | Optional. The SWIFT/BIC code for international transfers. |
cURL Example
curl -X POST https://sandbox.tropipay.me/api/v3/depositaccounts/ \
-H "Authorization: Bearer {your-access-token}" \
-H "Content-Type: application/json" \
-d '{
"accountNumber": "ES9121000418450200051332",
"firstName": "Jane",
"lastName": "Doe",
"countryDestinationId": 1,
"type": 0,
"alias": "Jane Doe Savings",
"email": "jane.doe@example.com",
"phone": "+15551234567",
"address": "123 Main St, Anytown, USA",
"swift": "CASHUS33XXX"
}'
Response Example (200 OK)
{
"id": 12345,
"accountNumber": "ES9121000418450200051332",
"firstName": "Jane",
"lastName": "Doe",
"alias": "Jane Doe Savings",
"state": "active",
"createdAt": "2024-07-29T10:30:00Z"
}
List Beneficiaries
/depositaccounts/Retrieves a list of all beneficiaries associated with your account.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Optional. The maximum number of beneficiaries to return. Defaults to 10. |
offset | integer | Optional. The number of beneficiaries to skip for pagination. |
search | string | Optional. A search term to filter beneficiaries by name, last name, or email. |
cURL Example
curl -X GET "https://sandbox.tropipay.me/api/v3/depositaccounts/?limit=10&search=Jane" \
-H "Authorization: Bearer {your-access-token}"
Response Example (200 OK)
The following is an example of the response. For brevity, some fields within the countryDestination object and other less common attributes have been omitted.
{
"items": [
{
"id": 12345,
"accountNumber": "ES0012345678901234567890",
"alias": "John Doe's Savings",
"swift": "CASHESMMXXX",
"type": 7,
"personType": 1,
"firstName": "John",
"lastName": "Doe",
"state": 0,
"countryDestinationId": 1,
"documentNumber": "X1234567Z",
"address": "123 Fictional Street, Madrid",
"phone": "600123456",
"email": "john.doe@example.com",
"createdAt": "2023-01-15T10:00:00.000Z",
"updatedAt": "2023-01-15T10:00:00.000Z",
"countryDestination": {
"id": 1,
"name": "España",
"sepaZone": true,
"slug": "ES",
"callingCode": 34
},
"allowed": true
}
]
}
Get a Specific Beneficiary
/depositaccounts/{beneficiaryId}Retrieves the details of a single beneficiary by their unique ID.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
beneficiaryId | integer | Required. The numeric ID of the beneficiary to retrieve (e.g., 12345). |
cURL Example
curl -X GET https://sandbox.tropipay.me/api/v3/depositaccounts/12345 \
-H "Authorization: Bearer {your-access-token}"
Response Example (200 OK)
{
"id": 12345,
"accountNumber": "ES0012345678901234567890",
"alias": "John Doe's Savings",
"swift": "CASHESMMXXX",
"type": 7,
"personType": 1,
"firstName": "John",
"lastName": "Doe",
"state": 0,
"countryDestinationId": 1,
"documentNumber": "X1234567Z",
"address": "123 Fictional Street, Madrid",
"phone": "600123456",
"email": "john.doe@example.com",
"createdAt": "2023-01-15T10:00:00.000Z",
"updatedAt": "2023-01-15T10:00:00.000Z",
"countryDestination": {
"id": 1,
"name": "España",
"sepaZone": true,
"slug": "ES",
"callingCode": 34
},
"paymentMethods": [
"EXT",
"CRYPTO",
"APPLE_PAY",
"GOOGLE_PAY",
"TPP"
],
"allowedAccounts": [
{
"id": 628,
"alias": "Main Account",
"currency": "EUR",
"type": 1
}
],
"allowed": true
}
Update a Beneficiary
/depositaccounts/Updates the alias of an existing beneficiary. Note that only the alias field can be modified through this endpoint.
Body Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | Required. The numeric ID of the beneficiary to update. |
alias | string | Optional. The new alias for the beneficiary account. |
cURL Example
curl -X PUT https://sandbox.tropipay.me/api/v3/depositaccounts/ \
-H "Authorization: Bearer {your-access-token}" \
-H "Content-Type: application/json" \
-d '{
"id": 12345,
"alias": "Jane Doe Primary Account"
}'
Delete a Beneficiary
/depositaccounts/{beneficiaryId}Deletes a beneficiary record by their unique ID.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
beneficiaryId | integer | Required. The numeric ID of the beneficiary to delete (e.g., 12345). |
Body Parameters
| Parameter | Type | Description |
|---|---|---|
securityCode | string | Required. The security code for authentication (e.g., 123456). |
cURL Example
curl -X DELETE https://sandbox.tropipay.me/api/v3/depositaccounts/12345 \
-H "Authorization: Bearer {your-access-token}" \
-H "Content-Type: application/json" \
-d '{
"securityCode": "123456"
}'
Validate an Account Number
/depositaccounts/validateaccountnumberValidates a bank account number to check its format and existence before creating a beneficiary.
Body Parameters
| Parameter | Type | Description |
|---|---|---|
accountNumber | string | Required. The account number to validate. |
countryDestinationId | integer | Required. The ID of the destination country. |
type | integer | Required. The type of account. |
currency | string | Required. The currency associated with the account (e.g., USD). |
paymentType | integer | Required. The type of payment. |
cURL Example
curl -X POST https://sandbox.tropipay.me/api/v3/depositaccounts/validateaccountnumber \
-H "Authorization: Bearer {your-access-token}" \
-H "Content-Type: application/json" \
-d '{
"accountNumber": "ES9121000418450200051332",
"countryDestinationId": 1,
"type": 0,
"currency": "EUR",
"paymentType": 2
}'
Response Example (200 OK)
{
"valid": true,
"type": null,
"errorCode": null,
"errorMessage": null
}