Dantehub Partner API
Purchase digital subscriptions from your prepaid wallet and deliver account information through your own bot or website.
Quick start — you only need 2 things
≈ 30 seconds- 1API key
Open the Dantehub Telegram bot → Account → API → Create API key. It is shown once — save it.
- 2Base URL
https://dantehub.shop/api/public/v1
Authorization: Bearer <your API key>curl "https://dantehub.shop/api/public/v1/products" \
-H "Authorization: Bearer $DANTE_KEY"That's it. You can list products, check your balance, place orders and read deliveries with GET /orders/{ref}. Webhooks are optional — add them later if you want instant delivery events.
Keep your key in a server environment variable named DANTE_KEY, never in browser or app code.
To fulfil a customer order: select a product, check wallet funds, purchase with a unique ref, then forward the delivered account text. Orders normally await manual fulfilment by Dantehub; the automatic developer test product is an exception.
Authentication
Every endpoint requires an active API key. Use the API menu in the Dantehub Telegram bot to create a key when new registration is open. Bot-issued keys charge that Telegram account’s wallet; administrator-created partner accounts use their assigned partner wallet.
Authorization: Bearer <your API key>
Content-Type: application/jsonX-Api-Key: <your API key> is also supported. Use one authentication method. Keys are account credentials, not customer identifiers; never include them in client-side code, logs or customer messages.
Replacing a key immediately invalidates the previous one. Disabling new key registration does not disable existing keys. An administrator can disable individual accounts; blocked bot users also lose API access.
Request conventions
| Field | Type | Description |
|---|---|---|
| Transport | HTTPS | Use the versioned base URL. Requests and responses are JSON. |
| Authentication | all endpoints | All seven endpoints require a key. No granular key scopes are exposed. |
| Amounts | JSON number | Use the currency field; do not assume every product has the same currency. Order totals are rounded to two decimal places. |
| Timestamps | ISO string | Examples use UTC with Z. Parse timestamps rather than displaying their raw values as local time. |
| Success | ok: true | Read the resource field: products, order, orders or topup. Balance fields are at the top level. |
| Failure | ok: false | API-handled errors include error.code and error.message. Transport or hosting errors may not return JSON. |
Request budget
Keep aggregate traffic below 60 requests per minute per key. The current limiter is local to a running instance, not a global throughput guarantee. It does not return quota headers or Retry-After. On 429, pause and use increasing delays with jitter.
Cache catalogue results and prefer webhooks to polling. No published latency or throughput guarantee is provided. Browser CORS support does not make it safe to expose a key; call from your server.
The order object
Order responses and webhook payloads use the same order fields. Sale price and product title are recorded with the purchase. For the shop's latest product availability and stock counts, use GET /products; the order object does not include inventory fields.
| Field | Type | Description |
|---|---|---|
| order_id | string | Dante Hub order code; use it for order lookup. |
| ref | string | null | Your purchase reference. Telegram purchases may have no reference. |
| status | string | pending_payment (unpaid), processing (paid), delivered or cancelled. A retained unpaid ref is not being fulfilled. |
| product_id | string | null | Product UUID; may be null if the product was removed. |
| product | string | Product title saved with the order. |
| qty | integer | Purchased quantity. |
| unit_price | number | Unit sale price recorded at purchase. |
| total | number | Order amount in currency, rounded to two decimal places. |
| currency | string | Currency of the purchase. |
| delivery | string | null | Account delivery text when delivered; null otherwise. Treat as sensitive data. |
| created_at | string | Order creation timestamp in ISO format. |
| delivered_at | string | null | Delivery timestamp, when recorded. |
Status meanings
processing means the order is not delivered or cancelled. delivered exposes the delivery text, which can be empty if no note is stored. cancelled also represents expired and refunded orders. The status alone does not prove a refund; check the wallet or the refund event.
List products
/productsRead Dante Hub shop products, sale prices and the latest recorded stock counts. Every shop product is listed with a stable id; paused products stay listed as out_of_stock (stock 0) and return to available with the same id when restocked. Deleted products disappear.
No request body or endpoint-specific parameters.
curl "https://dantehub.shop/api/public/v1/products" \
-H "Authorization: Bearer $DANTE_KEY"{
"ok": true,
"products": [
{
"id": "00000000-0000-4000-8000-000000000001",
"title": "Example subscription",
"category": "Subscriptions",
"description": "Example product description.",
"price": 1.7,
"currency": "USDT",
"in_stock": true,
"stock": 12,
"stock_checked_at": "2026-10-28T12:00:00.000Z",
"stock_is_stale": false,
"stock_status": "available"
}
]
}Use stock to display the shop's last recorded quantity separately from description. 0 means sold out; null means no exact quantity was reported, not zero; with stock_status "available" the product is in stock without a published count. Use stock_checked_at and stock_is_stale to assess freshness. A count is stale when its inventory check is unavailable, unsuccessful, incomplete or more than 30 minutes old. Label stale counts as last known, not live. Inventory updates are not a real-time guarantee, and a catalogue response does not reserve units. Poll this endpoint every 60 seconds or slower, share the response across your catalogue, and refresh before ordering. Availability is checked again at purchase. No pagination or category filter is supported.
| Field | Type | Description |
|---|---|---|
| id | string | Product UUID used in order requests. |
| title | string | Customer-facing product title. |
| category | string | Shop category. |
| description | string | null | Plain-text description; null when absent. |
| price | number | Current unit sale price in the stated currency. |
| currency | string | Product currency; must match wallet currency for purchase. |
| in_stock | boolean | Purchase availability from the stored snapshot; unknown counts remain available. Auto-paused products return false. Not a reservation or a real-time guarantee. |
| stock | integer | null | The shop's exact last recorded quantity for this product. 0 means sold out; null means the exact quantity is unknown. Display separately from description. |
| stock_checked_at | ISO timestamp | null | Timestamp of the last successful inventory check, or the retained inventory timestamp if a later check was unsuccessful. null when no inventory record is available. |
| stock_is_stale | boolean | True for a missing, disabled, unsuccessful or more-than-30-minute-old check. A stale count is last known, never confirmed live. |
| stock_status | string | available, out_of_stock (sold out or paused by the shop; same id returns when restocked), unknown or stale. Check this together with in_stock and stock_is_stale. |
Read wallet balance
/balanceRead the purchasing account’s wallet. Bot-issued keys use the same wallet as that Telegram account.
No request body or endpoint-specific parameters.
curl "https://dantehub.shop/api/public/v1/balance" \
-H "Authorization: Bearer $DANTE_KEY"{
"ok": true,
"balance": 50,
"currency": "USDT"
}The product currency must match the wallet currency. Do not assume a balance response reserves funds for a later purchase.
| Field | Type | Description |
|---|---|---|
| balance | number | Current wallet balance. |
| currency | string | Wallet currency. |
Create an order
/ordersPurchase an active, available product using the wallet. Save your customer mapping before submitting the request.
| Field | Type | Description |
|---|---|---|
| product_id | string · required | A valid product UUID from the catalogue. |
| qty | integer · optional | 1–20 inclusive. Default: 1. |
| ref | string · required | 1–64 characters matching [A-Za-z0-9._:-]. Use a unique reference for each purchase and keep it unchanged on retries. |
curl -X POST "https://dantehub.shop/api/public/v1/orders" \
-H "Authorization: Bearer $DANTE_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":"00000000-0000-4000-8000-000000000001","qty":1,"ref":"customer-order-1001"}'{
"ok": true,
"duplicate": false,
"order": {
"order_id": "DH-EXAMPLE",
"ref": "customer-order-1001",
"status": "processing",
"product_id": "00000000-0000-4000-8000-000000000001",
"product": "Example subscription",
"qty": 1,
"unit_price": 1.7,
"total": 1.7,
"currency": "USDT",
"delivery": null,
"created_at": "2026-10-11T12:00:00.000Z",
"delivered_at": null
}
}HTTP 201 for a new purchase, 200 with duplicate: true for an existing reference. Changing product_id or qty for the same ref returns 409 ref_conflict. On 503 payment_pending or a connection timeout, check this ref and retry only the identical request; never assume no funds were deducted. After 402, top up and retry the same ref. If the unpaid quote changes, 409 quote_changed requires checking the original ref, refreshing products and creating a new ref only after confirming pending_payment. Paid orders keep their original price.
List orders
/ordersRead account orders in descending creation-time order. Bot-linked accounts may include Telegram purchases with ref: null.
| Field | Type | Description |
|---|---|---|
| limit | number · optional | Use a positive integer. Default: 50; clamped to 1–100. Zero falls back to 50. |
| before | string · optional | A parseable timestamp; use an ISO UTC timestamp. Only orders created strictly before it are returned. |
curl "https://dantehub.shop/api/public/v1/orders" \
-H "Authorization: Bearer $DANTE_KEY"{
"ok": true,
"orders": [
{
"order_id": "DH-EXAMPLE",
"ref": "customer-order-1001",
"status": "processing",
"product_id": "00000000-0000-4000-8000-000000000001",
"product": "Example subscription",
"qty": 1,
"unit_price": 1.7,
"total": 1.7,
"currency": "USDT",
"delivery": null,
"created_at": "2026-10-11T12:00:00.000Z",
"delivered_at": null
}
]
}Use the oldest created_at from a page as before for the next page. There is no total, next_cursor or has_more field. Timestamp pagination can skip orders sharing a page-boundary timestamp; keep order IDs for reconciliation.
Retrieve an order
/orders/{identifier}Look up an order belonging to the authenticated account by its Dante Hub order code or your reference.
| Field | Type | Description |
|---|---|---|
| identifier | string · path | order_id or ref. An exact order code takes precedence; otherwise the exact ref is used, including DH-prefixed refs. URL-encode the value. |
curl "https://dantehub.shop/api/public/v1/orders/customer-order-1001" \
-H "Authorization: Bearer $DANTE_KEY"{
"ok": true,
"order": {
"order_id": "DH-EXAMPLE",
"ref": "customer-order-1001",
"status": "delivered",
"product_id": "00000000-0000-4000-8000-000000000001",
"product": "Example subscription",
"qty": 1,
"unit_price": 1.7,
"total": 1.7,
"currency": "USDT",
"delivery": "Example login: demo@example.invalid\nExample password: TEST_ONLY",
"created_at": "2026-10-11T12:00:00.000Z",
"delivered_at": "2026-10-11T12:05:00.000Z"
}
}The response is { ok, order }. A missing order returns 404 not_found. There is no separate delivery-confirmation endpoint.
Create a top-up invoice
/topupsRequest payment instructions for a wallet top-up. No funds are credited merely by creating the invoice.
| Field | Type | Description |
|---|---|---|
| amount | number · required | 5–5000 inclusive in wallet currency; rounded to two decimal places after validation. |
| method | string · required | usdt_trc20, usdt_bep20, usdt_polygon, usdc_bep20 or gram_ton. |
curl -X POST "https://dantehub.shop/api/public/v1/topups" \
-H "Authorization: Bearer $DANTE_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":50,"method":"usdt_trc20"}'{
"ok": true,
"topup": {
"topup_id": "example-track-id",
"amount": 50,
"currency": "USDT",
"pay_amount": 50,
"pay_currency": "USDT",
"network": "TRC20",
"address": "<invoice address>",
"memo": null,
"expires_in_minutes": 60
}
}Use the returned pay_amount, pay_currency, network, address and memo. Invoice creation has no ref-based idempotency: repeating this POST can create another invoice. The actual amount and instructions depend on the provider quote.
| Field | Type | Description |
|---|---|---|
| topup_id | string | null | Provider tracking ID. Creation can return null if the tracking record is unavailable; retain the invoice instructions. |
| amount / currency | number / string | Requested wallet amount and wallet currency; not proof of the amount received. |
| pay_amount | number | null | Quoted cryptocurrency amount. Follow the creation response payment instructions. |
| pay_currency / network | string | null | Quoted coin and network. Do not derive these from the wallet currency. Provider values may differ between creation and retrieval. |
| address | string | Destination payment address. |
| memo | string | null · creation | Include it if provided. Not returned by the retrieval endpoint; save the original instructions. |
| expires_in_minutes | number · creation | Payment window returned at creation. Not returned by retrieval. |
| status | string · retrieval | credited after wallet credit; otherwise the stored provider status. |
| created_at | string · retrieval | Invoice creation timestamp. |
Retrieve a top-up
/topups/{topup_id}Read a top-up belonging to the authenticated account using the provider tracking ID returned at creation.
| Field | Type | Description |
|---|---|---|
| topup_id | string · path | Tracking ID from the invoice response; URL-encode it. |
curl "https://dantehub.shop/api/public/v1/topups/example-track-id" \
-H "Authorization: Bearer $DANTE_KEY"{
"ok": true,
"topup": {
"topup_id": "example-track-id",
"amount": 50,
"currency": "USDT",
"pay_amount": 50,
"pay_currency": "USDT",
"network": "TRC20",
"address": "<invoice address>",
"status": "credited",
"created_at": "2026-10-11T12:00:00.000Z"
}
}credited means the payment has been applied to the wallet. Other status strings are payment-provider states, not a fixed API enumeration. This response does not contain memo or expires_in_minutes.
Customer delivery
Delivery is automatic end to end. When Dantehub delivers an order, your integration receives the account text in order.delivery — by webhook, or by polling GET /orders/{ref} — and forwards it straight to your customer. There is no approval step on either side and nothing else to confirm.
Forward only order.delivery. Order codes, wallet data and integration metadata stay on your server and never appear in customer messages. If you prefer to review accounts personally before sending them, that review happens inside your own system — the Dantehub order is already delivered and needs no confirmation from you.
100% white-label account delivery
Dantehub guarantees 100% white-label account delivery for resellers: the customer-facing delivery consists only of the purchased account information, without branding or business attribution.
Forward the account text only. Base URLs, webhook headers, order codes and integration metadata belong on your server, not in customer messages. This guarantee applies to customer-facing account delivery, not concealment of the API provider in the technical connection.
Signed webhooks (optional)
Not required. Your integration works fully with polling. Webhooks only push delivery events to your server the moment they happen.
Set up in the bot
- Open the bot → API → ⚙️ Advanced (optional).
- Tap 🔗 Webhook URL → Set URL and reply with your full
https://address. Change or remove it the same way. - Tap 🔐 Webhook secret to get the key used to verify our signature.
Panel-issued partner accounts receive their webhook setup and secret from the administrator. Only API orders with a non-null reference generate partner delivery notifications.
Content-Type: application/json
X-DanteHub-Event: order.delivered
X-DanteHub-Event-Id: <stable event UUID>
X-DanteHub-Signature: <lowercase hex HMAC-SHA256>{
"event": "order.delivered",
"refunded": false,
"order": {
"order_id": "DH-EXAMPLE",
"ref": "customer-order-1001",
"status": "delivered",
"product_id": "00000000-0000-4000-8000-000000000001",
"product": "Example subscription",
"qty": 1,
"unit_price": 1.7,
"total": 1.7,
"currency": "USDT",
"delivery": "Example login: demo@example.invalid\nExample password: TEST_ONLY",
"created_at": "2026-10-11T12:00:00.000Z",
"delivered_at": "2026-10-11T12:05:00.000Z"
},
"sent_at": "2026-10-11T12:05:00.000Z"
}| Field | Type | Description |
|---|---|---|
| event | string | order.delivered or order.cancelled (cancellation, expiry and refund). wallet.low_balance is sent at most once every 6 hours when an order is rejected for insufficient balance or the balance drops below 2; it carries reason, balance, currency and required instead of order. |
| refunded | boolean | true for a refund notification; false otherwise. Not a general wallet-balance statement. |
| order | object | The same order object returned by order lookup. |
| sent_at | string | Notification construction time; not payment time. The payload is reused for retries. |
Compute HMAC-SHA256 with your secret over the exact raw body bytes, encode as lowercase hexadecimal and compare in constant time. Parsing and re-serializing JSON before verification changes the signed input.
Order events are saved with the order update and sent from a durable queue. Each attempt has an 8-second timeout; failures use increasing delays capped at one hour, with at most 20 attempts. The body and event ID stay unchanged on retry. Return 2xx only after durable acceptance and deduplicate by event ID or order code plus event. Keep polling for reconciliation; event ordering and indefinite retries are not guaranteed. Low-balance notices remain informational, best-effort messages.
Webhook receiver example
This Express example demonstrates signature verification and durable acceptance. Install Express in your own server project and provide eventQueue as a durable queue adapter. It is not a standalone application or an official SDK. Mount the handler before a JSON parser.
import crypto from "node:crypto";
import express from "express";
// Implement this adapter in your application.
import { eventQueue } from "./event-queue.js";
const app = express();
const secret = process.env.DANTE_WEBHOOK_SECRET;
if (!secret) throw new Error("DANTE_WEBHOOK_SECRET is required");
app.post("/integrations/delivery", express.raw({ type: "application/json" }),
async (req, res) => {
const signature = req.get("X-DanteHub-Signature") || "";
if (!/^[0-9a-f]{64}$/.test(signature) || !Buffer.isBuffer(req.body)) {
return res.sendStatus(401);
}
const expected = crypto.createHmac("sha256", secret)
.update(req.body).digest();
const received = Buffer.from(signature, "hex");
if (!crypto.timingSafeEqual(expected, received)) return res.sendStatus(401);
let payload;
try { payload = JSON.parse(req.body.toString("utf8")); }
catch { return res.sendStatus(400); }
if (!payload ||
!["order.delivered", "order.cancelled"].includes(payload.event) ||
typeof payload.order?.order_id !== "string" ||
typeof payload.order?.ref !== "string") return res.sendStatus(400);
try {
// Existing keys must be acknowledged without creating a second job.
await eventQueue.enqueueUnique({
key: payload.order.order_id + ":" + payload.event,
payload
});
return res.sendStatus(200);
} catch { return res.sendStatus(503); }
}
);The consumer matches the reference to a local order, verifies the event against its current state, stores the account text and schedules customer delivery. Use automatic forwarding by default; route to review only if configured in your own system. Persist send attempts and retry failures. A network failure during customer sending can leave an uncertain outcome; do not claim exactly-once delivery without destination-side support.
Retries and reconciliation
For purchase retries, retain the original ref. The reference is scoped to the purchasing account, not to one key version. Do not reuse it for a different customer or change it after a timeout. Serialize same-reference requests and confirm the returned order details before forwarding.
Webhooks and polling must share the same status-processing path. Repeated delivery events should not create another customer-send job. A later cancellation or refund still needs processing even if the order was delivered earlier.
Poll unresolved orders at a controlled interval, such as 15–30 seconds only when aggregate traffic permits. Twenty orders checked every 15 seconds already require 80 requests per minute before other calls. Spread requests, back off on failures and periodically reconcile unresolved orders when webhooks are configured.
There are no public cancellation, delivery-approval, refund or webhook-registration endpoints. These operations are handled by Dantehub or by your local customer workflow.
Integration checklist
When listed in the live catalogue, Test API for Developers returns synthetic account text automatically, while ChatGPT Test waits for manual delivery by Dantehub. Each costs 0.01 USDT from the wallet. These are paid test products, not working subscriptions or a separate sandbox.
- Read the catalogue and wallet; use returned product identifiers and prices.
- Purchase once with a unique reference and confirm the wallet debit.
- Retry the same reference and confirm the same order is returned.
- Retrieve delivery, verify webhook signatures and test duplicate events.
- Confirm automatic forwarding reaches your customer without any approval step.
- Test send failures, missing customer references and reconciliation after a missed webhook.
Errors
{
"ok": false,
"error": {
"code": "insufficient_balance",
"message": "Wallet balance is not enough. Not charged."
}
}| Field | Type | Description |
|---|---|---|
| invalid_request | 400 | Correct request fields, types or timestamp format. |
| unauthorized | 401 | Missing, invalid or disabled key. A blocked bot account cannot use its key. |
| insufficient_balance | 402 | Fund the purchasing wallet before retrying. |
| product_not_found / not_found | 404 | Unknown or deleted product, missing account-scoped order or invoice, or unknown endpoint. |
| out_of_stock / currency_unsupported | 409 | Product unavailable or currency incompatible with wallet. |
| rate_limited | 429 | Pause requests and reduce traffic. No Retry-After or remaining-quota headers are supplied. |
| payment_pending | 503 | Payment outcome is not confirmed. Look up the original ref and retry only the identical request; do not assume no debit occurred. |
| ref_conflict | 409 | The reference belongs to another product or quantity. Never reuse a purchase reference. |
| quote_changed | 409 | An unpaid quote no longer matches the product's current purchase terms. Check the original ref; only when still pending_payment, refresh products and submit a new ref. |
| gateway_unavailable | 503 | Top-up invoice creation is unavailable; no payment address was returned. |
| catalogue_unavailable | 503 | Inventory could not be read completely. Keep your previous catalogue, mark it stale and retry later; do not treat this as an empty catalogue. |
Inspect the HTTP status before reading the response body. Hosting, network and unhandled failures may return a non-JSON response. Keep the original purchase reference until the outcome is known. For invoice-creation timeouts, do not assume a retry returns the previous invoice.