Wallet Codes
Create and manage redeemable wallet codes for promotions, gifts, refunds, and referrals
Wallet codes are redeemable codes that add credit to a customer's wallet. Use them for promotions, gift cards, referral rewards, refund credits, and goodwill gestures.
What are Wallet Codes?
A wallet code is a unique alphanumeric string that a customer redeems to receive wallet credit. Codes can be restricted to specific customers or available to anyone.
Code Types
| Type | Use Case | Example |
|---|---|---|
| goodwill | Service recovery, apology credit | "Sorry for the disruption" |
| promotional | Marketing campaigns, seasonal offers | "Summer 2026 promo" |
| gift | Gift cards, prepaid credit | "Birthday gift from John" |
| referral | Referral program rewards | "Referred by customer X" |
| refund | Refund issued as wallet credit | "Refund for INV-001" |
Creating Codes
From the Dashboard
- Go to Product > Wallet Codes
- Click Create Code
- Configure:
- Amount — Credit value in your currency
- Code type — Select from the types above
- Code — Auto-generated (
RK-XXXX-XXXXformat) or enter a custom code - Customer restriction — Any customer, or a specific customer
- Expiry date — Optional; code becomes invalid after this date
- Description — Internal note
- Click Create
Via the API
POST /v2/wallet-codes
{
"amountCents": 2500,
"currency": "GBP",
"codeType": "promotional",
"customCode": "SUMMER2026",
"customerId": null,
"expiresAt": "2026-09-01T00:00:00Z",
"description": "Summer promotion"
}Code Format
- Auto-generated:
RK-XXXX-XXXX(uppercase alphanumeric, 8 characters after prefix) - Custom: Any string up to 50 characters (automatically uppercased, spaces removed)
Custom codes are validated for uniqueness within the merchant's account.
Customer Restrictions
| Mode | Behavior |
|---|---|
| Any customer | Any customer of the merchant can redeem the code |
| Specific customer | Only the assigned customer can redeem |
When a code is restricted to a specific customer, other customers see an "Invalid code" error.
Expiry and Auto-Expiry
- Set an optional expiry date when creating a code
- A daily cron job marks expired codes as
expired - Expired codes cannot be redeemed
- Already-redeemed credits are not affected by code expiry (lot expiry is separate)
Redemption Flow
Customer Portal
- Customer logs into the Customer Portal
- Clicks Redeem a Code on their wallet balance card
- Enters the code
- Credit is added instantly to their wallet
At Checkout
- Customer sees "Have a code?" input on the checkout page
- Enters the code
- Credit is applied to the invoice total
- Remaining balance (if any) stays in the wallet
Via API
POST /v2/wallet-codes/{codeId}/redeem
{
"customerId": "cust_abc123"
}Status Lifecycle
active → redeemed
active → expired
active → revoked| Status | Description |
|---|---|
| active | Code is available for redemption |
| redeemed | Code has been redeemed by a customer |
| expired | Code passed its expiry date |
| revoked | Code was manually revoked by the merchant |
Managing Codes
View All Codes
Go to Product > Wallet Codes to see all codes with status, amount, customer, and dates.
Revoke a Code
- Find the code in the list
- Click the actions menu
- Select Revoke
Revoking a code does not remove credit already redeemed.
Bulk Create
Use the API to create multiple codes programmatically for campaigns:
# Create 100 promotional codes
for i in $(seq 1 100); do
curl -X POST /v2/wallet-codes \
-d '{"amountCents": 1000, "codeType": "promotional"}'
doneRelated
- Wallets Overview — How wallets work
- Managing Balances — Credit and debit operations
- Customer Portal — Customer code redemption