Dantehub
DEVELOPER REFERENCE

Dantehub Partner API

Purchase digital subscriptions from your prepaid wallet and deliver account information through your own bot or website.

HTTPS · JSONWallet-funded ordersSigned delivery events

Quick start — you only need 2 things

≈ 30 seconds
  1. 1API key

    Open the Dantehub Telegram bot → Account → API → Create API key. It is shown once — save it.

  2. 2Base URL
    https://dantehub.shop/api/public/v1
Request header
Authorization: Bearer <your API key>
Your first request · cURL
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.

Order request reference

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.

Request headers
Authorization: Bearer <your API key>
Content-Type: application/json

X-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

Protocol and data conventions
FieldTypeDescription
TransportHTTPSUse the versioned base URL. Requests and responses are JSON.
Authenticationall endpointsAll seven endpoints require a key. No granular key scopes are exposed.
AmountsJSON numberUse the currency field; do not assume every product has the same currency. Order totals are rounded to two decimal places.
TimestampsISO stringExamples use UTC with Z. Parse timestamps rather than displaying their raw values as local time.
Successok: trueRead the resource field: products, order, orders or topup. Balance fields are at the top level.
Failureok: falseAPI-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.

Order response fields
FieldTypeDescription
order_idstringDante Hub order code; use it for order lookup.
refstring | nullYour purchase reference. Telegram purchases may have no reference.
statusstringpending_payment (unpaid), processing (paid), delivered or cancelled. A retained unpaid ref is not being fulfilled.
product_idstring | nullProduct UUID; may be null if the product was removed.
productstringProduct title saved with the order.
qtyintegerPurchased quantity.
unit_pricenumberUnit sale price recorded at purchase.
totalnumberOrder amount in currency, rounded to two decimal places.
currencystringCurrency of the purchase.
deliverystring | nullAccount delivery text when delivered; null otherwise. Treat as sensitive data.
created_atstringOrder creation timestamp in ISO format.
delivered_atstring | nullDelivery 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

GET/products

Read 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 request
curl "https://dantehub.shop/api/public/v1/products" \
  -H "Authorization: Bearer $DANTE_KEY"
