For resellers

Purchase API documentation

Connect your reseller backend to ADSWAR API v1.3 with a wallet cost ceiling and stable purchase reference, plus stored UID audit evidence kept separate from credential delivery.

ADSWAR API v1.3 · Documentation revision: 5 November 2026

Get API Key Apply for Master Reseller
Domainhttps://status.toonshou.in

Start connecting through the API

Activate API access with one successful wallet top-up of at least ฿1,000. Separate top-ups are not added together.

This is usable wallet credit, not a fee. Once qualified, you do not need to keep a ฿1,000 balance.

Master Reseller is a separate application. It is not required for API access.

Master Reseller

Submit your website and contact details for review. The result will be sent to your account email.

Apply for Master Reseller

Integration kit for your development team

OpenAPI, Node/PHP examples and UID-audit guidance revised 5 November 2026. Verify capabilities, your key and IP, and your own integration before enabling new features.

  1. 1

    Get an API Key

    Sign in, complete one wallet top-up of at least ฿1,000, then go to Account › Purchase API to create a key and register your website server IP.

  2. 2

    Connect your website

    Use this domain and your API Key on your server. Save one stable client_order_id before each new purchase.

  3. 3

    Sync and sell

    Sync products and prices, pay with your wallet, then compare delivery counts before fulfilling your customer order.

Verify readiness before automated purchasing

Authenticate this endpoint with the member API Key and server IP used for purchases. Stop purchasing if authentication fails, the endpoint is missing or the response is incomplete.

GET /api/reseller_capabilities.php

Verify currency and all four purchase flags: durable_idempotency, client_order_lookup, delivery_snapshot, price_ceiling. UID features additionally require facebook_uid_audit=true and facebook_uid_recheck=true. Do not rely on the version label alone. Use your member API key; no ADSWAR administrator, SSH or database access is required.

UID evidence for API orders

data[] and delivery_status keep their existing delivery meaning. uid_check is separate evidence. Checks do not pause credential delivery, buy again or refund automatically.

  • New eligible orders are checked asynchronously after full fulfillment. buy_product, order.php and order_status.php return stored evidence; GET does not contact Facebook to recheck.
  • status: not_applicable = ineligible, not_checked = no check yet, pending/checking = queued/in progress, completed = results stored. Then inspect LIVE/DIE/UNKNOWN and review_required. HTTP 200 from the check request confirms queuing only.
  • Each item includes item_id, requested_amount, matches_current_delivery, origin, requested_at, initial_check and latest_check. Checks contain id, checked_at, live/die/unknown and accounts: code_id, uid, status, checked_at, reason, method and sanitized evidence. Use only results matching the current delivered code set.
  • delivered does not mean LIVE or a successful login. LIVE/DIE reflects public-profile availability at checked_at, not login, ownership or a cause such as IP. Never convert UNKNOWN into DIE or LIVE.
  • Historical orders stay not_checked until explicitly queued. origin=retrospective uses the actual check time and cannot prove status at the time of sale. If evidence cannot be read, UID_AUDIT_UNAVAILABLE accompanies pending, review_required=true, items=[]; existing credential delivery remains available.
  • Resellers may choose to wait for results before downstream delivery. Administrators review issues and any refund manually. UID results never authorize automatic replacement purchases or refunds.

Purchase price, cost ceiling and frozen request

  1. Read a fresh price using the same API Key that will purchase. The member tier discount is already included; do not apply it again. Store money as decimal strings with two fractional digits and calculate using Decimal or integer minor units.
  2. Before the first POST, persist client_order_id, id, amount, coupon and max_total together in your database. max_total is the maximum total ADSWAR wallet debit for this purchase, not your retail price or customer payment. Do not add a budget buffer to hide a price mismatch.
  3. New integrations must provide max_total and a stable client_order_id or Idempotency-Key header. Omission remains accepted for legacy clients, but does not provide the full set of safeguards. Retry with the exact same product, quantity, coupon and ceiling.
  4. HTTP 409 PRICE_CEILING_EXCEEDED means checkout exceeds the saved ceiling: stop and reconcile the quote; never automatically increase max_total. IDEMPOTENCY_CONFLICT means the reference was used with a different payload: look up the original order and inspect the request instead of creating a new reference to bypass the error.

