API Document

Endpoint, TRANSFER mode

Move money out of a member POST

Takes amount from the member of external_player_id and currency. Only what the member holds can go: an amount over the balance is refused with 3131, and while the member owes money (a negative balance) every withdraw is refused with 3132. A currency the id has not used holds 0, so a withdraw in it is 3131 and creates no member. ref_id follows the rules of the deposit and names one transfer in either direction: the same ref_id sent again returns the first result and moves nothing, and the same ref_id with another member, currency, amount or direction is refused with 3130. A suspended member can still withdraw; a suspended agent cannot make a new withdraw (1033) but can still resend a done ref_id.

HTTP Request

POST {{ API_URL }}/api/v1/transfer/withdraw

Headers

PropertyTypeRequiredDescription
X-Api-KeystringRequiredOn the endpoints: the API key of your API credential. A missing header or a key we do not know is answered 401 with code 1001. Send it with X-Timestamp and X-Signature on every request.
X-TimestampstringRequiredOn the endpoints: Unix time in seconds when you signed the request. One more than 300 seconds away from our clock, in either direction, is answered 401 with code 1025. Keep your clock in sync (NTP).
X-SignaturestringRequiredOn the endpoints: lowercase hex of HMAC-SHA256 with the secret of your API credential as the key, over the X-Timestamp value, a dot (.), then the raw request body exactly as you send it. One that does not match is answered 401 with code 1030. There is no nonce.
Accept-LanguagestringOptionalThe language of message. English when absent or when we do not have the language; th for Thai. It is the only way to choose the language. message is for people only: decide on code.

Parameter Description

PropertyTypeRequiredDescription
external_player_idstringRequiredYour id of your customer, as in launch. With currency it names the member the money leaves. A withdraw never creates a member.
currencystringRequiredAn ISO 4217 code in three capital letters, such as THB, JPY or KWD.
amountnumberRequiredA positive amount to take, in the major unit of currency, with at most as many decimals as the currency has (THB 2, JPY 0, KWD 3), at least one smallest unit and at most 999999999999999 of them (15 digits). Float noise past 15 significant digits (0.30000000000000004) is rounded to the currency's decimals when it is within a hundredth of the smallest unit.
ref_idstringRequiredYour id of this transfer, with the same rules as the ref_id of a deposit. One ref_id names one transfer in either direction.

Request Body

Request bodyjson
{
  "external_player_id": "member01",
  "currency": "THB",
  "amount": 200,
  "ref_id": "wd-20260101-0001"
}

Response

PropertyTypeRequiredDescription
successbooleanRequiredAlways true
codenumberRequiredAlways 0
messagestringRequiredFor people only. Never decide on it.
request_uuidstringRequiredOur id of the request. Quote it to support.
dataobjectRequired
data.ref_idstringRequiredYour ref_id.
data.txn_idstringRequiredOur id of the transfer. Quote it to support.
data.amountnumberRequiredAn amount in the major unit of currency, with at most as many decimals as the currency has (THB 2, JPY 0, KWD 3). Never negative; the direction comes from the path or direction.
data.currencystringRequiredAn ISO 4217 code in three capital letters, such as THB, JPY or KWD.
data.balance_beforenumberRequiredA member's balance in the major unit of currency, with the currency's decimals. Negative when the member owes money, for example after a provider took back a win that was already spent.
data.balance_afternumberRequiredA member's balance in the major unit of currency, with the currency's decimals. Negative when the member owes money, for example after a provider took back a win that was already spent.
JSON response examplejson
{
  "success": true,
  "code": 0,
  "message": "Withdraw done",
  "data": {
    "ref_id": "wd-20260101-0001",
    "txn_id": "7d8e9f0a-1b2c-4d3e-8f50-6172839a4b5c",
    "amount": 200,
    "currency": "THB",
    "balance_before": 620.5,
    "balance_after": 420.5
  },
  "request_uuid": "8e9f0a1b-2c3d-4e4f-9061-7283940a5b6c"
}

Errors

HTTPcodeWhen
4004001The amount is not a positive number
4011001A header is missing or the key is unknown
4011030The signature does not match
4011025X-Timestamp is too far from our clock
4031033Your agent is suspended
4033123No currency has this code
4043134No member with this external_player_id
4093130The ref_id was used for another transfer
4093132The member owes money in this currency
4223131The balance is less than the amount
5009001Something failed on our side