Response · HTTP 200
{
  "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.

Product object fields
FieldTypeDescription
idstringProduct UUID used in order requests.
titlestringCustomer-facing product title.
categorystringShop category.
descriptionstring | nullPlain-text description; null when absent.
pricenumberCurrent unit sale price in the stated currency.
currencystringProduct currency; must match wallet currency for purchase.
in_stockbooleanPurchase availability from the stored snapshot; unknown counts remain available. Auto-paused products return false. Not a reservation or a real-time guarantee.
stockinteger | nullThe 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_atISO timestamp | nullTimestamp 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_stalebooleanTrue for a missing, disabled, unsuccessful or more-than-30-minute-old check. A stale count is last known, never confirmed live.
stock_statusstringavailable, 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

GET/balance

Read the purchasing account’s wallet. Bot-issued keys use the same wallet as that Telegram account.

No request body or endpoint-specific parameters.

cURL request
curl "https://dantehub.shop/api/public/v1/balance" \
  -H "Authorization: Bearer $DANTE_KEY"
Response · HTTP 200
{
  "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.

Balance fields (top level)
FieldTypeDescription
balancenumberCurrent wallet balance.
currencystringWallet currency.

Create an order

POST/orders

Purchase an active, available product using the wallet. Save your customer mapping before submitting the request.

JSON request body
FieldTypeDescription
product_idstring · requiredA valid product UUID from the catalogue.
qtyinteger · optional1–20 inclusive. Default: 1.
refstring · required1–64 characters matching [A-Za-z0-9._:-]. Use a unique reference for each purchase and keep it unchanged on retries.
cURL request
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"}'
Response · HTTP 201
{
  "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

GET/orders

Read account orders in descending creation-time order. Bot-linked accounts may include Telegram purchases with ref: null.

Request parameters
FieldTypeDescription
limitnumber · optionalUse a positive integer. Default: 50; clamped to 1–100. Zero falls back to 50.
beforestring · optionalA parseable timestamp; use an ISO UTC timestamp. Only orders created strictly before it are returned.
cURL request
curl "https://dantehub.shop/api/public/v1/orders" \
  -H "Authorization: Bearer $DANTE_KEY"
Response · HTTP 200
{
  "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

GET/orders/{identifier}

Look up an order belonging to the authenticated account by its Dante Hub order code or your reference.

Request parameters
FieldTypeDescription
identifierstring · pathorder_id or ref. An exact order code takes precedence; otherwise the exact ref is used, including DH-prefixed refs. URL-encode the value.
cURL request
curl "https://dantehub.shop/api/public/v1/orders/customer-order-1001" \
  -H "Authorization: Bearer $DANTE_KEY"
Response · HTTP 200
{
  "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

POST/topups

Request payment instructions for a wallet top-up. No funds are credited merely by creating the invoice.

JSON request body
FieldTypeDescription
amountnumber · required5–5000 inclusive in wallet currency; rounded to two decimal places after validation.
methodstring · requiredusdt_trc20, usdt_bep20, usdt_polygon, usdc_bep20 or gram_ton.
cURL request
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"}'
Response · HTTP 201
{
  "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.

Invoice fields — creation versus retrieval
FieldTypeDescription
topup_idstring | nullProvider tracking ID. Creation can return null if the tracking record is unavailable; retain the invoice instructions.
amount / currencynumber / stringRequested wallet amount and wallet currency; not proof of the amount received.
pay_amountnumber | nullQuoted cryptocurrency amount. Follow the creation response payment instructions.
pay_currency / networkstring | nullQuoted coin and network. Do not derive these from the wallet currency. Provider values may differ between creation and retrieval.
addressstringDestination payment address.
memostring | null · creationInclude it if provided. Not returned by the retrieval endpoint; save the original instructions.
expires_in_minutesnumber · creationPayment window returned at creation. Not returned by retrieval.
statusstring · retrievalcredited after wallet credit; otherwise the stored provider status.
created_atstring · retrievalInvoice creation timestamp.

Retrieve a top-up

GET/topups/{topup_id}

Read a top-up belonging to the authenticated account using the provider tracking ID returned at creation.

Request parameters
FieldTypeDescription
topup_idstring · pathTracking ID from the invoice response; URL-encode it.
cURL request
curl "https://dantehub.shop/api/public/v1/topups/example-track-id" \
  -H "Authorization: Bearer $DANTE_KEY"
Response · HTTP 200
{
  "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

  1. Open the bot → API → ⚙️ Advanced (optional).
  2. Tap 🔗 Webhook URL → Set URL and reply with your full https:// address. Change or remove it the same way.
  3. 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.

HTTP event headers
Content-Type: application/json
X-DanteHub-Event: order.delivered
X-DanteHub-Event-Id: <stable event UUID>
X-DanteHub-Signature: <lowercase hex HMAC-SHA256>
Delivered event · illustrative payload
{
  "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"
}
Webhook contract
FieldTypeDescription
eventstringorder.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.
refundedbooleantrue for a refund notification; false otherwise. Not a general wallet-balance statement.
orderobjectThe same order object returned by order lookup.
sent_atstringNotification 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.

Node.js · Express
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.

  1. Read the catalogue and wallet; use returned product identifiers and prices.
  2. Purchase once with a unique reference and confirm the wallet debit.
  3. Retry the same reference and confirm the same order is returned.
  4. Retrieve delivery, verify webhook signatures and test duplicate events.
  5. Confirm automatic forwarding reaches your customer without any approval step.
  6. Test send failures, missing customer references and reconciliation after a missed webhook.

Errors

API error envelope
{
  "ok": false,
  "error": {
    "code": "insufficient_balance",
    "message": "Wallet balance is not enough. Not charged."
  }
}
HTTP status, error code and response handling
FieldTypeDescription
invalid_request400Correct request fields, types or timestamp format.
unauthorized401Missing, invalid or disabled key. A blocked bot account cannot use its key.
insufficient_balance402Fund the purchasing wallet before retrying.
product_not_found / not_found404Unknown or deleted product, missing account-scoped order or invoice, or unknown endpoint.
out_of_stock / currency_unsupported409Product unavailable or currency incompatible with wallet.
rate_limited429Pause requests and reduce traffic. No Retry-After or remaining-quota headers are supplied.
payment_pending503Payment outcome is not confirmed. Look up the original ref and retry only the identical request; do not assume no debit occurred.
ref_conflict409The reference belongs to another product or quantity. Never reuse a purchase reference.
quote_changed409An 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_unavailable503Top-up invoice creation is unavailable; no payment address was returned.
catalogue_unavailable503Inventory 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.