Skip to main content

Payout

Roecny Payouts enables businesses to make faster, more cost-effective payouts across the globe by connecting to local clearing systems in over countries. With a single Roecny account and/or one integration, you (and your customers) will be able to move funds globally via Roecny’s payout network, which currently supports local and SWIFT payouts in countries/regions and over currencies.

Create Beneficiary​

This endpoint is used to create a new beneficiary account, which is required for making transfers to that recipient. To ensure the request is properly formatted, the request body must follow the specific structure (schema) provided by the Get Beneficiary Schema endpoint. This ensures that all necessary details are included and correctly formatted for successful account creation.

POST {{baseUrl}}/roecny/api/v1/transfer/beneficiary

Description

This endpoint is used to create a new beneficiary account, which is essential for initiating transfers to that beneficiary. A beneficiary account typically includes important details such as the recipient’s name, account , and other relevant data required to process a transfer. To successfully create a beneficiary account, the request body must adhere to a specific format or structure. This structure, also known as the schema, can be retrieved using the Get Beneficiary Schema endpoint. It outlines all the required fields, data types, and any conditional logic or rules that must be followed. Using the correct schema ensures the data is valid and reduces the chances of errors during account creation or future transfers.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
beneficiary_account_currencystringYesCurrency code of the beneficiary
beneficiary_account_numberstringYesAccount number of the beneficiary

Request Example

curl --request POST \
--url {{baseUrl}}/roecny/api/v1/transfer/beneficiary \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{BasedOnRequirement}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{Useridentificationkey}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR_TOKEN}}' \
--data '{
"beneficiary_account_currency": "USD",
"beneficiary_account_number": "1234567890"
}'

Response Example

{
"code": 200,
"status": "success",
"message": "",
"data": {
"id": "beneficiary_id",
"beneficiary_account_currency": "USD",
"beneficiary_account_number": "1234567890"

}
}

Validate Create Beneficiary​

This API is designed to validate the beneficiary’s details before proceeding with the actual creation of the beneficiary account. It allows you to perform a pre-check to ensure that all the provided information—such as the recipient's name, account number, and other required fields—is accurate, complete, and formatted correctly according to the rules defined by the payment system or region.

By using this validation API, you can identify and correct any issues or missing data in advance, helping to prevent errors or failures during the actual beneficiary creation process. It is a useful step in workflows where ensuring data accuracy is critical before committing to creating records in the system. Importantly, this API only checks the data—it does not create or store the beneficiary account.

POST {{baseUrl}}/roecny/api/v1/transfer/validatebeneficiary

Description

This endpoint is used to validate beneficiary account details based on the specific requirements of the transfer corridor . It ensures that all the necessary information—such as the beneficiary’s name, account number, and any country-specific fields—complies with the rules defined in the beneficiary schema for that corridor. When you call this endpoint, it performs the same validation checks that would occur during actual beneficiary creation.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Request Body

The request body should match the structure returned by the GET /transfer/beneficiary schema endpoint for your specific corridor.

Example for US ACH Personal Account:

{
"account_number": "123456789",
"routing_number": "026073150",
"full_name": "John Doe",
"account_type": "CHECKING",
"bank_country_code": "US",
"account_currency": "USD",
"entity_type": "PERSONAL",
"transfer_method": "LOCAL"
}

Request Example

curl --request POST \
--url {{baseUrl}}/roecny/api/v1/transfer/validatebeneficiary \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{BasedOnRequirement}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{Useridentificationkey}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR_TOKEN}}' \
--data '{
"account_number": "123456789",
"routing_number": "026073150",
"full_name": "John Doe",
"account_type": "CHECKING",
"bank_country_code": "US",
"account_currency": "USD",
"entity_type": "PERSONAL",
"transfer_method": "LOCAL"
}'

Response Example

{
"code": 200,
"status": "success",
"message": "Validation successful",
"data": []
}

Update Beneficiary​

