Guides
Testing and go-live
Your integration has to prove that every operation behaves as documented, including the unhappy paths. Run the Operator API checks against the sandbox, and cover the Wallet scenarios in your own test suite.
Check it yourself first
Operator API vectors
Reproduce both signatures of the Operator API vectors in your test suite. Then a 200 from the sandbox catalog proves the rest.
Wallet vectors
Accept both requests of the Wallet vectors, then refuse them once you change a byte of the body, the target or the signature.
Our signer and verifier examples pass these vectors in our own test suite, so you can compare your output with theirs.
Operator API scenarios
| # | Scenario | Expected result |
|---|---|---|
| 1 | Signed GET /v1/games | 200 with your Games. |
| 2 | A second page with cursor, then the same cursor with another filter. Needs more Games than limit; the sandbox lists one. | The next page, then 422 validation_failed. |
| 3 | Create a demo GameSession | 201 with id, launch_url, expires_at and a Location header. |
| 4 | The same request again with the same key and a new signature | 201 with the same id and a new launch_url. The first URL no longer opens the game. |
| 5 | The same key with another body | 409 idempotency_conflict. |
| 6 | A request that reuses a nonce | 401 authentication_failed. |
| 7 | A body changed after signing | 401 authentication_failed. |
| 8 | A combination outside your launch combinations, such as another locale | 404 resource_not_found. |
| 9 | Read the GameSession after pressing Play | 200 with status: "active". |
| 10 | The game in an iframe on a registered origin, then on another origin. Not possible in the sandbox, where only our demo page may frame the game. | It plays on the first; the browser blocks the second, unless any HTTPS page is allowed. |
Wallet acceptance scenarios
Each scenario lists the result your Wallet must produce. “Receipt” means a 200 receipt that echoes the full command identity. Balances are in minor units.
| # | Scenario | Expected result |
|---|---|---|
| 1 | A Debit, then a Credit with a positive payout | Two succeeded receipts. The balance drops by the stake, then rises by the payout; balance_after shows both steps. Your books show the Round settled after the Credit, although it carries round_closed: false. |
| 2 | A Debit, then a zero Credit with reason: "round_close" | Two succeeded receipts. The Credit leaves the balance unchanged. |
| 3 | A Debit larger than the balance | A rejected receipt with insufficient_funds. The balance is unchanged. |
| 4 | The same Debit twice | The same receipt twice, with the same balance_after. Money moves once. |
| 5 | Scenario 3 repeated after funds were added to the account | Still insufficient_funds: a rejection is final for its ID. |
| 6 | A known transaction_id with another amount, player or endpoint | 409 transaction_conflict. The original is unchanged. |
| 7 | A Debit whose answer is dropped after your commit, then a status lookup and a repeat | The lookup returns the receipt; the repeat returns the same receipt. Money moves once. |
| 8 | A status lookup for an unknown ID | 404 problem with code: "not_found". |
| 9 | A new Debit with an expired Operator Session Token | A rejected receipt with session_invalid. |
| 10 | A repeat of a succeeded Debit after the token expired | The original succeeded receipt. |
| 11 | A Credit after the GameSession and the token ended, without a token | A succeeded receipt. |
| 12 | A Reversal of a succeeded Debit, sent twice | Succeeded with refunded, twice the same receipt. The stake comes back once. |
| 13 | A second Reversal, with another ID, of the same Debit | Rejected with original_already_reversed and the first Reversal’s ID in first_reversal_id. |
| 14 | A Reversal before its Debit, then the Debit | The Reversal succeeds with prevented; the Debit is rejected with transaction_cancelled. No money moves. |
| 15 | A Reversal of a rejected Debit | Succeeded with no_effect. |
| 16 | A Reversal whose player or amount differs from the original Debit | 409 transaction_conflict. No money moves. |
| 17 | Twenty identical Debits at the same time | One effect; every answer is the same receipt. |
| 18 | A Credit of 9007199254740993 minor units | Stored and echoed exactly, not rounded to …992. |
| 19 | A wrong token, a bad or expired signature, or a replayed nonce | 401 authentication_failed with WWW-Authenticate: Bearer realm="wallet-api". No effect. |
| 20 | A body that doesn’t match its Content-Digest | Refused before parsing. No effect. |
| 21 | A balance request with a valid token, then with an invalid one | The balance with the echoed identity, then a problem response and no balance. |
| 22 | Any response | Cache-Control: no-store, X-Content-Type-Options: nosniff and a UUID v4 X-Request-Id. |
| 23 | The Content-Type of any response | Exactly application/json or application/problem+json, with no charset, and no compression. |
Run scenarios 4, 7 and 17 against your real database, not a mock: they prove your locking and deduplication.
Go-live checklist
Production isn’t open yet. Use this list to prepare; it applies once it opens.
Your backend
- Production signing key generated and stored in your secret store; its public key and key ID sent to us.
- Production token stored as a secret; no token, signature or launch URL in your logs.
- Session creation retries with the same Idempotency-Key and body, and stops before 24 hours.
- Requests carry the real player IP, country, currency and locale, within your launch combinations.
- Your page origins, and the lobby and cashier URLs you send, are registered for every production Brand, or the Brand is set up to accept any.
Your Wallet
- The production endpoint meets the endpoint requirements.
- It trusts our production Wallet signing key and the production Wallet access token only.
- The acceptance scenarios pass against your production build.
- Your monitoring alerts on rejected Credits and on unusual rejection rates.
Operations
- Support knows where to find the GameSession, Round and transaction IDs, and how to report an issue to us.
- A contact on each side for incidents, and a plan for rotating keys and tokens before they expire.