Download OpenAPI specification:
Contract between the prediction-markets platform and a casino's backend.
This spec is split by direction:
Platform-hosted (served by us): the JWKS endpoint casinos use to verify
our outbound tokens. Documented here under paths.
Casino-hosted (implemented by you): the seamless-wallet API we call to
move money — /wallet/debit, /wallet/credit, /wallet/rollback,
/wallet/balance. These live under your configured base URL and are
protected by platformJwt.
Authentication is described in docs/casino-integration/outbound-auth.md; the wallet contract in docs/casino-integration/wallet.md.
Public JSON Web Key Set used to verify the ES256 JWTs the platform sends on outbound server-to-server calls. Public and unauthenticated. Cache by kid and re-fetch on an unknown kid (key rotation).
{- "keys": [
- {
- "kty": "EC",
- "crv": "P-256",
- "x": "X4OXjuCQsXv9svic5dRxtHJmuBKConxegerfg7N7fis",
- "y": "jrurAogjqwsVfd2NoMfYOA8PNHSwXrcHQDpDqiVCjVQ",
- "kid": "gIeicZJ1yIkQbjShOz7L3N6FTnFKy8ClCn54F__aFQg",
- "use": "sig",
- "alg": "ES256"
}
]
}Casino-hosted seamless-wallet endpoints the platform calls. All are authenticated with platformJwt and idempotent on txRef.
Reserve amountCents from the player's balance for a bet. Idempotent on txRef: a repeat with the same txRef MUST return the original result without charging again. If the player can't cover it, reject with INSUFFICIENT_FUNDS (HTTP 400) or HTTP 402 — the platform treats both as a clean bet rejection.
| txRef required | string The platform's idempotency reference for this operation, unique per tenant. The same txRef must never be applied twice. |
| playerId required | string The casino's player id (the externalId from the player's token). |
| amountCents required | integer >= 1 Amount in minor units (cents). |
| currency required | string Value: "EUR" |
object Optional bet context for the casino's records. |
{- "txRef": "string",
- "playerId": "string",
- "amountCents": 1,
- "currency": "EUR",
- "context": {
- "betId": "string",
- "marketId": "string",
- "outcomeId": "string"
}
}{- "transactionId": "string",
- "balanceCents": 0
}Add amountCents to the player's balance — a winning payout at resolution or a stake refund on cancellation. Idempotent on txRef.
| txRef required | string The platform's idempotency reference for this operation, unique per tenant. The same txRef must never be applied twice. |
| playerId required | string The casino's player id (the externalId from the player's token). |
| amountCents required | integer >= 1 Amount in minor units (cents). |
| currency required | string Value: "EUR" |
object Optional bet context for the casino's records. |
{- "txRef": "string",
- "playerId": "string",
- "amountCents": 1,
- "currency": "EUR",
- "context": {
- "betId": "string",
- "marketId": "string",
- "outcomeId": "string"
}
}{- "transactionId": "string",
- "balanceCents": 0
}Reverse the debit identified by originalTxRef — used when a bet fails after its stake was debited. Idempotent on txRef; reversing an unknown or already-reversed debit MUST be a safe no-op returning success.
| txRef required | string This rollback's own idempotency reference. |
| originalTxRef required | string The txRef of the debit being reversed. |
| playerId required | string |
| amountCents required | integer >= 1 |
| currency required | string Value: "EUR" |
{- "txRef": "string",
- "originalTxRef": "string",
- "playerId": "string",
- "amountCents": 1,
- "currency": "EUR"
}{- "transactionId": "string",
- "balanceCents": 0
}