Quick start
- Sign in with Telegram and add funds to your shared store wallet.
- Open Reseller API in your account and generate a private key. Save it securely; it is shown once.
- Read the product catalog, select a product UUID and check its availability.
- Assign a unique external order reference, then send one order request from your server.
- 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.
https://cypherstorebot.com/api/resellerAuthentication
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.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonKeep this key on your server. Generating a replacement revokes your existing active key. Never include it in URLs, public frontend bundles, analytics or screenshots.
?action=productsList 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 'https://cypherstorebot.com/api/reseller?action=products' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"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.
?action=balanceWallet balance
This is the same wallet used by the bot-linked website account. Amounts are denominated in USDT.
curl 'https://cypherstorebot.com/api/reseller?action=balance' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"ok": true,
"balance": 100.12345678,
"currency": "USDT"
}?action=orderPlace an order
The server validates availability and price, then commits the wallet debit, stock allocation and receipt together.
| Field | Type | Behavior |
|---|---|---|
product_id | UUID string | Required. Use the product_id from the API catalog. |
quantity | Integer | Required. Between 1 and 1,000. |
external_order_id | String | Always supply this for reliable retries. Use a short, unique reference for each logical order and retain it. |
{
"product_id": "PRODUCT_UUID_FROM_CATALOG",
"quantity": 1,
"external_order_id": "YOUR_UNIQUE_ORDER_REFERENCE"
}{
"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.
{
"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
{
"ok": false,
"error": "insufficient_balance",
"message": "Insufficient balance"
}| HTTP | Error | Action |
|---|---|---|
| 401 | invalid_api_key | Check the Bearer header and whether the key was rotated. |
| 403 | account_unavailable | Contact support about account access. |
| 400 | invalid_product / invalid_quantity | Correct the request before retrying. |
| 400 | insufficient_balance / insufficient_stock / order_failed | Read the message; check wallet, product availability or purchase-approval requirements. |
| 409 | reference_conflict | Use the original product and quantity for that reference. |
| 409 | processing | Retry the same reference later; contact support if unresolved. |
| 429 | rate_limited | Wait for the Retry-After interval in seconds. Keep the original order reference. |
| 503 | wallet_unavailable / server_error | Wait and retry using the same reference. |
| 500 | server_error | Keep 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.
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.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.