Developer Documentation v2.0

Game Voucher Reseller API

Automate your game top-up business with our lightning-fast B2B API. We provide a single integration point for Smile One Codes, Mobile Legends, PUBG Mobile, and Honor of Kings.

Flexible Delivery

Fulfill orders in sub-seconds either via instant digital voucher PINs or automated direct crediting to Smile One account emails.

HMAC Security

Bank-level HMAC-SHA256 request signing ensures your wallet balance is fully protected.

Simple REST JSON

Standardized JSON endpoints with clear error codes make integration a breeze in any language.

Authentication Overview

The Smile Code Global API uses HMAC-SHA256 signatures to authenticate requests. This ensures that even if your request is intercepted, it cannot be modified or replayed.

Every API request must include the following headers:

  • X-Client-Id Your unique reseller Client ID
  • X-Timestamp The current UNIX timestamp
  • X-Nonce A random unique string for this request
  • X-Signature The HMAC-SHA256 signature of the payload, timestamp, and nonce

Available Endpoints

1. Check Wallet Balance

Returns your current available wholesale balance.

POSThttps://www.smilecode.in/api/v2/smilecode_service/wallet_balance

2. List Products

Retrieve the catalog of supported games and top-up types.

POSThttps://www.smilecode.in/api/v2/smilecode_service/products_list

3. Check Player ID

Validate a player's Game ID (and Zone ID) before placing an order to prevent failed top-ups.

POSThttps://www.smilecode.in/api/v2/smilecode_service/check_id

Required payload: product_id, user_id, zone_id

4. Create Order

Place a live top-up order. The cost will be deducted from your wallet balance.

POSThttps://www.smilecode.in/api/v2/smilecode_service/create_order

Required payload: product_id, sku, user_id, zone_id, client_order_id

Integration Code Samples

Ready-to-use production scripts demonstrating payload canonicalization, UNIX timestamp generation, and HMAC-SHA256 signature calculation across your stack:

PAYLOAD='{"product_id":"smileone-code","sku":"100-brl","user_id":"123456789","client_order_id":"ORDER-001"}'
TIMESTAMP=$(date +%s)
NONCE=$(cat /dev/urandom | tr -dc 'a-z0-9' | head -c 16)
API_KEY="sk_live_your_api_secret_key"
CLIENT_ID="sc_your_client_id"

MESSAGE="${PAYLOAD}.${TIMESTAMP}.${NONCE}"
SIGNATURE=$(echo -n "${MESSAGE}" | openssl dgst -sha256 -hmac "${API_KEY}" | awk '{print $2}')

curl -X POST "https://www.smilecode.in/api/v2/smilecode_service/create_order" \
  -H "Content-Type: application/json" \
  -H "X-Client-Id: ${CLIENT_ID}" \
  -H "X-Signature: ${SIGNATURE}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Nonce: ${NONCE}" \
  -d "${PAYLOAD}"

Standardized JSON Responses

All endpoints return predictable JSON payloads with a top-level success boolean and standardized error codes:

200 OK — Order Success
{
  "success": true,
  "data": {
    "order_id": "MSSCTO260101010203AB04",
    "status": "Success",
    "delivery_code": "SMILE-BR-9281-0491",
    "direct_email": "user@example.com"
  }
}
403 / 401 — Error Payload
{
  "success": false,
  "error": "INVALID_SIGNATURE",
  "message": "HMAC-SHA256 signature does not match canonical payload."
}

Ready to integrate?

Register a reseller account to access your live API keys and our interactive API testing console.

Create Reseller Account