Prerequisites: Your API key (
zupy_pk_*) and familiarity with the Authentication page. Z.What Are Z$ Tokens?
| Property | Detail |
|---|---|
| Full name | Zupy Dollar (Z$) |
| Blockchain | Solana mainnet |
| Token type | Compressed SPL token (Merkle tree) |
| Precision | 6 decimal places |
| Earning | Automatic — triggered when points are added |
| Usage | Top up reward redemptions when points are insufficient |
| Transferability | Not transferable between customers via API |
How Customers Earn Z$
Z$ tokens are distributed automatically when a partner adds points to a customer. There is no separate endpoint to call.Key Details
- Automatic: Z$ distribution is a side effect of points addition
- Async: Distribution happens via a background worker (Celery task) — not instant
- Configured by Zupy: The Z$ bonus amount per points addition is configured by Zupy ops per company, not by partners
- Wallet creation: If the customer doesn’t have a wallet yet, one is created on first distribution
Checking Z$ Balance
Real-Time On-Chain Balance
Query the customer’s real-time Z$ balance directly from the Solana blockchain:| Field | Type | Description |
|---|---|---|
z_balance | string | Z$ balance with 6 decimal places (e.g., "150.000000") |
wallet_address | string | Solana wallet address (compressed token account) |
has_wallet | boolean | Whether the customer has a Z$ wallet |
error | string | null | Error message if Solana query failed (e.g., "timeout") |
Cached Balance (Customer Profile)
The customer profile also includes a cached Z$ balance:zupy_balance field:
zupy_balance in the customer profile is a cached off-chain value. It may lag behind the actual on-chain balance by a few minutes. For real-time balance, use the /z-balance/ endpoint.| Method | Endpoint | Freshness | Use When |
|---|---|---|---|
| Real-time | GET /api/v2/customers/{id}/z-balance/ | Live on-chain query | Displaying balance before redemption, showing wallet details |
| Cached | GET /api/v2/customers/{id}/ → zupy_balance | May lag a few minutes | Showing balance in a list view, non-critical display |
Using Z$ in Reward Redemption (Top-Up)
When a customer doesn’t have enough points for a reward, Z$ tokens can cover the gap. This is called a top-up.How Top-Up Works
- Customer wants a reward that costs 500 points
- Customer only has 450 points
- With
use_z_tokens: true, Z$ covers the 50-point gap (up to 20% of the reward cost) - A 20% markup is applied to the Z$ portion
| Field | Type | Description |
|---|---|---|
z_tokens_used | string | Z$ tokens spent on this redemption |
new_z_balance | string | Customer’s remaining Z$ balance after redemption |
Top-up calculation breakdown
Top-up calculation breakdown
In the example above:
- Reward cost: 500 points
- Customer has: 450 points + 1,150 Z$
- Points used: 450 (all available points)
- Points gap: 50 points
- **Z (50 is within cap)
- **Z
- 20% markup: 50 Z**
- Z$ used: 60.000000
- Remaining Z$: 1,150 - 60 = 1,090.000000
422 error. The markup percentage is configured globally by Zupy and is not visible to partners via the API.Important Notes & FAQ
Can Z$ be transferred between customers?
Can Z$ be transferred between customers?
No. Z balance is tied to their individual compressed token account on Solana.
Can partners configure the Z$ bonus amount?
Can partners configure the Z$ bonus amount?
No. The Z$ distribution amount per points addition is configured by Zupy ops, not by partners. Contact Zupy support if you need to discuss bonus amounts for your company.
Are Z$ real blockchain tokens?
Are Z$ real blockchain tokens?
Yes. Z$ tokens exist on Solana mainnet as compressed SPL tokens stored in a Merkle tree. They are real blockchain assets, not just database entries. The
/z-balance/ endpoint queries the Solana blockchain in real time.What if the customer has no wallet?
What if the customer has no wallet?
If a customer has never received Z (triggered by a points addition). No action is needed from the partner.
What if the Solana network is slow?
What if the Solana network is slow?
The
/z-balance/ endpoint has a timeout. If Solana is slow or unreachable, the response returns HTTP 200 with "error": "timeout" and the balance may be unavailable. Use the cached zupy_balance from the customer profile as a fallback.Does the customer need to know about blockchain?
Does the customer need to know about blockchain?
No. Z balance” in their loyalty interface — the blockchain implementation is an internal detail. Partners should present Z$ as a supplementary loyalty currency, not a crypto token.
Next Steps
Coupon Lifecycle
Learn the complete coupon flow from reward browsing to validation
OTP Flow
Set up customer identity verification for sensitive operations
API Reference
Browse all endpoints with request/response schemas