Wallet API /api/wallet
📝 TODO — this English page is a skeleton. The structure mirrors the Chinese page, which is fully written.
| Method | Path | Description |
|---|---|---|
GET | /api/wallet | Balance, last 50 transactions, available packs |
POST | /api/wallet/topup | Top up (body { "amount": 5 }) |
GET | /api/wallet/usage | Last 100 API requests |
| Pack (USD) | Credits |
|---|---|
5 | 1000 |
20 | 4400 |
50 | 11500 |
Sandbox top-up
Top-ups currently add credits directly and do not involve a payment provider — no money is charged. Responses carry sandbox: true. A real integration replaces this with an order plus a payment callback.
Every ledger entry records balanceAfter, so the account balance always reconciles against the sum of transactions.