wallet returns the spendable balance
alongside lifetime received and spent totals, denominated in your org’s points
currency.
These are member-mode calls: they use the member token, not the
Org-API-Key. See Authentication. Whether you read sandbox or
live balances is selected by the key the token was minted from - see
Environments.
Get the wallet
wallet() calls GET /v1/wallet and returns a Wallet for the member the token
was minted for. The snippet below reads the balance, totals, and currency (it
also shows the wallet embedded in eligibility):
curl
The Wallet schema
| Field | Type | Description |
|---|---|---|
balance | number | Spendable points available now. This is what a redemption is checked against. |
amountReceived | number | Lifetime total of points the member has received. |
amountSpent | number | Lifetime total of points the member has spent. |
currency.name | string | The points-currency name (for example, your org’s points brand). |
currency.symbol | string | The points-currency symbol, for display next to amounts. |
balance is the spendable amount and the figure a redemption is checked
against - a redemption fails with INSUFFICIENT_POINTS when balance is below
the offer’s pointsPrice. amountReceived and amountSpent are running
lifetime totals and do not decrease when points are spent.Minting and the ledger
Reading the wallet is member-mode, but minting points is server-side. Credit points and inspect the per-transaction ledger (walletTransactions) from your
backend - see Points and wallet.
Next steps
Points and wallet
Server-side minting and the credit/debit transaction ledger.
Eligibility
Read tier and wallet together in one call.
Redemptions
Spend the balance by redeeming offers.