DigetalHube Get API Key

DigetalHube API

Resell gift cards and vouchers straight from your own code. Plain JSON over HTTPS, no SDK to install. Orders are idempotent, and anything that fails is refunded automatically.

939+PRODUCTS
126+BRANDS
<60sTYPICAL DELIVERY
24/7SUPPORT
Overview

Introduction

Every request goes to the versioned base URL below. Register for a reseller account to get an API key and fund your balance — there is no separate approval step.

Basehttps://digetalhube.com/v1/

How a purchase flows

1Browse /category and /products to find what to sell.
2Read the fresh unit_price from /products/:id.
3Call /products/:id/purchase. Your balance is charged.
4Poll the returned poll_url until it returns 200 with codes.
5Reconcile against /transactions, which records every balance change.
Prices move with exchange rates. Always read the current unit_price from the product endpoint immediately before you charge your own customer, rather than caching it.
Security

Authentication

Protected endpoints expect your secret key in an X-API-Key header. An Authorization: Bearer header works too. Catalog endpoints (/category, /products) are public and need no key.

Keys are never accepted in the URL. Query strings end up in server access logs, so a key passed that way is already leaked. Header only. The key is tied directly to your balance — keep it server-side.
Request header
X-API-Key: your_api_key_here
Verify your key
curl -X GET https://digetalhube.com/v1/getMe \
  -H "X-API-Key: your_api_key_here"
User

Current user

GET/getMeAUTH

Returns the profile and live wallet balance for the key holder. Call it on boot to confirm credentials and check available funds before charging.

200 OK
{
  "success": true,
  "reseller_id": 12,
  "username": "mystore",
  "email": "you@example.com",
  "balance": 248.6000,
  "total_deposited": 1000.0000,
  "total_spent": 751.4000,
  "total_orders": 312,
  "rate_limit": 60,
  "currency": "USDT"
}
Catalog

Categories

GET/categoryPUBLIC
GET/category/:idPUBLIC

List every category, or pass an :id to get the products inside one. Each category carries a live product_count and how many are in stock.

200 OK
{
  "success": true,
  "categories": [
    { "id": 3, "title": "iTunes USA",  "product_count": 25, "in_stock": 22 },
    { "id": 4, "title": "Razer Gold",  "product_count": 18, "in_stock": 18 }
  ]
}
Catalog

Products

GET/productsPUBLIC
GET/products/:idPUBLIC

Every product with its current unit_price, the printed face_value (null when not set) and live stock. Fetch the single-product route before a purchase so you charge against the freshest price.

Query parameters

ParameterTypeDescription
category_idoptionalintegerReturn one category only.
in_stockoptionalboolean1 or true for available products only.
cURL
curl "https://digetalhube.com/v1/products?in_stock=1"
200 OK
{
  "success": true,
  "products": [
    {
      "id": 29,
      "title": "Itunes 500$ US GiftCard",
      "description": "",
      "category_id": 3,
      "category_title": "iTunes USA",
      "unit_price": 486.75,
      "face_value": 500,
      "stock": 14
    }
  ],
  "total": 939
}
Purchases

Buy a product

POST/products/:id/purchaseAUTH

Charges your wallet and queues the purchase. Returns 201 with the order id and a poll_url to follow until the codes are ready.

Body

FieldTypeDescription
quantityoptionalinteger1 to 10. Defaults to 1.
Idempotency. Optionally pass an X-Idempotency-Key to dedupe retries — the same key within a 30-minute window returns the original response instead of charging twice. The key must be a 36-character UUID. Omit the header to skip it.
cURL
curl -X POST https://digetalhube.com/v1/products/29/purchase \
  -H "X-API-Key: your_api_key_here" \
  -H "X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{"quantity": 2}'
201 Created
{
  "success": true,
  "order_id": "API-845138F83CBB-1787792999",
  "product_id": 29,
  "product_title": "Itunes 500$ US GiftCard",
  "quantity": 2,
  "unit_price": 486.75,
  "total_price": 973.50,
  "currency": "USDT",
  "status": "PENDING",
  "delivery_items": null,
  "poll_url": "/v1/orders/API-845138F83CBB-1787792999/delivery",
  "balance": { "before": 1222.10, "after": 248.60 }
}
Purchases

Orders

GET/ordersAUTH
GET/orders/:idAUTH

Paginated order history, newest first. Pass page and limit (max 100), or fetch a single order by id.

cURL
curl -X GET "https://digetalhube.com/v1/orders?page=1&limit=50" \
  -H "X-API-Key: your_api_key_here"
