Settle
We will use this API to send the result of bet for you to settle the bet.
Access Details
| Restful Endpoint | /api/payment/settle |
|---|---|
| Method | POST |
| Headers | X-Company-Key |
Note: ExtraInfo only send the result of bet for you to settle the bet in end session
RESTful Request
{
"session_id": 0,
"game_id": 1,
"transfers": [],
"extra_info": {
"participants": [
{},
]
},
}
RESTful Response
{
"data": {
"transactions": [],
},
"error": {},
}
Sample
Request
{
"session_id": 123,
"game_id": 1,
"transfers": [
{
"transaction_id": "123-userID-happened_at",
"username": "sol",
"amount": 2000,
"transfer_label": 4,
"happened_at": 1679755004
},
{
"transaction_id": "123-userID-happened_at",
"username": "shiba",
"amount": 2000,
"transfer_label": 2,
"happened_at": 1679755004
}
],
"extra_info": {
"participants": [
{
"username": "sol",
"bet_amount": 1000,
"change": 1000,
"metadata": {}
},
{
"username": "shiba",
"bet_amount": 1000,
"change": 1000,
"label": "WIN_BET",
"metadata": {}
}
]
}
}
Response
{
"data": {
"session_id": 123,
"transactions": [
{
"transaction_id": "123-abc-1679755004",
"username": "sol",
"amount": 2000,
"new_balance": 3000,
"happened_at": 1679755004,
},
{
"transaction_id": "123-def-1679755004",
"username": "shiva",
"amount": 2000,
"new_balance": 4000,
"happened_at": 1679755004,
},
]
},
"error": {
"id": 0,
"msg": ""
}
}