Idempotency. Ask twice, pay once.
The rule that stops a retried wallet call from charging or paying a player twice.
Definition
Idempotency is the property that sending the same request more than once has the same effect as sending it once. In a wallet API, a call that repeats a transaction id gets the original answer back, and no money moves a second time.
Why wallet calls need it
Networks fail in untidy ways. A casino sends a debit to the operator's wallet, the wallet takes the money, and the reply is lost on the way back. The casino cannot tell whether the debit went through, so it sends it again.
Without idempotency, that retry takes the stake twice. With it, the wallet sees a transaction id it has already handled and returns the stored result.
A worked example
| Call | Transaction id | Without idempotency | With idempotency |
|---|---|---|---|
| Debit 5.00 | r-1001-d | 100.00 becomes 95.00 | 100.00 becomes 95.00 |
| Same debit, retried | r-1001-d | 95.00 becomes 90.00 | Stays 95.00; first answer returned |
The rule is easy to state. Store each transaction id with its result, and look it up before acting. The id must be unique to one movement, and the lookup and the write must happen as one step, so two copies arriving together cannot both get through.
Idempotency on our platform
Every call from our casino aggregator API to an operator's seamless wallet carries a transaction id and a signature. A repeat is answered without moving money twice, and a failed round is reversed by a rollback that points at the original transaction. Amounts travel as whole minor units, so 500 means 5.00. The same approach serves every studio behind our casino aggregator.
Related terms
- Seamless wallet: the wallet model where idempotency matters most.
- Casino aggregator: one integration for many game studios.
- Double-entry ledger: the record that writes both sides of every movement.
Idempotency questions
What is an idempotency key?
A unique id sent with a request so the server can spot a repeat. In wallet APIs the transaction id usually plays that role.
What should a wallet return for a repeated transaction id?
The same answer it gave the first time, without moving any money.
Is idempotency only for payments?
No. Any request that changes something can use it, but money is where a duplicate does the most harm.
Keep reading
See the whole platform on one call.
30 minutes, no slides. We walk you through the platform or the API you need, answer every question, and send a written price, often the same day.