200 OK
{
  "success": true,
  "orders": [
    {
      "order_id": "API-845138F83CBB-1787792999",
      "product_id": 29,
      "product_title": "Itunes 500$ US GiftCard",
      "quantity": 2,
      "total_price": 973.50,
      "currency": "USDT",
      "status": "COMPLETED",
      "delivery_items": ["XXXX-XXXX-XXXX", "YYYY-YYYY-YYYY"],
      "created_at": "2026-08-24 21:00:00"
    }
  ],
  "pagination": { "page": 1, "limit": 50, "total": 120, "total_pages": 3 }
}
Purchases

Delivery polling

GET/orders/:id/deliveryAUTH

For pending orders, poll this every 5–10 seconds. The HTTP status tells you where things stand without parsing the body:

CodeMeaning
200Codes are ready in delivery_items.
202Still PROCESSING — try again shortly.
410Terminal failure — auto-refunded.
404Order not found, or not yours.

Stop polling on any 200 or 410.

200 · ready
{
  "success": true,
  "order_id": "API-845138F83CBB-1787792999",
  "product_id": 29,
  "product_title": "Itunes 500$ US GiftCard",
  "quantity": 2,
  "status": "COMPLETED",
  "delivery_items": ["XXXX-XXXX-XXXX", "YYYY-YYYY-YYYY"]
}
202 · processing
{
  "success": true,
  "order_id": "API-845138F83CBB-1787792999",
  "status": "PROCESSING",
  "message": "Order is still being fulfilled. Try again shortly."
}
410 · refunded
{
  "success": false,
  "order_id": "API-845138F83CBB-1787792999",
  "status": "REFUNDED",
  "refunded": true,
  "message": "Order failed and was refunded automatically."
}
Purchases

Transactions

GET/transactionsAUTH

The ledger behind your wallet — every charge and top-up with balance_before and balance_after, so reconciliation is exact. Paginated like orders.

TypeMeaning
add_balanceBalance added — deposit or refund.
charge_balanceBalance deducted — a purchase.
200 OK
{
  "success": true,
  "data": [
    {
      "id": 45,
      "transaction_type": "charge_balance",
      "amount": 973.5000,
      "balance_before": 1222.1000,
      "balance_after": 248.6000,
      "status": "success",
      "reference_id": "API-845138F83CBB-1787792999",
      "description": "Purchase Itunes 500$ US GiftCard",
      "created_at": "2026-08-24 21:00:00"
    }
  ],
  "pagination": { "page": 1, "limit": 50, "total": 200, "total_pages": 4 }
}
Reliability

Idempotency

A timeout after the server already processed an order looks identical to one that never arrived. Retrying blindly risks buying twice. Send an X-Idempotency-Key on a purchase and the retry is safe.

How it behaves

SituationResult
First request201, order created, balance charged.
Repeat, same bodyOriginal response replayed with X-Idempotent-Replay: true. No second charge.
Repeat, different body422 — key already used with different parameters.
Repeat while processing409 — wait and retry.
Key not a UUID400.
After 30 minutesKey expires and is treated as new.

Rules

Format36-character UUID. Generate a fresh one per order.
Window30 minutes from the first request.
ScopePer API key. Two resellers can use the same UUID without collision.
FailuresOnly successful orders are stored, so a failed order can be retried with the same key.
OptionalOmit the header and the endpoint behaves as before.
Generate the key before you send, not after. The point is that a retry reuses the same key. Generating a new one on retry defeats the mechanism entirely.
Reference

Status & limits

Standard HTTP semantics throughout — the body always carries a success boolean and a human message on errors.

LimitValue
Rate limit60 requests / minute per key
Idempotency window30 minutes
Pending poll cadenceevery 5–10 seconds
Typical completionunder 60 seconds
Max quantity10 units per order
Page sizemax 100 items

HTTP status codes

CodeMeaning
200OK — request successful.
201Created — order accepted, balance charged.
202Accepted — still processing, poll again.
400Bad request — invalid format or parameters.
401Unauthorized — auth failed or key invalid.
404Not found — resource does not exist.
409Conflict — an identical request is still in flight.
410Gone — failed, refunded or cancelled (terminal).
422Idempotency key reused with different parameters.
429Too many requests — rate limit exceeded.
500Internal server error.
503Catalogue temporarily unavailable.
Error shape
{
  "success": false,
  "message": "Insufficient balance. Required: 973.50 USDT, available: 248.60"
}
Back off on 429 and 5xx. Use exponential backoff rather than retrying immediately. Hammering a rate-limited endpoint keeps you rate limited.