Arkstone
Contact us
Glossary

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

CallTransaction idWithout idempotencyWith idempotency
Debit 5.00r-1001-d100.00 becomes 95.00100.00 becomes 95.00
Same debit, retriedr-1001-d95.00 becomes 90.00Stays 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.

FAQ

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.

Related

Keep reading

01 / TermSeamless walletA casino integration where the player's balance lives only in the operator's wallet, and the casino debits and credits it round by round.
02 / TermCasino aggregatorOne integration that brings casino games from many studios, with one lobby feed and one wallet protocol for all of them.
03 / ArticleSeamless wallet explainedDebit, credit and rollback calls, why each is signed, and why a repeated call must never move money twice.
Next step

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.