Money withdrawal request
Request URL
POST http(s)://API_URL/v2/app/users/:userId/wallet/withdraw?clientId=[CLIENT_ID]
Request header (HTTP Header)
| Parameter Name | Description | Optional / Mandatory | 
|---|---|---|
| sign | Request signature | Mandatory | 
Request parameters
| Parameter Name | Description | Optional / Mandatory | 
|---|---|---|
| clientId | Casino identifier. Sent in the request line | Mandatory | 
| userId | User identifier | Mandatory | 
| currency | ISO currency code | Mandatory | 
| amount | The amount of cashout in cents. It must be a positive number, other symbols are not accepted. | Mandatory | 
| externalTransactionId | Transaction ID on your server | Optional | 
Response parameters
In case of successful execution, the response to the request will contain the data on proceeded withdrawal transaction.
| Parameter Name | Description | Optional / Mandatory | 
|---|---|---|
| currency | ISO currency code | Mandatory | 
| amount | Amount of cashout in cents | Mandatory | 
Errors returned
| HTTP Code | Message | Description | 
|---|---|---|
| 400 | Not valid request | Incorrect request signature | 
| 404 | Player not found | User with userId sent was not found | 
| 422 | Currency not valid | Wrong currency ISO code was sent | 
| Amount value has incorrect format | Incorrect deposit amount was sent. Deposit amount must be > 0 and contain numbers only. | |
| Transaction already processed | Transaction related to passed transactionExternalId is already processed on our server | |
| 500 | You have requested X but you have only Y of money | The withdrawal amount exceeds the current player’s balance in this currency | 
Example of response
{
    "data": {
        "id": "1589002", //transactionId
        "type": "transaction",
            "attributes": {
                "currency": "FUN",
                "amount": 500,
            }
    }
}