Validator
Run 6 tests against your callbackUrl at any time, with your own API key.
On this page
Run it#
Works with pk_test_ and pk_live_ keys. No provider and no game is involved. Without a callbackUrl the call returns 403: ask us to set one.
POST /api/v1/validate/run
x-api-key: pk_test_...
201 Created
{
"id": "cmo73evf200011wtocot69vrb", "clientId": "...",
"status": "RUNNING", "startedAt": "2026-04-20T11:09:42.158Z"
}Results#
Poll until status is no longer RUNNING. An unknown id returns 404, another client's run 403. GET /api/v1/validate lists all your validation runs, most recent first.
GET /api/v1/validate/:id
x-api-key: pk_test_...
200 OK
{
"id": "cmo73evf200011wtocot69vrb",
"status": "PASSED", // RUNNING | PASSED | FAILED | ERROR (no test passed)
"startedAt": "2026-04-20T11:09:42.158Z",
"completedAt": "2026-04-20T11:09:42.785Z",
"balanceResult": { "passed": true, "sent": {}, "received": {}, "durationMs": 244 },
"betResult": { "passed": true },
"winResult": { "passed": true },
"refundResult": { "passed": true },
"unknownResult": { "passed": true },
"idempotencyResult": { "passed": true }, // a failed test also has "note" or "error"
"passedCount": 6, "failedCount": 0,
"summary": "balance: ok ...",
"triggeredBy": "api-key:...",
"client": { "name": "...", "email": "...", "callbackUrl": "..." }
}The 6 tests#
| Test | What it sends | What it expects |
|---|---|---|
| 1. balance | A val_ player | A numeric balance |
| 2. bet | A bet of 10.00 | balance and transaction_id |
| 3. win | A win of 5.00 in the same round | balance and transaction_id |
| 4. refund | A separate bet of 20.00, then action: refund with the same round_id and its own transaction_id | balance and transaction_id. Treat refund as rollback. |
| 5. unknown player | A balance call for an UNKNOWN_val_ player | An error (code, error, error_code or message) without balance |
| 6. idempotency | Resends the test-2 transaction_id twice with a different amount and round_id | Return the cached reply: the balance must not drop |
transaction_id is optional on live traffic but required to pass the Validator; balance must be a JSON number.
Validator requests#
Validator requests use the legacy names (_originalPlayerId, _sessionId, transaction_id, round_id), carry X-AGIXX-Mode: validation and X-Aggregator-Validation: 1, and no X-Aggregator-Event or deprecation headers. They are signed. Timeout 10 s.
{
"action": "bet", "provider": "VALIDATION",
"_originalPlayerId": "val_9f31c0aa", "player_id": "val_9f31c0aa",
"_sessionId": "val_session_mgx1", "currency": "TRY",
"amount": "10.00", "round_id": "round_val_1761300000000",
"transaction_id": "tx_val_bet_1761300000000"
}| Player id | Expected behaviour |
|---|---|
val_* | Create it automatically with a balance (for example 1000.00), only when provider is VALIDATION |
UNKNOWN_val_* | Return an error; do not create it |
Detecting validationThe headers are not part of the signature;
provider: "VALIDATION" in the body is. Use the body to decide, and the header for logs.Questions about your integration?Write to us with your account name and, if you have one, a sessionId or transactionId. integration@agixx.net