Notell API Docs
Русский

Features

Round cancel and refunds

A paid round starts with a bet callback. If your wallet does not confirm it, the platform keeps retrying the same transaction — but not for ever. This page describes how a round is cancelled, when a refund callback is sent and how you can cancel an unfinished round yourself.

Automatic cancel (unconfirmed bet)#

StepWhat happens
1The round is created with a bet operation. Every attempt carries the same transaction id and body.
2If the bet is still not confirmed after the cancel policy — 10 minutes by default (or 600 attempts) — the platform cancels the round.
3The bet is closed and never sent again. A refund operation is created for the same amount with meta.original_transaction = the bet's meta.transaction.
4The refund is delivered with the usual retry rules until you answer ok.

For the player the round ends as rejected: nothing is played, no result is revealed, a reload shows the same, and a new round can be started. The player's balance is correct as soon as your wallet confirms the refund (at once if the bet was never debited).

The policy values are configured per environment by the platform; ask your account manager if you need other values.

Your wallet's side#

Implement refund as described in Wallet callbacks. The two cases that matter:

  • the bet was debited (the answer was lost): credit it back once;
  • the bet was never received: record the transaction id as cancelled, answer ok, and refuse the bet if it arrives later (TRANSACTION_CANCELLED).

Cancelling a round yourself — round_cancel#

bash
curl -s -X POST https://notell-api.com/gameActions.do -H 'content-type: application/json' -H 'Idempotency-Key: cancel-b2a7' -d '{
  "method": "round_cancel",
  "partner": "YOUR_PARTNER_ID",
  "api_key": "YOUR_API_KEY",
  "round_id": "b2a7…"
}'
json
{
  "status": "ok",
  "round": {
    "round_id": "b2a7…", "state": "cancelled", "result": "cancelled",
    "reason": "operator_cancel", "source": "operator",
    "refund": {"transaction": "c41e…", "amount": "1.50", "status": "pending"}
  }
}

round_id is meta.round_id of the round's wallet callbacks (or round_id from report_rounds). refund.status is pending until your wallet confirms the refund (look it up with report_rounds). A repeat returns result: "already_cancelled" with the same refund transaction.

A round can be cancelled when

  • its bet is not confirmed yet, or
  • its bet is confirmed but the result has not been shown to the player and no win is being credited (for example a bonus round the player has not opened).

Otherwise the answer is HTTP 409 ROUND_NOT_CANCELLABLE — a finished round, a win being credited, a result already shown, or a free-spin round (nothing was debited). ROUND_NOT_FOUND (404) means the id is not a round of your project; ROUND_BUSY (409) means a wallet call of the round is in flight — retry in a few seconds. The method needs partner, api_key and an allowlisted IP like the other /gameActions.do methods.

Money rules#

  • One bet is refunded at most once; the refund amount always equals the bet.
  • Debit, credit and refund are each sent with a unique transaction id and repeated unchanged: your wallet answers a repeat from its record.
  • report_ggr counts bets − refunds − wins; see Reporting.
Documentation for operators and integrators.TEST_ONLY platform: non-withdrawable units, no real payments.