Welcome to Xendit’s latest documentation. For legacy content, access the previous documentation here or the previous API reference here.

Create Transfers

Prev Next
Post
/transfers

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

Security
HTTP
Type basic
Body parameters
object
reference
string Required

A unique reference for this Transfer that you set when making the request

amount
number Required
source_user_id
string Required

The source of the transfer. This is the user_id of either your master or sub account

destination_user_id
string Required

The destination of the transfer. This is the user_id of either your master or sub account

Responses
200
Transfer
{
  "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

Object that would be generated upon creation of a Transfer

created
string

Timestamp of when the object was created

transfer_id
string

A unique reference for this Transfer set by Xendit systems

reference
string

A unique reference for this Transfer that you set when making the request

source_user_id
string

The source of the transfer. This is the user_id of either your master or sub account

destination_user_id
string

The destination of the transfer. This is the user_id of either your master or sub account

status
string

The status of the Transfer. Available values SUCCESSFUL,PENDING, FAILED

amount
number

The amount that was transferred

400
API_VALIDATION_ERROR
{
  "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"
  ]
}
INVALID_JSON_FORMAT
{
  "error_code": "INVALID_JSON_FORMAT",
  "message": "The request body is not a valid JSON format.",
  "errors": [
    "Detailed description here"
  ]
}
INVALID_SOURCE_OR_DESTINATION_ERROR
{
  "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"
  ]
}
INSUFFICIENT_BALANCE
{
  "error_code": "INSUFFICIENT_BALANCE",
  "message": "The cash balance of your source account is insufficient.",
  "errors": [
    "Detailed description here"
  ]
}
MISMATCH_PAYLOAD_FOR_REFERENCE
{
  "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"
  ]
}
INVALID_AMOUNT
{
  "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"
  ]
}
object

The object being referenced does not exist

error_code
string
Valid values[ "DESTINATION_ACCOUNT_NOT_FOUND", "DATA_NOT_FOUND" ]
message
string
errors
Array
OneOf
string
string
object
object
403
REQUEST_FORBIDDEN_ERROR
{
  "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"
  ]
}
DUPLICATE_REFERENCE
{
  "error_code": "DUPLICATE_REFERENCE",
  "message": "The reference parameter should be unique.",
  "errors": [
    "Detailed description here"
  ]
}
XEN_PLATFORM_SUB_ACCOUNT_NOT_LIVE
{
  "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"
  ]
}
API_KEY_ENVIRONMENT_NOT_MATCH
{
  "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"
  ]
}
object

Invalid API key

error_code
string
Valid values[ "INVALID_API_KEY" ]
message
string
errors
Array
OneOf
string
string
object
object
425
TRANSFER_IN_PROGRESS
{
  "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"
  ]
}
object

Transfer is currently being processed. Use GET Transfer By Reference to check its latest status

error_code
string
Valid values[ "TRANSFER_IN_PROGRESS" ]
message
string
errors
Array
OneOf
string
string
object
object