The Transfers API allows you to transfer balances: i) from your sub-accounts to your master account and vice versa, ii) between your sub-accounts. Use this to manage, or split payments between your platform and your sub accounts within the Xendit ecosystem.
You can only create transfers using the Platform's API key. Sub-accounts that you manage through xenPlatform have no ability to create transfers through this endpoint
A unique reference for this Transfer that you set when making the request
The source of the transfer. This is the user_id of either your master or sub account
The destination of the transfer. This is the user_id
of either your master or sub account
{
"created": "2020-11-30T02:47:53.061Z",
"transfer_id": "bd1cc56b-ce7f-4ad7-8901-3eaa689e90eb",
"source_user_id": "`5cafeb170a2b18519b1b8768",
"destination_user_id": "5f8d0c0603ffe06b7d4d9fcf",
"status": "SUCCESSFUL",
"amount": "90000",
"reference": "Monthly_Transfers_1234"
}
Object that would be generated upon creation of a Transfer
Timestamp of when the object was created
A unique reference for this Transfer set by Xendit systems
A unique reference for this Transfer that you set when making the request
The source of the transfer. This is the user_id of either your master or sub account
The destination of the transfer. This is the user_id
of either your master or sub account
The status of the Transfer. Available values SUCCESSFUL
,PENDING
, FAILED
The amount that was transferred
{
"error_code": "API_VALIDATION_ERROR",
"message": "Inputs are failing validation. The errors field contains details about which fields are violating validation.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "INVALID_JSON_FORMAT",
"message": "The request body is not a valid JSON format.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "INVALID_SOURCE_OR_DESTINATION_ERROR",
"message": "Source or destination account does not exist. Please input a valid business ID within your xenPlatform account.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "INSUFFICIENT_BALANCE",
"message": "The cash balance of your source account is insufficient.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "MISMATCH_PAYLOAD_FOR_REFERENCE",
"message": "Reference has been used before. If you'd like to retry this transfer, please use the same payload as your previous request.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "INVALID_AMOUNT",
"message": "Transfer amount has to be greater than 0, Transfer amount of IDR currency should not have decimal point, Transfer amount of PHP currency can only have max 2 decimal point.",
"errors": [
"Detailed description here"
]
}
The object being referenced does not exist
{
"error_code": "REQUEST_FORBIDDEN_ERROR",
"message": "API key in use does not have necessary permissions to perform the request. Please assign proper permissions for the key",
"errors": [
"Detailed description here"
]
}
{
"error_code": "DUPLICATE_REFERENCE",
"message": "The reference parameter should be unique.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "XEN_PLATFORM_SUB_ACCOUNT_NOT_LIVE",
"message": "Your source or destination account is not live yet. Please specify live accounts for live transfers.",
"errors": [
"Detailed description here"
]
}
{
"error_code": "API_KEY_ENVIRONMENT_NOT_MATCH",
"message": "Use your LIVE API key to transfer between LIVE accounts, or use TEST API key to transfer between TEST accounts.",
"errors": [
"Detailed description here"
]
}
Invalid API key
{
"error_code": "TRANSFER_IN_PROGRESS",
"message": "Transfer is currently being processed. Use `GET Transfer By Reference` to check its latest status",
"errors": [
"Detailed description here"
]
}
Transfer is currently being processed. Use GET Transfer By Reference to check its latest status