price_quantity_limit is the maximum quantity eligible for the advertised Flash Sale unit price; price_valid_until is its ISO 8601 expiry (both may be null). If your quantity exceeds the quota or the price expires, price × amount is not a guaranteed cost. Refresh and reconcile the quote; catalog price and stock do not reserve an order.

Authentication

Send the X-API-Key header from your server; the legacy api_key query/body parameter is also accepted. Purchases require POST with multipart, urlencoded or JSON data. GET /api/buy_product returns 405. Keep the key out of browser code and logs.

The example uses demo products and an explicit budget. Set ADSWAR_API_KEY on your server and verify the product, quantity and cost before sending a real purchase. No redirects or automatic retries are enabled.

curl --request POST --proto '=https' \
  --connect-timeout 10 --max-time 45 \
  "https://status.toonshou.in/api/buy_product?lang=en" \
  --header "X-API-Key: $ADSWAR_API_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '{"action":"buyProduct","id":"12","amount":"2","coupon":"","client_order_id":"SHOP-20261030-0001","max_total":"70.00"}'

Prevent duplicate purchases and recover results

  1. Persist client_order_id with id, amount, coupon and max_total before POST; retry with every value unchanged. replayed=true identifies the existing order and does not charge again. Purchases without a reference have no durable duplicate protection.
  2. If POST times out, use GET order_status.php with the original client_order_id even if no trans_id arrived. A 404 can occur while the first request is still running. Keep the reference and do not create a new purchase reference.
  3. status="success" does not prove complete delivery. Require delivery_status=delivered, requested_amount and delivered_amount equal to the original quantity, remaining_amount=0 and nonempty, distinct data entries. Also verify the reference, currency and total. data is a full snapshot: replace the previous set, preserve credential text literally, do not decode HTML entities, append duplicates or create new items from repeated snapshots. Your integration must separately match client_order_id/trans_id to its database, require currency=THB and total not exceeding the persisted max_total. A snapshot helper does not replace these order-context checks.
  4. currency and total describe the ADSWAR order. refunded_total records completed ADSWAR refunds; wallet_refunded_total records refunds credited to your ADSWAR wallet. These are not automatic refunds to customers on your website. remaining_amount is not a confirmed refundable quantity.

delivery_status: pending = waiting, partial = incomplete, delivered = complete, cancelled = cancelled, refunded = fully refunded, needs_review = manual review. Follow poll_after_seconds for pending/partial and review other exceptional states before fulfilling or refunding.

curl --get --proto '=https' --connect-timeout 10 --max-time 45 \
  "https://status.toonshou.in/api/order_status.php" \
  --header "X-API-Key: $ADSWAR_API_KEY" \
  --data-urlencode "lang=en" \
  --data-urlencode "client_order_id=SHOP-20261030-0001"
GET/api/reseller_capabilities.php

Read API capabilities without creating an order or charging the wallet. Verify all four flags before automated purchases.

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead

Sample response

{
  "status": "success",
  "api_version": "1.3",
  "capabilities": {
    "durable_idempotency": true,
    "client_order_lookup": true,
    "delivery_snapshot": true,
    "price_ceiling": true,
    "facebook_uid_audit": true,
    "facebook_uid_recheck": true
  },
  "currency": "THB",
  "buy_interval_seconds": 5,
  "poll_after_seconds": 5
}
POST/api/order_uid_check.php

POST queues stored UIDs from your own API order. Supply order or client_order_id; both must identify the same order. Poll order_status.php after queuing. Never submit UIDs or passwords. Limit: 6 requests/minute. Unsupported fields use INVALID_CHECK_INPUT; malformed item_id uses INVALID_ITEM_ID. No delivery pause or wallet debit; owned-history checks remain available when new purchases are disabled.

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead
orderOptionalOrder code (trans_id), or provide client_order_id. At least one is required; if both are provided they must identify the same order.
client_order_idOptionalReference supplied with the original purchase, or provide order. References are scoped to your reseller account.
item_idOptionalOrder-item UUID from uid_check.items, belonging to this order. Omit to queue all eligible items.