This API lets you update specific fields of an existing beneficiary account, such as name, bank details without recreating the entire account. You need to provide the beneficiary ID and only the fields you want to change. The API validates the updates based on the rules for the relevant transfer corridor, ensuring data accuracy while keeping the rest of the beneficiary information unchanged.

PATCH {{baseUrl}}/roecny/api/v1/transfer/beneficiary

Description

TThis endpoint allows partial updates to an existing beneficiary's information. You only need to include the fields you want to change, such as name, bank details, or address. The updates are validated using the same schema as beneficiary creation, ensuring they meet the requirements for the relevant transfer corridor. Unspecified fields remain unchanged.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Request Parameters

ParameterTypeRequiredDescription
beneficiary_idstringYesID of the beneficiary to update

Request Body

Include only the fields that need updating, following the same schema as beneficiary creation:

{
"full_name": "Updated Name",
"account_number": "987654321",
"account_type": "SAVINGS"
}

Request Example

curl --request PATCH \
--url '{{baseUrl}}/roecny/api/v1/transfer/beneficiary?beneficiary_id=beneficiary_123' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{BasedOnRequirement}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{Useridentificationkey}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR_TOKEN}}' \
--data '{
"full_name": "Updated Name",
"account_number": "987654321",
"account_type": "SAVINGS"
}'

Response Example

{
"code": 200,
"status": "success",
"message": "",
"data": []
}

Get Beneficiary by ID​

This API retrieves detailed information about a specific beneficiary.

GET {{baseUrl}}/roecny/api/v1/transfer/beneficiary

Description

This endpoint retrieves full details of a specific beneficiary, including their account info, verification status, and supported payout methods. You must provide the beneficiary ID and required headers for authentication and identification.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Query Parameters

ParameterTypeRequiredDescription
beneficiary_idstringYesThe ID of the beneficiary to retrieve

Request Example

curl --request GET \
--url '{{baseUrl}}/roecny/api/v1/transfer/beneficiary?beneficiary_id=beneficiary_123' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{BasedOnRequirement}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{Useridentificationkey}}' \
--header 'Authorization: Bearer {{YOUR_TOKEN}}'

Response Example

{
"code": 200,
"status": "success",
"message": "",
"data": {
"id": "beneficiary_123",
"account_holder_name": "John Doe",
"account_number": "••••6789",
"bank_name": "Bank of America",
"bank_country_code": "US",
"currency": "USD",
"entity_type": "PERSONAL",
"status": "VERIFIED",
"created_at": "2023-06-16T05:22:14Z",
"last_used_at": "2023-06-18T10:15:22Z",
"payout_methods": ["LOCAL", "SWIFT"],
"metadata": {
"routing_number": "•••••3150",
"account_type": "CHECKING"
}
}
}

Get Beneficiary List​

This API retrieves a list of all beneficiaries associated with the authenticated user.

GET {{baseUrl}}/roecny/api/v1/transfer/beneficiarylist

Description

This endpoint returns a paginated list of beneficiaries created by the user, along with their status and supported payout methods. You can filter results by status or currency and control pagination using limit and offset query parameters.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoNumber of results per page (default: 20, max: 100)
offsetintegerNoPagination offset (default: 0)
statusstringNoFilter by beneficiary status
currencystringNoFilter by beneficiary currency

Request Example

curl --request GET \
--url '{{baseUrl}}/roecny/api/v1/transfer/beneficiarylist?limit=20&offset=0' \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{BasedOnRequirement}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{Useridentificationkey}}' \
--header 'Authorization: Bearer {{YOUR_TOKEN}}'

Response Example

