Deduct
We will use this API to inform you to deduct the user's stake when bet is placed by play
Access Details
| Restful Endpoint | /api/payment/deduct |
|---|---|
| Method | POST |
| Headers | X-Company-Key |
RESTful Request
{
"session_id": 0,
"game_id": 1,
"transfer": {},
}
RESTful Response
{
"data": {
"transaction": {},
},
"error": {},
}
Sample
Request
{
"session_id": 123,
"game_id": 1,
"transfer": {
"transaction_id": "123-userID-happened_at"
"username": "sol",
"amount": 1000,
"transfer_label": 4,
"happened_at": 1679755004,
}
}
Response
{
"data": {
"session_id": 123,
"transaction": {
"transaction_id": "123-abc-1679755004"
"username": "sol",
"amount": -1000,
"new_balance": 2000,
"happened_at": 1679755004,
}
},
"error": {
"id": 0,
"msg": ""
}
}