Base URL: https://supercell-api.apply.coupons/v1 | Authentication: HTTP Basic
New /v1/orders endpoint now available! Retrieve paginated orders with optional status filtering. Supports new, processing, completed, canceled, and sign_in_verified status filters.
New /v1/cancel-order endpoint allows partners to cancel orders that are still in "processing" status before OTP submission.
Added collapsible sections, copy buttons for code snippets, and improved overall documentation styling for better developer experience.
username and account password as password.
Authorization: Basic base64(username:password)
{
"success": true|false,
"data": {...} | [],
"message": "Human readable message"
}
Returns all categories allowed for the authenticated partner, including required fields for ordering.
GET /v1/categories
{
"success": true,
"data": [
{
"id": 54,
"title": "Brawl Stars",
"fields": [
{
"id": 17,
"name": "supercell",
"label": "Supercell ID Gmail",
"type": "text",
"regex": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
}
]
},
{
"id": 55,
"title": "Clash of Clans",
"fields": [
{
"id": 18,
"name": "player_tag",
"label": "Player Tag",
"type": "text",
"regex": "^#[A-Z0-9]{4,10}$"
}
]
}
],
"message": "Product Categories retrieved successfully."
}
curl -u username:password https://supercell-api.apply.coupons/v1/categories
{
"success": false,
"message": "Product Categories not found."
}
| Parameter | Type | Required | Description |
|---|---|---|---|
category_id | integer | No | Filter products by category ID |
Fetches all products or products filtered by category_id. Price is in partner's currency.
GET /v1/products?category_id=54
{
"success": true,
"data": [
{
"id": 35,
"name": "Brawl Stars - 30 Gems - 3.20 USD",
"price": "3.20",
"currency": "USD"
},
{
"id": 36,
"name": "Brawl Stars - 80 Gems - 8.00 USD",
"price": "8.00",
"currency": "USD"
}
],
"message": "Products retrieved successfully."
}
curl -u username:password "https://supercell-api.apply.coupons/v1/products?category_id=54"
{
"success": false,
"message": "Products not found."
}
Returns partner's current wallet balance and currency symbol.
GET /v1/check-balance
{
"success": true,
"data": {
"balance": 41.50,
"currency": "USD"
},
"message": "User balance retrieved successfully."
}
curl -u username:password https://supercell-api.apply.coupons/v1/check-balance
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | No | Filter by status: new, processing, completed, canceled, sign_in_verified |
per_page | integer | No | Items per page (default: 15, min: 1, max: 100) |
page | integer | No | Page number (default: 1) |
GET /v1/orders?status=processing&per_page=10&page=1
{
"success": true,
"data": {
"orders": [
{
"id": 12345,
"product_name": "Brawl Stars - 30 Gems",
"status": "processing",
"created_at": "2025-01-15 10:30:00 UTC",
"updated_at": "2025-01-15 10:35:00 UTC"
},
{
"id": 12344,
"product_name": "Clash of Clans - 500 Gems",
"status": "processing",
"created_at": "2025-01-14 08:20:00 UTC",
"updated_at": "2025-01-14 09:00:00 UTC"
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total": 25,
"last_page": 3
}
},
"message": "Orders retrieved successfully."
}
curl -u username:password "https://supercell-api.apply.coupons/v1/orders?status=processing&per_page=10&page=1"
{
"success": false,
"message": "Validation Error.",
"data": {
"status": ["The selected status is invalid."]
}
}
| Parameter | Type | Required | Description |
|---|---|---|---|
product_id | integer | Yes | ID of the product to order |
fields | array | Yes | Array of field objects with name and value |
fields array) against product category's configuration (regex, etc.).POST /v1/create-order
{
"product_id": 35,
"fields": [
{"name": "supercell", "value": "[email protected]"}
]
}
{
"success": true,
"data": {
"order_number": 12345
},
"message": "Order Created Successfully"
}
curl -u username:password -X POST https://supercell-api.apply.coupons/v1/create-order \
-H "Content-Type: application/json" \
-d '{"product_id":35,"fields":[{"name":"supercell","value":"[email protected]"}]}'
{ "success": false, "message": "Please top up your balance by 3.20 USD." }
{ "success": false, "message": "Product not found or not accessible." }
{
"success": false,
"message": "Validation Error.",
"data": { "fields.supercell": ["The Supercell ID Gmail field format is invalid."] }
}
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | integer | Yes | ID of the order |
otp | string | Yes | OTP code (4-10 characters) |
POST /v1/send-order-otp
{
"order_id": 12345,
"otp": "123456"
}
{
"success": true,
"data": {
"order_id": 12345,
"otp": "123456"
},
"message": "OTP submitted successfully."
}
curl -u username:password -X POST https://supercell-api.apply.coupons/v1/send-order-otp \
-H "Content-Type: application/json" \
-d '{"order_id":12345,"otp":"123456"}'
{
"success": false,
"message": "Validation Failed",
"data": { "otp": ["Please enter the OTP code."] }
}
{ "success": false, "message": "Order not processing or exist" }
{ "success": false, "message": "OTP has already been submitted." }
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | integer | Yes | ID of the order to cancel |
POST /v1/cancel-order
{
"order_id": 12345
}
{
"success": true,
"data": {
"order_id": 12345
},
"message": "Order cancelled successfully."
}
curl -u username:password -X POST https://supercell-api.apply.coupons/v1/cancel-order \
-H "Content-Type: application/json" \
-d '{"order_id":12345}'
{
"success": false,
"message": "Validation Failed",
"data": { "order_id": ["Order ID is required."] }
}
{ "success": false, "message": "Order not found or status is not processing." }
{ "success": false, "message": "The OTP code has already been entered by the client!" }
POST request to your registered callback URL. You must provide this URL to us.
If the order is successfully completed, you will receive the following JSON payload:
{
"success": true,
"message": "Your order has been completed",
"order_id": 12345
}
If the order fails for any reason (e.g., wrong OTP, item already exists), you will receive this payload structure:
{
"error_code": "wrong_otp",
"message": "Wrong OTP code. The OTP code is sent to the email address linked to your Supercell account.",
"order_id": 12345
}
The following are the possible error codes that can be sent in a fail callback:
| Error Code | Description |
|---|---|
wrong_otp |
Wrong OTP code. The OTP code is sent to the email address linked to your Supercell account. |
wrong_account |
Wrong email address. You can reuse your voucher code after logging in to the correct email account. |
otp_not_entered |
OTP code not entered. |
item_already_exist |
This product already exists on your account. You can activate this product only once per account. |
event_not_exist |
This event already not exist. |
discount_not_exist |
This product is only available for accounts with an active discount. There is no discount on your account. |