> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokengift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How it works

> Gift cards, wallets, and a double-entry ledger — how credits move through TokenGift.

## The three roles

* **Givers** buy credits — on a top-up page or as a portable gift code. No account needed.
* **Developers** own apps. Each app has a wallet and an OpenAI-compatible API key.
* **Apps** spend credits automatically as they make AI requests.

## Credits are held in a double-entry ledger

Every credit in TokenGift lives in an append-only, double-entry ledger. Purchases create
funding *lots* with their own expiry dates; every AI request reserves an estimated amount,
then settles for exactly what the request cost. That means:

* Balances are always derivable and auditable — no "mystery" deductions.
* The difference between the estimate and the actual cost is returned instantly.
* If a request fails, the full reservation is released. You only pay for what ran.

## Privacy by design

Givers see *that* they funded an app — never *how* it uses the credits, which models it
calls, or what its prompts contain. Developers' internals stay private.

## Expiry

Credits expire **150 days after purchase** and cannot be refunded or converted to cash.
This keeps TokenGift simple, safe, and compliant. Details: [Expiry policy](/reference/expiry).
