Digital subscriptions · Shop online with Telegram sign-in
Cypher Store Saved Cart
DEVELOPER RESOURCES

Build with Cypher Store.

Connect your application to the reseller API. Read eligible automatic-delivery products, check your shared wallet and place orders with durable request references.

Quick start

  1. Sign in with Telegram and add funds to your shared store wallet.
  2. Open Reseller API in your account and generate a private key. Save it securely; it is shown once.
  3. Read the product catalog, select a product UUID and check its availability.
  4. Assign a unique external order reference, then send one order request from your server.
  5. Store the returned order receipt and delivery securely. Reuse the same reference if the response is interrupted.

Order requests spend real wallet funds. The code examples are copyable reference examples; this documentation does not execute requests.

Base endpoint
https://cypherstorebot.com/api/reseller

Authentication

Every request needs the private reseller key in the Authorization header. Website sessions, Telegram sign-in codes and admin tokens are not reseller API keys.

HTTP headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Keep this key on your server. Generating a replacement revokes your existing active key. Never include it in URLs, public frontend bundles, analytics or screenshots.

GET?action=products

List products

Returns the account’s eligible automatic-delivery products. Prices and stock can change; a catalog response does not reserve stock. The price field is the current one-item price. Bulk tiers may affect a larger order’s final cost.

cURL
curl 'https://cypherstorebot.com/api/reseller?action=products' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Example response
{
  "ok": true,
  "products": [
    {
      "product_id": "PRODUCT_UUID",
      "title": "Example digital product",
      "price": 4.5,
      "base_price": 5,
      "flash": true,
      "bulk_tiers": [
        {
          "min": 5,
          "price": 4
        }
      ],
      "stock": 12
    }
  ]
}

Example values are illustrative. Manual and guest-checkout workflows are handled on the customer website.

GET?action=balance

Wallet balance

This is the same wallet used by the bot-linked website account. Amounts are denominated in USDT.

cURL
curl 'https://cypherstorebot.com/api/reseller?action=balance' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Example response
{
  "ok": true,
  "balance": 100.12345678,
  "currency": "USDT"
}
POST?action=order

Place an order

The server validates availability and price, then commits the wallet debit, stock allocation and receipt together.

FieldTypeBehavior
product_idUUID stringRequired. Use the product_id from the API catalog.
quantityIntegerRequired. Between 1 and 1,000.
external_order_idStringAlways supply this for reliable retries. Use a short, unique reference for each logical order and retain it.
Request JSON
{
  "product_id": "PRODUCT_UUID_FROM_CATALOG",
  "quantity": 1,
  "external_order_id": "YOUR_UNIQUE_ORDER_REFERENCE"
}
Example success
{
  "ok": true,
  "order_id": "API_ORDER_UUID",
  "status": "delivered",
  "cost": 4.5,
  "delivery": [
    "EXAMPLE_DELIVERY_CONTENT"
  ],
  "balance": 95.5
}

The API order UUID differs from a customer website’s CY- order reference. Treat delivery content as private credentials, and keep the receipt in your own application.

If Telegram wallet purchase approval is enabled, the API cannot bypass it. Use the website’s approval checkout; this API does not expose a Telegram-approval endpoint.

Retries & idempotency

Keep the same external_order_id, product_id and quantity after a network interruption. A committed order returns its saved receipt with duplicate: true, without another debit or stock allocation. The reference is scoped to your account, including after key rotation.

Example replay
{
  "ok": true,
  "duplicate": true,
  "order_id": "API_ORDER_UUID",
  "status": "delivered",
  "cost": 4.5,
  "delivery": [
    "EXAMPLE_DELIVERY_CONTENT"
  ]
}

A replay does not include a fresh wallet balance; call action=balance when needed. Reusing the reference for a different product or quantity returns reference_conflict. A processing response means retain the reference and retry later. Without a reference, retries can create separate paid orders.

Use short bounded backoff for network failures or temporary server errors. Never generate a new reference just because an earlier response was lost. Escalate unresolved cases with your API order UUID and external reference.

Errors

Error envelope
{
  "ok": false,
  "error": "insufficient_balance",
  "message": "Insufficient balance"
}
HTTPErrorAction
401invalid_api_keyCheck the Bearer header and whether the key was rotated.
403account_unavailableContact support about account access.
400invalid_product / invalid_quantityCorrect the request before retrying.
400insufficient_balance / insufficient_stock / order_failedRead the message; check wallet, product availability or purchase-approval requirements.
409reference_conflictUse the original product and quantity for that reference.
409processingRetry the same reference later; contact support if unresolved.
429rate_limitedWait for the Retry-After interval in seconds. Keep the original order reference.
503wallet_unavailable / server_errorWait and retry using the same reference.
500server_errorKeep your reference. Check with support rather than assuming no debit occurred.

Clients should handle non-JSON gateway responses, timeouts and temporary throttling too. Keep integrations sequential or use modest bounded concurrency; no guaranteed public throughput limit is published.

Code examples

Replace placeholders and load keys from your server’s environment. These examples send a real paid request when executed with a valid product and funded key.

JavaScript · Node.js 22+
const base = 'https://cypherstorebot.com/api/reseller';
const reference = 'YOUR_SAVED_UNIQUE_ORDER_REFERENCE';
const response = await fetch(base + '?action=order', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.CYPHER_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    product_id: 'PRODUCT_UUID_FROM_CATALOG',
    quantity: 1,
    external_order_id: reference
  }),
  signal: AbortSignal.timeout(20000)
});
const receipt = await response.json();
if (!response.ok || !receipt.ok) throw new Error(receipt.message);
// Persist receipt and delivery securely. Retain reference on errors.
Python · standard library
import json, os, urllib.request

base = 'https://cypherstorebot.com/api/reseller'
reference = 'YOUR_SAVED_UNIQUE_ORDER_REFERENCE'
payload = {
    'product_id': 'PRODUCT_UUID_FROM_CATALOG',
    'quantity': 1,
    'external_order_id': reference
}
request = urllib.request.Request(
    base + '?action=order',
    data=json.dumps(payload).encode('utf-8'),
    headers={
        'Authorization': 'Bearer ' + os.environ['CYPHER_API_KEY'],
        'Content-Type': 'application/json'
    },
    method='POST'
)
with urllib.request.urlopen(request, timeout=20) as response:
    receipt = json.load(response)
# Persist securely; retain the same reference if an exception occurs.

Security & delivery

  • Use HTTPS and keep keys and delivery credentials out of public logs.
  • Use one saved external reference per purchase and never retry blindly with a new reference.
  • Use the catalog’s returned IDs and confirm price/availability in your customer experience.
  • Save successful deliveries securely in your own system. This API is not the guest website’s 24-hour recovery flow.
  • Account bans, stock limits and wallet purchase protection still apply.
  • The current API provides products, balance and order actions. Webhooks, sandbox accounts, refunds and manual-delivery APIs are not advertised as available.
Open reseller account settings →