Credit — type: "win"
POST{base}/transactionMoney arriving in the balance: a bet that won, or a cashout the player accepted.
Same {base}/transaction address as Debit, same response shape,
same duplicate protection. Three things differ.
Request
| Field | Sent | Rule |
|---|---|---|
type | always | win. |
amount | always | What the player receives, in full. Positive. |
currency | always | ISO 4217. |
reference | always | Your idempotency key, unique to this payout — not the bet's. |
parentReference | always | The reference of the bet being paid. This is what ties a payout to its stake in your ledger. |
playerId | on service-key calls | Your externalId. A cashout the player accepted carries their own Bearer instead, and then playerId is absent. |
simulation | connection test only | true marks a connection test: ignore it, answer success, move no money. |
bet | always | The settled ticket, whole — the shape Debit defines. Here id, payout and settledAt are set, status is WON or CASHED_OUT, and each leg's own status says how it came in. |
What differs from a debit
- The Bearer is your service key. A settlement happens hours after the player closed the tab — there is no session, so the request names the player outright.
402is not an answer. We are handing money over. Any status other than200is a provider error; the Debit table applies otherwise.- We retry. A payout you refuse is still owed. Refusing postpones a settlement, it does not cancel one — which makes retries the normal path here, not the exception. The same
referencemust pay once.
POST {base}/transaction
Authorization: Bearer <your service key>
Content-Type: application/json
{
"type": "win",
"amount": 25.00,
"currency": "USD",
"reference": "payout_3b7d0c11",
"parentReference": "bet_9f2c1e4a",
"playerId": "10",
"bet": {
"id": "68a0f1c2d3e4f5a6b7c8d9e0",
"kind": "SINGLE",
"status": "WON",
"stake": 10.00,
"totalStake": 10.00,
"totalOdds": 2.50,
"potentialPayout": 25.00,
"payout": 25.00,
"system": null,
"placedAt": "2026-08-16T15:04:05.000Z",
"settledAt": "2026-08-16T21:52:10.000Z",
"selections": [
{
"fixture": {
"id": "11223344",
"name": "Real Madrid vs Barcelona",
"startDate": "2026-08-16T19:00:00.000Z"
},
"sport": { "id": "6046", "name": "Football" },
"league": { "id": "38", "name": "LaLiga" },
"market": { "id": "1", "name": "1X2" },
"selection": { "id": "271", "name": "Real Madrid", "line": null },
"price": 2.50,
"status": "WON"
}
]
}
}
curl -s -X POST "https://casino.example.com/api/sportsbook/transaction" \
-H "Authorization: Bearer <your service key>" \
-H "Content-Type: application/json" \
-d '{
"type": "win",
"amount": 25.00,
"currency": "USD",
"reference": "payout_3b7d0c11",
"parentReference": "bet_9f2c1e4a",
"playerId": "10",
"bet": {
"id": "68a0f1c2d3e4f5a6b7c8d9e0",
"kind": "SINGLE",
"status": "WON",
"stake": 10.00,
"totalStake": 10.00,
"totalOdds": 2.50,
"potentialPayout": 25.00,
"payout": 25.00,
"system": null,
"placedAt": "2026-08-16T15:04:05.000Z",
"settledAt": "2026-08-16T21:52:10.000Z",
"selections": [
{
"fixture": {
"id": "11223344",
"name": "Real Madrid vs Barcelona",
"startDate": "2026-08-16T19:00:00.000Z"
},
"sport": { "id": "6046", "name": "Football" },
"league": { "id": "38", "name": "LaLiga" },
"market": { "id": "1", "name": "1X2" },
"selection": { "id": "271", "name": "Real Madrid", "line": null },
"price": 2.50,
"status": "WON"
}
]
}
}'
Next: Prize — paying a bet race's winners.