Back to Store
REST API v1 Reference

Cheap Tools Developer & Partner API

Programmatically query product catalogs, query live partner balances, execute purchases with instant digital delivery, and listen for automated fulfillment events.

Production Base URL
https://cheaptools.shop.takafast.com/api/v1

1. Overview & Standards

The Cheap Tools API is organized around REST standards. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL Endpoint
https://cheaptools.shop.takafast.com/api/v1

2. Authentication

Authenticate requests to the Cheap Tools API by including your API Key in the X-API-Key request header.

Request Headers
X-API-Key: ct_live_38294719284729104829482910482910
Accept: application/json
Content-Type: application/json

Security Warning: Your API keys carry full access privileges. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, or front-end mobile apps.

GET /products

Retrieve a list of all active digital products, their variants, pricing in USD/BDT, and current real-time stock availability. (No authentication required)

Example Request

cURL
curl -X GET "https://cheaptools.shop.takafast.com/api/v1/products" \
  -H "Accept: application/json"

Example Response (200 OK)

JSON Response
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "ChatGPT Plus Private Account",
      "slug": "chatgpt-plus-private-account",
      "category": "AI & Productivity",
      "delivery_type": "instant_inventory",
      "has_warranty": true,
      "warranty_duration_days": 30,
      "variants": [
        {
          "id": 1,
          "name": "1 Month Private Access",
          "duration_type": "1_month",
          "price_usd": 15.00,
          "price_bdt": 1830.00,
          "in_stock": true,
          "available_count": 42
        }
      ]
    }
  ]
}
GET /balance

Check your developer quota and available wallet balance. API purchases automatically draw from this balance pool.

Example Request

cURL
curl -X GET "https://cheaptools.shop.takafast.com/api/v1/balance" \
  -H "X-API-Key: ct_live_YOUR_KEY" \
  -H "Accept: application/json"

Example Response (200 OK)

JSON Response
{
  "success": true,
  "data": {
    "name": "Production Reseller Key",
    "balance_usd": 45.00,
    "user_wallet_usd": 120.00,
    "effective_balance_usd": 165.00,
    "currency": "USD"
  }
}
POST /purchase

Execute an order. When payment_method: "balance" is supplied, funds are instantly deducted from your partner wallet and licensed digital credentials are returned immediately in the response payload.

Request Parameters (JSON Body)

Field Type Required Description
variant_id integer Yes The ID of the product variant from /products.
quantity integer No (Default: 1) Number of license units (1 to 10).
customer_email string Yes End-customer email for license assignment.
payment_method string Yes balance (Instant deduction) or takafast (returns payment URL).
reference string No Your internal bot / store order reference ID.

Example Request

cURL
curl -X POST "https://cheaptools.shop.takafast.com/api/v1/purchase" \
  -H "X-API-Key: ct_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "variant_id": 1,
    "quantity": 1,
    "customer_email": "user@reseller.com",
    "payment_method": "balance",
    "reference": "RES_TX_83918"
  }'

Example Instant Response (200 OK)

JSON Response
{
  "success": true,
  "message": "Order completed and delivered successfully",
  "data": {
    "order_id": "CT-2610-8472",
    "status": "paid",
    "total": 15.00,
    "currency": "USD",
    "deliveries": [
      {
        "item_id": 104,
        "product": "ChatGPT Plus Private Account",
        "variant": "1 Month Private Access",
        "status": "delivered",
        "delivered_code": "EMAIL: user@example.com | PASS: SecretPass2026! | BACKUP: 849201",
        "warranty_expires_at": "2026-11-19T14:00:00Z"
      }
    ]
  }
}
GET /orders/{publicId}

Retrieve current fulfillment status, delivered license keys, and warranty expiration date for an order placed via your API credentials.

Example Request

cURL
curl -X GET "https://cheaptools.shop.takafast.com/api/v1/orders/CT-2610-8472" \
  -H "X-API-Key: ct_live_YOUR_KEY" \
  -H "Accept: application/json"

3. Error Codes & Handling

Our API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server issues.

HTTP Code Status Meaning
200 OK Success The request succeeded.
400 Bad Request Invalid Request Item out of stock or variant inactive.
401 Unauthorized Auth Failed Missing or invalid X-API-Key.
402 Payment Required Insufficient Balance Partner wallet balance is lower than the order total.
404 Not Found Not Found The specified resource or order ID does not exist.
422 Unprocessable Validation Error Missing required fields (e.g. invalid customer email).

4. Webhook Notifications

Configure your Webhook URL in your API Dashboard settings. Cheap Tools sends POST requests with a JSON body whenever an asynchronous supplier order completes or inventory is replenished.

Webhook Payload (POST)
{
  "event": "order.fulfilled",
  "order_id": "CT-2610-8472",
  "reference": "RES_TX_83918",
  "delivered_credentials": "LICENSE_KEY_XYZ_9901",
  "timestamp": 1792501928
}