{
"code": 200,
"status": "success",
"message": "",
"data": [
{
"id": "beneficiary_id_1",
"account_holder_name": "John Doe",
"account_number": "••••6789",
"bank_name": "Bank of America",
"currency": "USD",
"country": "US",
"status": "VERIFIED",
"created_at": "2023-06-16T05:22:14Z",
"payout_methods": ["LOCAL", "SWIFT"],
"last_used_at": "2023-06-18T10:15:22Z"
},
{
"id": "beneficiary_id_2",
"account_holder_name": "Acme Corp",
"account_number": "••••4321",
"bank_name": "Chase",
"currency": "EUR",
"country": "DE",
"status": "PENDING_VERIFICATION",
"created_at": "2023-06-17T11:32:45Z",
"payout_methods": ["SEPA"],
"last_used_at": null
}
],
"pagination": {
"total_count": 15,
"limit": 20,
"offset": 0
}
}

Create Payout​

Programmatically make cost-effective, fast and secure payouts across the globe.

POST - {{baseUrl}}/roecny/api/v1/transfer/

Description

This endpoint initiates a payout transfer to a registered beneficiary account. To use it, you must include the required headers for authentication, program identification, and idempotency. The request body must be in JSON format and include key details such as the beneficiary_id, transfer amount, currency, and a client reference. Optional notes can also be included. The endpoint validates the input and processes the transfer based on the provided details.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesShared X-API key provided by Roecny
x-program-idstringYesProgram identifier
x-request-idstringYesIdempotency key (prevents duplicate transfers)
x-user-idstringYesUser identification key
AuthorizationstringYesBearer token
Content-TypestringYesMust be application/json

Request Body Parameters

ParameterTypeRequiredDescription
beneficiary_idstringYesID of pre-registered beneficiary
amountnumberYesTransfer amount
currencystringYes3-letter ISO currency code
referencestringYesClient reference ID
notesstringNoAdditional transfer notes

Example Request Body:

{
"beneficiary_id": "ben_123456789",
"amount": 100.50,
"currency": "USD",
"reference": "ORDER_12345",
"notes": "Invoice payment for May"
}

Request Examples

curl -X POST \
"{{baseUrl}}/roecny/api/v1/transfer/" \
-H "x-api-key: {{Shared Xapikey By roecny}}" \
-H "x-program-id: {{BasedOnRequirement}}" \
-H "x-request-id: {{IdempotencyKey}}" \
-H "x-user-id: {{Useridentificationkey}}" \
-H "Content-Type: application/json" \
-d '{
"beneficiary_id": "ben_123456789",
"amount": 100.50,
"currency": "USD",
"reference": "ORDER_12345"
}'

Cancel Payout​

This API allows cancellation of pending payout transactions.

PATCH {{baseUrl}}/roecny/api/{version}/transfer/cancelpayout

Description

This endpoint cancels a pending payout transaction using either the payout ID or system reference number. Required headers ensure authentication and request tracking. The request body must include one of the two identifiers to locate and cancel the transaction. Only pending payouts can be canceled.

Request Headers

ParameterTypeRequiredDescription
x-api-keystringYesAPI key for authentication
x-program-idstringYesProgram identifier
x-request-idstringYesUnique request identifier
x-user-idstringNoUser identification
AuthorizationstringYesBearer token for authentication
Content-TypestringYesMust be application/json

Path Parameters

ParameterTypeRequiredDescription
versionstringYesAPI version number

Request Body Parameters

ParameterTypeRequiredDescription
idstringConditional*Payout transaction ID
systemReferenceNumberstringConditional*System reference number

*Note: At least one of these fields must be provided

Request Example

curl --request PATCH \
--url {{baseUrl}}/roecny/api/v1/transfer/cancelpayout \
--header 'x-api-key: {{Shared Xapikey By Roecny}}' \
--header 'x-program-id: {{BasedOnRequirement}}' \
--header 'x-request-id: {{IdempotencyKey}}' \
--header 'x-user-id: {{Useridentificationkey}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{YOUR_TOKEN}}' \
--data '{
"id": "pyt_12345",
"systemReferenceNumber": "ref_67890"
}'

Response Example

{
"code": 200,
"status": "success",
"message": "Payout cancelled successfully",
"data": {}
}