Sample response

{
  "status": "success",
  "trans_id": "AW261030A6YQJM7H",
  "uid_check": {
    "version": 1,
    "status": "pending",
    "review_required": false,
    "items": [{
      "item_id": "11111111-1111-4111-8111-111111111111",
      "requested_amount": 1,
      "status": "pending",
      "review_required": false,
      "matches_current_delivery": false,
      "origin": "retrospective",
      "requested_at": "2026-11-05T16:10:00.000Z",
      "initial_check": null,
      "latest_check": null
    }]
  }
}
GET/api/profile.php

Account info and wallet balance

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead

Sample response

{
  "status": "success",
  "msg": "Data retrieved successfully!",
  "data": { "username": "reseller01", "money": "1250.50", "currency": "THB" }
}
GET/api/products.php

Categories and products (prices for your tier)

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead
langOptionalQuery parameter for product names and messages: th, en, vi

Sample response

{
  "status": "success",
  "msg": "Data retrieved successfully!",
  "categories": [
    {
      "id": "1", "parent_id": 0, "name": "Facebook", "icon": "https://.../facebook.png",
      "products": [
        { "id": "12", "name": "Facebook US | 2FA", "price": "35.00", "price_quantity_limit": 2,
          "price_valid_until": "2026-11-01T00:00:00.000Z", "amount": 80,
          "description": "...", "flag": "us", "min": "1", "max": "500" }
      ]
    }
  ]
}
GET/api/product.php

A single product

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead
productRequiredProduct ID

Sample response

{
  "status": "success",
  "msg": "Data retrieved successfully!",
  "product": [
    { "id": "12", "name": "Facebook US | 2FA", "price": "35.00", "price_quantity_limit": 2,
          "price_valid_until": "2026-11-01T00:00:00.000Z", "amount": 80,
      "description": "...", "flag": "us", "min": 1, "max": 500 }
  ]
}
POST/api/buy_product

POST purchase: action=buyProduct, id, amount; new integrations require a stable reference and max_total. Coupon is optional.

Parameters

