Gift Card API
Complete guide for integrating PlaySuper Gift Card Voucher Marketplace API
PlaySuper Gift Card API Documentation
Getting Started
For New Studios (Onboarding Steps)
Follow these steps to get access to the Voucher Marketplace API:
Step 1: Create Your Account
- Go to Dev Playsuper Console
- For Prod Use Playsuper Console
- Sign up / Log in to your account
Step 2: Create an Organization
- Click on "Create Organization"
- Fill in your organization details
- Refresh the page after creation
Step 3: Create a Game
- Click on "Create Game"
- Fill in your game details
- Save the game
Step 4: Generate Your API Key
- Click on your game to open Game Details
- Navigate to View API Keys
- Click Generate API Key
- Copy the generated API key
Step 5: Share with PlaySuper Send your Game API Key to the PlaySuper team. We will:
- Configure your voucher access settings
- Top-up your wallet with initial credits
- Notify you once setup is complete
Step 6: Start Integrating Once notified, use your API key in the x-api-key header to access all voucher APIs.
curl -X GET "https://api-dev.playsuper.io/vouchers/catalog/brands" \
-H "x-api-key: YOUR_GAME_API_KEY"Overview
The Voucher Marketplace API allows studios to purchase digital gift vouchers from various brands and distribute them to their users using the studio's prepaid wallet balance.
Authentication
All requests require your Game API Key.
Headers
| Header | Required | Description |
|---|---|---|
| x-api-key | Yes | Your Game API Key |
| Content-Type | Yes | application/json |
Example
curl -X GET "https://api.playsuper.club/vouchers/catalog/brands" \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json"1. Catalog APIs
1.1 List Voucher Brands
GET /vouchers/catalog/brands
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| page | number | No | 1 | Page number |
| limit | number | No | 20 | Items per page |
| category | string | No | - | Filter by category |
| search | string | No | - | Search by brand name |
Example Request
curl -X GET "https://api.playsuper.club/vouchers/catalog/brands?page=1&limit=20" \
-H "x-api-key: your-api-key-here"Example Response
{
"brands": [
{
"id": "clx123abc",
"brandCode": "AmazonvariableXRyz82xNcsSX8Orm",
"brandName": "Amazon",
"brandImage": "https://cdn.gyftr.com/images/amazon.png",
"categories": ["Shopping", "E-commerce"],
"denomType": "DYNAMIC",
"denominations": { "type": "DYNAMIC", "min": 10, "max": 10000 },
"redemptionType": "ONLINE",
"redemptionUrl": "https://www.amazon.in",
"stockAvailable": true
},
{
"id": "clx456def",
"brandCode": "SwiggyFixedABC123",
"brandName": "Swiggy",
"brandImage": "https://cdn.gyftr.com/images/swiggy.png",
"categories": ["Food", "Delivery"],
"denomType": "FIXED",
"denominations": { "type": "FIXED", "values": [100, 250, 500, 1000] },
"redemptionType": "ONLINE",
"redemptionUrl": "https://www.swiggy.com",
"stockAvailable": true
}
],
"pagination": { "page": 1, "limit": 20, "total": 150, "totalPages": 8 }
}1.2 Get Brand Details
GET /vouchers/catalog/brands/:brandCode
Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
| brandCode | string | Yes | Unique brand identifier |
Example Request
curl -X GET "https://api.playsuper.club/vouchers/catalog/brands/AmazonvariableXRyz82xNcsSX8Orm" \
-H "x-api-key: your-api-key-here"Example Response
{
"id": "clx123abc",
"brandCode": "AmazonvariableXRyz82xNcsSX8Orm",
"brandName": "Amazon",
"brandImage": "https://cdn.gyftr.com/images/amazon.png",
"description": "Shop for millions of products on Amazon.in",
"categories": ["Shopping", "E-commerce"],
"denomType": "DYNAMIC",
"denominations": { "type": "DYNAMIC", "min": 10, "max": 10000 },
"redemptionType": "ONLINE",
"redemptionUrl": "https://www.amazon.in",
"termsAndConditions": "1. Gift card is valid for 1 year from date of issue...",
"stockAvailable": true
}2. Stock APIs
2.1 Check Stock Availability
GET /vouchers/stock/check
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| brandCode | string | Yes | Brand identifier |
| denomination | number | Yes | Voucher face value |
Example Request
curl -X GET "https://api.playsuper.club/vouchers/stock/check?brandCode=SwiggyFixedABC123&denomination=500" \
-H "x-api-key: your-api-key-here"Example Response
{
"brandCode": "SwiggyFixedABC123",
"denomination": 500,
"isAvailable": true,
"quantity": 150
}3. Order APIs
3.1 Place Voucher Order
POST /vouchers/orders/place
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| clientOrderId | string | Yes | Your idempotent order ID |
| brandCode | string | Yes | Brand identifier |
| denomination | number | Yes | Voucher value |
| quantity | number | No | Default 1 |
| clientMetaData | object | No | Optional metadata |
Example Request
curl -X POST "https://api.playsuper.club/vouchers/orders/place" \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"clientOrderId": "ORD-2026-001234",
"brandCode": "SwiggyFixedABC123",
"denomination": 500,
"quantity": 1,
"clientMetaData": {
"userId": "user-abc-123",
"campaign": "winter-rewards",
"reason": "achievement-unlock"
}
}'Success Response
{
"orderId": "vo_clx789xyz",
"clientOrderId": "ORD-2026-001234",
"status": "SUCCESS",
"brandName": "Swiggy",
"denomination": 500,
"quantity": 1,
"amountCharged": 475,
"vouchers": [
{
"voucherCode": "SWGY-XXXX-XXXX-XXXX",
"voucherPin": "1234",
"expiryDate": "2027-01-15T00:00:00.000Z",
"value": 500
}
],
"walletBalance": 9525,
"createdAt": "2026-01-15T10:30:00.000Z"
}Important Notes
clientOrderIdmust be unique.- API is fully idempotent. Reusing the same ID returns the original order.
- Parallel requests with same ID are merged into a single order.
- Wallet is charged only once.
Idempotency Guarantee
If multiple requests with the same clientOrderId arrive simultaneously, only one order is processed. All clients receive the same response, and no duplicate charges occur.
3.2 Check Order Status
GET /vouchers/orders/status
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| clientOrderId | string | Yes | Your order ID |
Example Response
{
"orderId": "vo_clx789xyz",
"clientOrderId": "ORD-2026-001234",
"status": "SUCCESS",
"brandName": "Swiggy",
"denomination": 500,
"quantity": 1,
"amountCharged": 475,
"vouchers": [
{
"voucherCode": "SWGY-XXXX-XXXX-XXXX",
"voucherPin": "1234",
"expiryDate": "2027-01-15T00:00:00.000Z",
"value": 500
}
],
"createdAt": "2026-01-15T10:30:00.000Z",
"completedAt": "2026-01-15T10:30:02.000Z"
}Order Statuses
| Status | Description |
|---|---|
| INITIATED | Order created |
| PROCESSING | Fetching voucher |
| SUCCESS | Voucher delivered |
| FAILED | Payment succeeded but order failed; wallet refunded |
| TIMEOUT | Provider timeout |
| REFUNDED | Order refunded |
4. Settings API
4.1 Get Studio Settings
GET /vouchers/settings
{
"studioId": "studio-abc-123",
"isEnabled": true,
"environment": "PRODUCTION",
"markupPercent": 5,
"rateLimitPerMin": 100,
"dailyLimit": 10000,
"webhookUrl": null
}5. Wallet APIs
5.1 Get Wallet Balance
GET /vouchers/wallet/balance
{
"balance": 10000,
"currency": "INR",
"lastUpdated": "2026-01-15T10:30:00.000Z"
}5.2 Get Wallet Transactions
GET /vouchers/wallet/transactions
{
"transactions": [
{
"id": "wt_abc123",
"type": "DEBIT",
"amount": 475,
"description": "Voucher purchase: Swiggy ₹500",
"status": "COMPLETED",
"source": "VOUCHER_PURCHASE",
"metadata": { "orderId": "vo_clx789xyz", "brandName": "Swiggy" },
"createdAt": "2026-01-15T10:30:00.000Z"
},
{
"id": "wt_def456",
"type": "CREDIT",
"amount": 10000,
"description": "Wallet top-up",
"status": "COMPLETED",
"source": "MANUAL",
"metadata": null,
"createdAt": "2026-01-14T09:00:00.000Z"
}
],
"pagination": { "page": 1, "limit": 10, "total": 25, "totalPages": 3 }
}Error Handling
Error Format
{
"statusCode": 400,
"code": "ERROR_CODE",
"message": "Human readable message",
"timestamp": "2026-01-15T10:30:00.000Z"
}Common Error Codes
| Code | Status | Description |
|---|---|---|
| INVALID_API_KEY | 401 | Missing/invalid API key |
| VOUCHER_ACCESS_NOT_CONFIGURED | 400 | Contact support |
| VOUCHER_ACCESS_DISABLED | 400 | Access disabled |
| BRAND_NOT_FOUND | 404 | Invalid brand |
| INVALID_DENOMINATION | 400 | Value not supported |
| INSUFFICIENT_BALANCE | 400 | Insufficient funds |
| ORDER_NOT_FOUND | 404 | Invalid order ID |
| STOCK_UNAVAILABLE | 400 | Out of stock |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests |
Best Practices
1. Idempotency
Use unique clientOrderId values. Safe to retry the same ID after timeouts.
Wallet is never double-charged.
const clientOrderId = `ORD-${Date.now()}-${crypto.randomUUID().slice(0,6)}`;2. Check Stock Before Ordering
3. Handle Timeouts Gracefully
Poll order status on timeout.
4. Secure Voucher Codes
Store encrypted; never log in plain text.
5. Monitor Wallet Balance
Avoid failed orders due to low balance.
Environments
| Environment | URL | Purpose |
|---|---|---|
| Development | https://dev-api.playsuper.club | Testing |
| Production | https://api.playsuper.club | Live |
Related Guides
- API Reference - REST API for player management, coins, and rewards
- Touchpoints API - Configure visual reward widgets
- Webhooks - Receive real-time notifications for coin transactions
- Console Setup - Set up your account and generate API keys