Skip to content

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.

HTTP
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.

JSONC
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#

TestWhat it sendsWhat it expects
1. balanceA val_ playerA numeric balance
2. betA bet of 10.00balance and transaction_id
3. winA win of 5.00 in the same roundbalance and transaction_id
4. refundA separate bet of 20.00, then action: refund with the same round_id and its own transaction_idbalance and transaction_id. Treat refund as rollback.
5. unknown playerA balance call for an UNKNOWN_val_ playerAn error (code, error, error_code or message) without balance
6. idempotencyResends the test-2 transaction_id twice with a different amount and round_idReturn 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.

JSON
{
  "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 idExpected 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
Validator - API Documentation | AGIXX