actionRequiredAlways buyProduct
X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead
idRequiredID of the product to buy
amountRequiredQuantity (within the product's min – max)
couponOptionalCoupon code
max_totalRequired for new integrationsMaximum total wallet debit in store currency, as a decimal string with up to two fractional digits, e.g. "70.00". Required by the new-integration contract; optional only for legacy compatibility. Persist it unchanged for retries.
client_order_idRequired for new integrationsRequired for new integrations, or use Idempotency-Key: unique per account, 1–128 characters, starting with a letter or digit; letters, digits, . _ : - are allowed. Retry with the same reference, id, amount, coupon and max_total.
Idempotency-KeyOptionalHeader alias for client_order_id. If both are sent, their values must match.

Sample response

{
  "status": "success",
  "msg": "Order created successfully!",
  "trans_id": "AW261030A6YQJM7H",
  "client_order_id": "SHOP-20261030-0001",
  "replayed": false,
  "order_status": "COMPLETED",
  "payment_status": "PAID",
  "delivery_status": "delivered",
  "requested_amount": 2,
  "delivered_amount": 2,
  "remaining_amount": 0,
  "currency": "THB",
  "total": "70.00",
  "refunded_total": "0.00",
  "wallet_refunded_total": "0.00",
  "poll_after_seconds": null,
  "data": ["demo_user_01|demo_password_01", "demo_user_02|demo_password_02"],
  "uid_check": {
    "version": 1,
    "status": "pending",
    "review_required": false,
    "items": [
      {
        "item_id": "11111111-1111-4111-8111-111111111111",
        "requested_amount": 2,
        "status": "pending",
        "review_required": false,
        "matches_current_delivery": false,
        "origin": "checkout",
        "requested_at": "2026-11-05T16:10:00.000Z",
        "initial_check": null,
        "latest_check": null
      }
    ]
  }
}
GET/api/order.php

Legacy delivery lookup; returns 404 when no accounts are available yet

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead
orderRequiredOrder code (trans_id) returned when buying

Sample response

{
  "status": "success",
  "msg": "Order retrieved successfully!",
  "trans_id": "AW261030A6YQJM7H",
  "client_order_id": "SHOP-20261030-0001",
  "replayed": false,
  "order_status": "COMPLETED",
  "payment_status": "PAID",
  "delivery_status": "delivered",
  "requested_amount": 2,
  "delivered_amount": 2,
  "remaining_amount": 0,
  "currency": "THB",
  "total": "70.00",
  "refunded_total": "0.00",
  "wallet_refunded_total": "0.00",
  "poll_after_seconds": null,
  "data": ["demo_uid_01|demo_password_01|demo_2fa_01", "demo_uid_02|demo_password_02|demo_2fa_02"],
  "uid_check": {
    "version": 1,
    "status": "pending",
    "review_required": false,
    "items": [
      {
        "item_id": "11111111-1111-4111-8111-111111111111",
        "requested_amount": 2,
        "status": "pending",
        "review_required": false,
        "matches_current_delivery": false,
        "origin": "checkout",
        "requested_at": "2026-11-05T16:10:00.000Z",
        "initial_check": null,
        "latest_check": null
      }
    ]
  }
}
GET/api/order_status.php

Order, payment, delivery and refund facts by order or client_order_id

Parameters

X-API-KeyRequiredYour API Key in this header; the legacy api_key parameter can be used instead
orderOptionalOrder code (trans_id), or provide client_order_id. At least one is required; if both are provided they must identify the same order.
client_order_idOptionalReference supplied with the original purchase, or provide order. References are scoped to your reseller account.
langOptionalQuery parameter for product names and messages: th, en, vi

Sample response

{
  "status": "success",
  "msg": "Order retrieved successfully!",
  "trans_id": "AW261030A6YQJM7H",
  "client_order_id": "SHOP-20261030-0001",
  "replayed": false,
  "order_status": "CONFIRMED",
  "payment_status": "PAID",
  "delivery_status": "partial",
  "requested_amount": 2,
  "delivered_amount": 1,
  "remaining_amount": 1,
  "currency": "THB",
  "total": "70.00",
  "refunded_total": "0.00",
  "wallet_refunded_total": "0.00",
  "poll_after_seconds": 5,
  "data": ["demo_user_01|demo_password_01"],
  "uid_check": {
    "version": 1,
    "status": "pending",
    "review_required": false,
    "items": [
      {
        "item_id": "11111111-1111-4111-8111-111111111111",
        "requested_amount": 2,
        "status": "pending",
        "review_required": false,
        "matches_current_delivery": false,
        "origin": "checkout",
        "requested_at": "2026-11-05T16:10:00.000Z",
        "initial_check": null,
        "latest_check": null
      }
    ]
  }
}

Error codes

Errors include status="error", msg, error_code and an HTTP code. Use structured fields for decisions; messages depend on language.

{ "status": "error", "msg": "...", "error_code": "IDEMPOTENCY_CONFLICT" }
  • 400Missing parameter, invalid ID or quantity, not enough stock
  • 401Invalid API Key or locked account
  • 402Insufficient wallet balance
  • 403IP not in the allowed list (includes client_ip)
  • 404Product or order not found; legacy order.php also uses 404 when no delivery data is ready
  • 405The purchase endpoint accepts POST only
  • 409PRICE_CEILING_EXCEEDED: total exceeds your ceiling; stop and reconcile, never raise it automatically. IDEMPOTENCY_CONFLICT: the reference is bound to a different payload; inspect the original request/order.
  • 429Too many requests, please wait
  • 503API or delivery data unavailable, or the order is closed. This code alone does not confirm a refund; check the original order.

Notes

  • price, total and wallet amounts are decimal strings in store currency. Your member tier is already applied. Preserve both THB fractional digits; do not round to whole baht or calculate directly with floating point.
  • Orders are paid from your wallet balance — top up first on the Top up page.
  • Queue purchases for the same reseller account. On 429, follow Retry-After or retry_after_seconds when provided and reduce request frequency.
  • Use order_status.php for pending or closed orders: an existing order can return data=[]. Legacy order.php still returns 404 when no accounts are available. A missing reference is not proof that an in-progress purchase cannot commit later.