Skip to content

Initiate a transfer ​

Creates a pending transfer and returns the recipient's name. No money moves until you confirm.

POST /api/v1/transfer

Body ​

FieldTypeRequiredDescription
recipientstringYesThe recipient's Xash user number.
amountnumberYesMore than 0, at most 99999999.99.
currencystringYesA currency your wallet holds, for example USD.
referencestringNoA note stored with the transfer. Up to 50 characters. This is a label only: it does not make the request safe to repeat.

Example ​

bash
curl -X POST https://app.xash.co.zw/api/v1/transfer \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"recipient":"1098765432","amount":2.5,"currency":"USD","reference":"Float top-up"}'

Response 200 ​

json
{
  "success": true,
  "message": "Transfer initiated successfully.",
  "data": {
    "id": "00000000-0000-7000-8000-0000000000f1",
    "recipient": "1098765432",
    "first_name": "Rudo Trading",
    "last_name": "Sample",
    "amount": "2.5",
    "currency": "USD",
    "reference": "Float top-up"
  }
}

Keep id for the confirm call. first_name is the recipient's business name when they have one, otherwise their first name.

Errors ​

StatusWhenmessage
400The recipient is your own account.You cannot transfer to yourself.
400Your balance is lower than the amount.You do not have enough balance to make this transaction.
422The amount is over a spending limit on your server tokens. No transfer is created.error_code is LIMIT_PER_TRANSACTION or LIMIT_DAILY.
422No account has this user number, or a field is invalid.Validation error