Skip to content

All the docs on one page.

Copy them for your AI tool: all at once, or one page at a time.

22 pages as Markdown, about 195 KB in all.

Instructions for agents.

They come first when you copy everything.

1.3 KB of Markdown

# Hidden API documentation (complete)

> Index: https://docs.sellhidden.com/llms.txt. OpenAPI: https://docs.sellhidden.com/openapi.json

## Instructions for agents

- Base URL https://api.sellhidden.com/v1. Public endpoints need no key. Authenticated endpoints take `Authorization: Bearer <key>`.
- Ask the user for their API key and store slug. Never print, log or commit the key; keep it in an environment variable.
- Send `Idempotency-Key` on every POST.
- Verify every webhook: X-Hidden-Signature is `sha256=` plus the hex HMAC-SHA256 of `${X-Hidden-Timestamp}.${rawBody}` with the signing secret, compared in constant time; reject timestamps older than 5 minutes; dedupe by X-Hidden-Delivery; answer 2xx within 15 seconds.
- Payments have a test mode: create the payment with `"test": true`. Its page shows Mark as paid and Mark as expired, which send the real `payment.paid` or `payment.expired` event with `"test": true`; no money moves. Use a new `reference` for each test. Other calls change the real store.
- Create payments from your server; send the buyer to the payment's `url`, a Hidden page that cannot be shown inside a frame. Deliver only on the signed `payment.paid` event, never on `returnUrl`.
- Orders are created by buyers at checkout; the API manages them afterwards.

Every page.

In docs order. Each page is also Markdown on its own: add .md to its address.

Developer docs

9.6 KB of Markdown · Open the page

# Developer docs

Source: https://docs.sellhidden.com

One call to the Hidden API creates a payment. Your buyer pays on a Hidden page, Hidden tells your server with a signed event, and you deliver the order once.

0% platform fee.

## One payment, part by part

### 1. Your server asks Hidden for a payment.

**Node** · `create.mjs`

```javascript
const res = await fetch("https://api.sellhidden.com/v1/payments", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.HIDDEN_API_KEY}`,
    "Content-Type": "application/json" },
  body: JSON.stringify({ amountUsd: 49,
    reference: "order-1042", test: true }),
});
const { ok, payment, error } = await res.json();
if (!ok) throw new Error(`${error.code}: ${error.message}`);
console.log(payment.url); // send the buyer there
```

**curl** · `shell`

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/payments" \
  -H "Authorization: Bearer $HIDDEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amountUsd": 49, "reference": "order-1042", "test": true}'
```

**Python** · `create.py`

```python
import os, requests  # pip install requests
r = requests.post(
    "https://api.sellhidden.com/v1/payments",
    headers={"Authorization": f"Bearer {os.environ['HIDDEN_API_KEY']}"},
    json={"amountUsd": 49, "reference": "order-1042", "test": True},
    timeout=15)
body = r.json()
if not body["ok"]:
    raise RuntimeError(f"{body['error']['code']}: "
        f"{body['error']['message']}")
print(body["payment"]["url"])  # send the buyer there
```

**PHP** · `create.php`

```php
<?php
$ch = curl_init("https://api.sellhidden.com/v1/payments");
curl_setopt_array($ch, [
    CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer "
        . getenv("HIDDEN_API_KEY"), "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => json_encode(["amountUsd" => 49,
        "reference" => "order-1042", "test" => true])]);
$body = json_decode(curl_exec($ch), true);
if (!$body["ok"]) throw new Exception($body["error"]["code"]
    . ": " . $body["error"]["message"]);
header("Location: " . $body["payment"]["url"], true, 303);
```

Response (201):

```json
{ "ok": true, "payment": {
    "id": "7K2Q-9XHD",
    "url": "https://sellhidden.com/order/7K2Q-9XHD",
    "status": "pending", "test": true } }
```

### 2. Your buyer pays $49.00 on a Hidden page.

Send the buyer to `payment.url`: Hidden hosts the payment page, never inside a frame. A test payment's page has no coin choice, only **Mark as paid** and **Mark as expired**: press Mark as paid and Hidden sends your server a real `payment.paid` event with `"test": true`. Deliver only on that signed event, never on `returnUrl`.

### 3. Hidden tells your server it is paid.

Hidden sends your server a signed `payment.paid` event. Check `X-Hidden-Signature` on the raw body, then answer `200 OK` within 15 seconds.

The `payment.paid` event:

```http
Content-Type: application/json
X-Hidden-Event: payment.paid
X-Hidden-Delivery: clx…
X-Hidden-Timestamp: 1794910361
X-Hidden-Signature: sha256=<hex>
```

```json
{
  "id": "evt_0123456789abcdef",
  "event": "payment.paid",
  "createdAt": "2026-11-17T10:12:41.000Z",
  "data": {
    "id": "7K2Q-9XHD",
    "url": "https://sellhidden.com/order/7K2Q-9XHD",
    "status": "paid",
    "test": true,
    "amountUsd": 49,
    "paidUsd": 49,
    "shortUsd": 0,
    "creditedUsd": 0,
    "feeUsd": 0,
    "networkFeeUsd": 0,
    "reference": "order-1042",
    "description": "Pro plan, 1 month",
    "metadata": {
      "plan": "pro"
    },
    "buyerEmail": "buyer@example.com",
    "returnUrl": "https://shop.example.com/thanks?order=1042",
    "cancelUrl": "https://shop.example.com/cart",
    "coin": null,
    "network": null,
    "underpaid": null,
    "availableAt": null,
    "createdAt": "2026-11-17T10:00:00.000Z",
    "expiresAt": "2026-11-17T11:00:00.000Z",
    "paidAt": "2026-11-17T10:12:40.000Z"
  }
}
```

### 4. You deliver the order, once.

Deliver when `data.status` is `paid` and `data.test` is false, once per `data.id`. A test payment is skipped: nothing is delivered.

**Details**

A test payment. No money moves.

- The answer is `{ "ok": true, "payment": { ... } }`. The full object holds more; these matter.
- **payment.url** is where the buyer goes. **payment.id** is Hidden's id. **expiresAt**: 60 minutes by default.
- Same **reference** and amount again: `200`, `"existing": true`. After "Mark as paid": `409 reference_paid`. Use a new reference for each test.
- Errors: `{ "ok": false, "error": { "code", "message", "field" } }`.
- Hidden hosts the page. Optional **returnUrl** and **cancelUrl** bring the buyer back: `https://shop.example.com/thanks?order=1042`. Both must be on one of your websites; a test payment may also return to `localhost`.
- Test mode is one field: `"test": true`. No test keys, no sandbox host. Real events arrive with `"test": true`.

## Hidden tells your server, signed.

```http
X-Hidden-Timestamp: <Unix seconds>
X-Hidden-Signature: sha256=<hex>
```

**Node** · `webhook.mjs`

```javascript
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyHidden(raw, timestamp, signature, secret) {
  const age = Math.abs(Date.now() / 1000 - Number(timestamp));
  // missing, or more than 5 minutes off
  if (!timestamp || !(age <= 300)) return false;
  const want = Buffer.from(createHmac("sha256", secret)
    .update(`${timestamp}.${raw}`).digest("hex"));
  const got = Buffer.from(
    String(signature ?? "").replace(/^sha256=/, ""));
  return got.length === want.length && timingSafeEqual(got, want);
}

export async function POST(req) {
  // the body exactly as sent: never parse it first
  const raw = await req.text();
  const ok = verifyHidden(raw,
    req.headers.get("x-hidden-timestamp"),
    req.headers.get("x-hidden-signature"),
    process.env.HIDDEN_WEBHOOK_SECRET);
  if (!ok) return new Response("bad signature", { status: 401 });
  const { event, data } = JSON.parse(raw);
  if (event === "payment.paid" && !data.test)
    await fulfilOnce(data.reference, data.id); // your code
  return new Response("ok"); // any 2xx within 15 seconds
}
```

**curl** · `read it back`

```bash
# A shell cannot take a webhook.
# Read the payment back instead:
curl https://api.sellhidden.com/v1/payments/7K2Q-9XHD \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

A shell cannot check a signature. Change the language to Node, Python or PHP.

**Python** · `verify.py`

```python
import hashlib, hmac, time

def verify_hidden(raw: bytes, timestamp: str, signature: str,
                  secret: str) -> bool:
    timestamp, signature = timestamp or "", signature or ""
    if (not timestamp.isascii() or not timestamp.isdigit()
            or abs(time.time() - int(timestamp)) > 300):
        return False  # missing, or more than 5 minutes off
    want = hmac.new(secret.encode(), timestamp.encode() + b"." + raw,
                    hashlib.sha256).hexdigest()
    return hmac.compare_digest(want.encode(),
        signature.removeprefix("sha256=").encode())
```

**PHP** · `verify.php`

```php
<?php
function verify_hidden(string $raw, string $timestamp,
    string $signature, string $secret): bool {
    if (!ctype_digit($timestamp)
        || abs(time() - (int) $timestamp) > 300) return false;
    $want = hash_hmac("sha256", $timestamp . "." . $raw, $secret);
    return hash_equals($want,
        preg_replace('/^sha256=/', '', $signature));
}
// $raw = file_get_contents("php://input");
// the headers are HTTP_X_HIDDEN_TIMESTAMP and
// HTTP_X_HIDDEN_SIGNATURE in $_SERVER
```

HMAC-SHA256 of `<timestamp>.<raw body>`, keyed with the whole `whsec_...` secret in `HIDDEN_WEBHOOK_SECRET`.

A test case for your signature check:
- Secret: `whsec_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef`
- Timestamp: `1794910361`
- Body: `{"id":"evt_0123456789abcdef","event":"payment.paid","createdAt":"2026-11-17T10:12:41.000Z","data":{"id":"7K2Q-9XHD","status":"paid","amountUsd":49}}`
- Signature: `sha256=dc2d0686941478580ce6baf166d24016b291529e1c3cc72819295b2520171a08`

The timestamp is old, so the 5-minute check refuses it: for this test, check the HMAC alone or set the clock to `1794910361`.

## Then you deliver, once.

**Deliver only when all three are true:**

- `data.status` is `paid`
- `data.test` is false
- Once per `data.id`

Never on `returnUrl`: anyone can open that URL.

Tick these four under "Payments" in "Add endpoint":

payment.paid · payment.underpaid · payment.expired · payment.cancelled

No 2xx? Hidden tries 7 times over about 45 hours, with the same event **id**. Answer **401** on a bad signature.

Answer 2xx within 15 seconds.

## The guide and the reference

- [Read the full guide](https://docs.sellhidden.com/payments): From a first test payment to live payments.
  - [First test payment](https://docs.sellhidden.com/payments#how-it-works)
  - [Handle payment.paid](https://docs.sellhidden.com/payments#statuses-and-webhooks)
  - [The payment page](https://docs.sellhidden.com/payments#the-payment-page)
  - [Go live](https://docs.sellhidden.com/payments#turn-on)
  - [Errors](https://docs.sellhidden.com/payments#errors)
- [API reference](https://docs.sellhidden.com/reference/payments): Payments: five calls, the payment object, statuses, events and errors.
  - [Create a payment](https://docs.sellhidden.com/reference/payments#payments-payments-create)
  - [The payment object](https://docs.sellhidden.com/reference/payments#object)
  - [Statuses and events](https://docs.sellhidden.com/reference/payments#statuses)
  - [Errors](https://docs.sellhidden.com/reference/payments#errors)

**For AI tools**

- llms.txt: `https://docs.sellhidden.com/llms.txt`
- OpenAPI: `https://api.sellhidden.com/v1/openapi.json`

Accept crypto payments

16 KB of Markdown · Open the page

# Accept crypto payments

Source: https://docs.sellhidden.com/payments

From your first test payment to live: your server creates a payment, the buyer pays on a page Hidden hosts, and your server delivers on the signed `payment.paid` event.

0% platform fee.

## Your first test payment

### 1. Get a key.

**Developers** > **API keys** > **Create a key**

In **Permissions**: **Read only**, then **Write** on **Payments**. **Create key**, copy it from **Copy your new API key** (shown once) into `HIDDEN_API_KEY`. Needs a verified email.

### 2. Create a test payment.

**Node** · `create.mjs`

```javascript
const res = await fetch("https://api.sellhidden.com/v1/payments", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.HIDDEN_API_KEY}`,
    "Content-Type": "application/json" },
  body: JSON.stringify({ amountUsd: 49,
    reference: "order-1042", test: true }),
});
const { ok, payment, error } = await res.json();
if (!ok) throw new Error(`${error.code}: ${error.message}`);
console.log(payment.url); // send the buyer there
```

**curl** · `shell`

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/payments" \
  -H "Authorization: Bearer $HIDDEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amountUsd": 49, "reference": "order-1042", "test": true}'
```

**Python** · `create.py`

```python
import os, requests  # pip install requests
r = requests.post(
    "https://api.sellhidden.com/v1/payments",
    headers={"Authorization": f"Bearer {os.environ['HIDDEN_API_KEY']}"},
    json={"amountUsd": 49, "reference": "order-1042", "test": True},
    timeout=15)
body = r.json()
if not body["ok"]:
    raise RuntimeError(f"{body['error']['code']}: "
        f"{body['error']['message']}")
print(body["payment"]["url"])  # send the buyer there
```

**PHP** · `create.php`

```php
<?php
$ch = curl_init("https://api.sellhidden.com/v1/payments");
curl_setopt_array($ch, [
    CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer "
        . getenv("HIDDEN_API_KEY"), "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => json_encode(["amountUsd" => 49,
        "reference" => "order-1042", "test" => true])]);
$body = json_decode(curl_exec($ch), true);
if (!$body["ok"]) throw new Exception($body["error"]["code"]
    . ": " . $body["error"]["message"]);
header("Location: " . $body["payment"]["url"], true, 303);
```

Response (201):

```json
{ "ok": true, "payment": {
    "id": "7K2Q-9XHD",
    "url": "https://sellhidden.com/order/7K2Q-9XHD",
    "status": "pending", "test": true } }
```

### 3. Open the url. Press Mark as paid.

Send the buyer to `payment.url`: Hidden hosts the payment page, never inside a frame. A test payment's page has no coin choice, only **Mark as paid** and **Mark as expired**: press Mark as paid and Hidden sends your server a real `payment.paid` event with `"test": true`. Deliver only on that signed event, never on `returnUrl`.

Read it back with `GET /payments/7K2Q-9XHD`: `status` is `"pending"` until you press Mark as paid, then `"paid"`. Test mode is one field: no test keys, no sandbox host, no money moves.

**Details**

What the buyer sees, what the API never returns, and what the samples run on.

- The API never returns a deposit address, a coin amount or a QR code: the buyer picks a coin and pays on the Hidden page.
- The page shows your store name, the amount and "Powered by Hidden" on every plan except Enterprise. It speaks 12 languages and works on phones.
- The samples run on Node 18, Python 3.9 and PHP 8, or later.

## Handle `payment.paid`, once.

**Node** · `webhook.mjs`

```javascript
import { createHmac, timingSafeEqual } from "node:crypto";

export async function POST(req) {
  const raw = await req.text(); // as sent: never parse it first
  const ok = verifyHidden(raw, req.headers.get("x-hidden-timestamp"),
    req.headers.get("x-hidden-signature"),
    process.env.HIDDEN_WEBHOOK_SECRET);
  if (!ok) return new Response("bad signature", { status: 401 });
  const { event, data } = JSON.parse(raw);
  if (event === "payment.paid" && data.status === "paid" && !data.test)
    await fulfilOnce(data.reference, data.id); // once per payment
  return new Response("ok"); // any 2xx within 15 seconds
}

// a retry repeats the event id: deliver once
const delivered = new Set(); // your database in production
async function fulfilOnce(reference, paymentId) {
  if (delivered.has(paymentId)) return;
  // your code: deliver order `reference` here
  delivered.add(paymentId);
}

export function verifyHidden(raw, timestamp, signature, secret) {
  const age = Math.abs(Date.now() / 1000 - Number(timestamp));
  // missing, or more than 5 minutes off
  if (!timestamp || !(age <= 300)) return false;
  const want = Buffer.from(createHmac("sha256", secret)
    .update(`${timestamp}.${raw}`).digest("hex"));
  const got = Buffer.from(
    String(signature ?? "").replace(/^sha256=/, ""));
  return got.length === want.length && timingSafeEqual(got, want);
}
```

**curl** · `read it back`

```bash
# A shell cannot take a webhook.
# Read the payment back instead:
curl https://api.sellhidden.com/v1/payments/7K2Q-9XHD \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

The webhook handler is in Node, Python and PHP; this curl only reads the payment back.

**Python** · `webhook.py`

```python
import hashlib, hmac, json, os, time
from flask import Flask, request  # pip install flask

app = Flask(__name__)

@app.post("/hidden/webhook")
def hidden_webhook():
    raw = request.get_data()  # as sent: never parse it first
    ok = verify_hidden(
        raw, request.headers.get("X-Hidden-Timestamp"),
        request.headers.get("X-Hidden-Signature"),
        os.environ["HIDDEN_WEBHOOK_SECRET"])
    if not ok:
        return "bad signature", 401
    body = json.loads(raw)
    data = body["data"]
    if (body["event"] == "payment.paid" and data["status"] == "paid"
            and not data["test"]):
        fulfil_once(data.get("reference"), data["id"])
    return "ok"  # any 2xx within 15 seconds

delivered = set()  # use your database in production

def fulfil_once(reference, payment_id):
    # a retry repeats the event id: deliver once
    if payment_id in delivered:
        return
    # your code: deliver order `reference` here
    delivered.add(payment_id)

def verify_hidden(raw: bytes, timestamp: str, signature: str,
                  secret: str) -> bool:
    # a missing header arrives as None
    timestamp, signature = timestamp or "", signature or ""
    # refuse it when missing, malformed,
    # or more than 5 minutes off
    if (not timestamp.isascii() or not timestamp.isdigit()
            or abs(time.time() - int(timestamp)) > 300):
        return False
    want = hmac.new(secret.encode(), timestamp.encode() + b"." + raw,
                    hashlib.sha256).hexdigest()
    return hmac.compare_digest(want.encode(),
        signature.removeprefix("sha256=").encode())
```

**PHP** · `webhook.php`

```php
<?php
$raw = file_get_contents("php://input"); // the raw body
$ok = verify_hidden($raw,
    $_SERVER["HTTP_X_HIDDEN_TIMESTAMP"] ?? "",
    $_SERVER["HTTP_X_HIDDEN_SIGNATURE"] ?? "",
    (string) getenv("HIDDEN_WEBHOOK_SECRET"));
if (!$ok) { http_response_code(401); exit("bad signature"); }
$body = json_decode($raw, true);
$data = $body["data"];
if ($body["event"] === "payment.paid" && $data["status"] === "paid"
    && !$data["test"]) {
    fulfil_once($data["reference"] ?? "", $data["id"]);
}
echo "ok"; // any 2xx within 15 seconds

// a retry repeats the event id: deliver once
function fulfil_once(string $reference, string $paymentId): void {
    // use your database in production; a file marks it here
    $mark = sys_get_temp_dir() . "/hidden-" . bin2hex($paymentId);
    if (file_exists($mark)) return;
    // your code: deliver order $reference here
    touch($mark);
}

function verify_hidden(string $raw, string $timestamp,
    string $signature, string $secret): bool {
    if (!ctype_digit($timestamp)
        || abs(time() - (int) $timestamp) > 300) return false;
    $want = hash_hmac("sha256", $timestamp . "." . $raw, $secret);
    return hash_equals($want,
        preg_replace('/^sha256=/', '', $signature));
}
```

- Add your endpoint now, at a public https address: test events need it too ([step 3](https://docs.sellhidden.com/payments#add-endpoint)).
- Checks `X-Hidden-Signature` on the raw body with `HIDDEN_WEBHOOK_SECRET`. Bad: `401`.
- Delivers when `data.status` is `paid` and `data.test` is false, once per `data.id`.

**Payment events**

| Event | What it means |
| --- | --- |
| `payment.paid` | Deliver, once. |
| `payment.underpaid` | Short: the rest has 48 hours. |
| `payment.expired` | Not final: can still be paid. |
| `payment.cancelled` | Final. |

Answer 2xx within 15 seconds, or Hidden tries 7 times over about 45 hours, same event **id**. Mark as paid sends a real event with `"test": true`: nothing is delivered.

## Send the buyer, bring them back.

**Node** · `add to create.mjs`

```javascript
// 1. add to the create request
body: JSON.stringify({ amountUsd: 49, reference: "order-1042",
  returnUrl: "https://shop.example.com/thanks?order=1042",
  cancelUrl: "https://shop.example.com/cart", test: true }),
// 2. in your route, send the buyer there
return Response.redirect(payment.url, 303);
```

**curl** · `add to the request`

```bash
# 1. add to the create request
-d '{"amountUsd": 49, "reference": "order-1042",
  "returnUrl": "https://shop.example.com/thanks?order=1042",
  "cancelUrl": "https://shop.example.com/cart", "test": true}'
# 2. then open payment.url in a browser
```

**Python** · `add to create.py`

```python
# 1. add to the create request
json={"amountUsd": 49, "reference": "order-1042",
      "returnUrl": "https://shop.example.com/thanks?order=1042",
      "cancelUrl": "https://shop.example.com/cart", "test": True},
# 2. in your Flask route (from flask import redirect):
return redirect(body["payment"]["url"], code=303)
```

**PHP** · `add to create.php`

```php
// 1. add to the create request
CURLOPT_POSTFIELDS => json_encode(["amountUsd" => 49,
    "reference" => "order-1042",
    "returnUrl" => "https://shop.example.com/thanks?order=1042",
    "cancelUrl" => "https://shop.example.com/cart", "test" => true]),
// 2. then send the buyer to the payment page
header("Location: " . $body["payment"]["url"], true, 303);
```

A `303` to `payment.url`, or a link: the payment page cannot be shown inside a frame. Both URLs: https, on one of your websites, same origin exactly. A test payment may also return to `localhost`.

**Your return page**

- Thanks the buyer and shows the order as your webhook left it, or reads `GET /payments/7K2Q-9XHD`.

Never delivers: anyone can open that URL. Hidden adds nothing to it.

Paid while the page is open, or opened within 15 minutes: back to `returnUrl` after 5 seconds.

`cancelUrl` is the "Back to Nova Studio" link when a payment expires, is cancelled or is short.

## Turn on live payments.

### 1. Add your website.

**Developers** > **Payments** > **Add website**

Under **Your websites**, fill **Website address**. "Payments" is a tab, not in the sidebar.

### 2. Then turn on the switch. Store owner only.

**Accept payments through the API**

### 3. Add your webhook endpoint.

**Developers** > **Webhooks** > **Add endpoint**

**Endpoint URL**: your public https address. In **Events**, untick `order.paid`, tick the four under **Payments**:

payment.paid · payment.underpaid · payment.expired · payment.cancelled

**Add endpoint** shows the signing secret once: copy it into `HIDDEN_WEBHOOK_SECRET`.

### 4. Remove `test` from the create request.

**Before your first live payment**

- [ ] Key on your server only, "Write" on "Payments".
- [ ] Payments created by your server, never a web page.
- [ ] A new `reference` for each order.
- [ ] The four "Payments" events ticked.
- [ ] A bad signature answers `401`.
- [ ] Deliver on `payment.paid`, once per `data.id`.
- [ ] Answer 2xx within 15 seconds.
- [ ] Never deliver on `returnUrl`.
- [ ] Website added, then the switch on.
- [ ] `test` removed from the create request.

## When things go wrong

### A payment arrives short.

- Short by more than the store's tolerance: status `underpaid`, event `payment.underpaid`. Do not deliver yet.
- The buyer has 48 hours to send the rest ("Send the rest" on the page). Then `payment.paid` comes.
- Short within the tolerance counts as paid: `shortUsd` shows the gap.
- To complete it on what arrived: `POST /payments/{id}/accept`. It cannot be undone.
- A test payment cannot be short.

### Expired, then paid.

- `expired` is not final. A late transfer can still make it `paid`, or `underpaid` if it is short.
- Keep the order open on `payment.expired`. Deliver on `payment.paid`, as always.
- The API shows `expired` once `expiresAt` passes. The event follows within about 30 minutes.
- `expiresInMinutes`: 15 to 1,440. Default 60.

### A reference used twice.

- Same `reference`, amount and `test` while open: `200`, `"existing": true`, the same payment.
- Another amount while open, or expired less than 2 hours ago after the buyer got an address: `409 reference_in_use`.
- Already paid: `409 reference_paid`. Do not charge again.
- Testing: a new reference each time, or press "Mark as expired" to free it.

### The signature does not match.

- Check the body exactly as it arrived. Express: `express.raw({ type: "application/json" })` on this route, never `express.json()` first. Flask: `request.get_data()`. PHP: `php://input`.
- Nothing in front of your server may rewrite the JSON.
- Use this endpoint's whole `whsec_` secret (the new one after a rotate), never the API key.
- Your server clock must be within 5 minutes of the real time.

### Refunds.

- Crypto payments are final: Hidden does not send refunds for API payments.
- To refund a buyer, send them the money yourself.

### Errors.

Errors come as `{ "ok": false, "error": { "code", "message", "field" } }` ([responses](https://docs.sellhidden.com/reference#responses)).

| Status | Code | When | Do |
| --- | --- | --- | --- |
| 400 | `validation_error` | A field breaks a rule. `field` names it. | Fix that field. |
| 400 | `site_not_allowed` | `returnUrl` or `cancelUrl` is not on your websites. | Add the website. Match the origin exactly. |
| 401 | `unauthorized` | Key missing or wrong. Also `key_revoked`, `key_expired`. | Use a valid key. |
| 403 | `insufficient_scope` | The key lacks `payments:write` ([scopes](https://docs.sellhidden.com/reference#scopes)). | A new key with "Write" on "Payments". |
| 403 | `server_only` | Created from a web page. | Call from your server. |
| 403 | `payments_off` | A live payment, and the switch is off. | Add the website, then turn on the switch. |
| 409 | `reference_in_use` | This reference is open with another amount, or expired a short while ago. | Cancel it, wait, or use a new reference. |
| 409 | `reference_paid` | This reference is already paid. | Do not charge again. |
| 429 | `rate_limited` | Too many requests. Also `daily_limit`, `open_limit`. | Wait `Retry-After`. Cancel unused payments. |

## Other pages

- [Run your first payment](https://docs.sellhidden.com): One payment, part by part: request, page, webhook.
  - [Check the signature](https://docs.sellhidden.com#check-the-signature)
  - [Deliver once](https://docs.sellhidden.com#deliver-once)
- [API reference](https://docs.sellhidden.com/reference/payments): Payments: five calls, the payment object, statuses, events and errors.
  - [Create a payment](https://docs.sellhidden.com/reference/payments#payments-payments-create)
  - [The payment object](https://docs.sellhidden.com/reference/payments#object)
  - [Statuses and events](https://docs.sellhidden.com/reference/payments#statuses)
  - [Errors](https://docs.sellhidden.com/reference/payments#errors)

Your store's events

20 KB of Markdown · Open the page

# Your store's events

Source: https://docs.sellhidden.com/webhooks

Hidden sends your server a signed POST for every event you subscribe to, tries again when your server fails, and logs every delivery in the dashboard.

## Set up your endpoint

### 1. Add an endpoint.

**Developers** > **Webhooks** > **Add endpoint**

**Endpoint URL**: your public https address. Under **Events**, tick the ones you want. Copy the secret from **Copy your signing secret** (shown once) into `HIDDEN_WEBHOOK_SECRET`.

Each endpoint has a label, a list of subscribed events, its own signing secret (rotate it any time) and a delivery log you can filter and resend from. Free: 1 endpoint, log kept 7 days. Starter: 5 endpoints, 14 days. Pro and Enterprise: no limit, 30 and 90 days. Private and local addresses are rejected.

From code: `POST /webhooks` with `url` and `events`. The answer carries `webhook.secret`, this one time. See the [webhooks API](https://docs.sellhidden.com/reference/webhooks).

### 2. Check the signature.

```http
X-Hidden-Timestamp: <Unix seconds>
X-Hidden-Signature: sha256=<hex>
```

**Node** · `webhook.mjs`

```javascript
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyHidden(raw, timestamp, signature, secret) {
  const age = Math.abs(Date.now() / 1000 - Number(timestamp));
  // missing, or more than 5 minutes off
  if (!timestamp || !(age <= 300)) return false;
  const want = Buffer.from(createHmac("sha256", secret)
    .update(`${timestamp}.${raw}`).digest("hex"));
  const got = Buffer.from(
    String(signature ?? "").replace(/^sha256=/, ""));
  return got.length === want.length && timingSafeEqual(got, want);
}

export async function POST(req) {
  // the body exactly as sent: never parse it first
  const raw = await req.text();
  const ok = verifyHidden(raw,
    req.headers.get("x-hidden-timestamp"),
    req.headers.get("x-hidden-signature"),
    process.env.HIDDEN_WEBHOOK_SECRET);
  if (!ok) return new Response("bad signature", { status: 401 });
  const { event, data } = JSON.parse(raw);
  if (event === "payment.paid" && !data.test)
    await fulfilOnce(data.reference, data.id); // your code
  return new Response("ok"); // any 2xx within 15 seconds
}
```

**curl** · `read it back`

```bash
# A shell cannot take a webhook.
# Read the payment back instead:
curl https://api.sellhidden.com/v1/payments/7K2Q-9XHD \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

**Python** · `verify.py`

```python
import hashlib, hmac, time

def verify_hidden(raw: bytes, timestamp: str, signature: str,
                  secret: str) -> bool:
    timestamp, signature = timestamp or "", signature or ""
    if (not timestamp.isascii() or not timestamp.isdigit()
            or abs(time.time() - int(timestamp)) > 300):
        return False  # missing, or more than 5 minutes off
    want = hmac.new(secret.encode(), timestamp.encode() + b"." + raw,
                    hashlib.sha256).hexdigest()
    return hmac.compare_digest(want.encode(),
        signature.removeprefix("sha256=").encode())
```

**PHP** · `verify.php`

```php
<?php
function verify_hidden(string $raw, string $timestamp,
    string $signature, string $secret): bool {
    if (!ctype_digit($timestamp)
        || abs(time() - (int) $timestamp) > 300) return false;
    $want = hash_hmac("sha256", $timestamp . "." . $raw, $secret);
    return hash_equals($want,
        preg_replace('/^sha256=/', '', $signature));
}
// $raw = file_get_contents("php://input");
// the headers are HTTP_X_HIDDEN_TIMESTAMP and
// HTTP_X_HIDDEN_SIGNATURE in $_SERVER
```

HMAC-SHA256 of `<timestamp>.<raw body>`, keyed with the whole `whsec_...` secret in `HIDDEN_WEBHOOK_SECRET`.

A test case for your signature check:
- Secret: `whsec_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef`
- Timestamp: `1794910361`
- Body: `{"id":"evt_0123456789abcdef","event":"payment.paid","createdAt":"2026-11-17T10:12:41.000Z","data":{"id":"7K2Q-9XHD","status":"paid","amountUsd":49}}`
- Signature: `sha256=dc2d0686941478580ce6baf166d24016b291529e1c3cc72819295b2520171a08`

The timestamp is old, so the 5-minute check refuses it: for this test, check the HMAC alone or set the clock to `1794910361`.

### 3. Handle `order.paid`.

Store orders send `order.paid`. The same check, then your part:

**Node** · `orders.mjs`

```javascript
import { verifyHidden } from "./webhook.mjs";

export async function POST(req) {
  // the raw body, exactly as sent
  const raw = await req.text();
  const ok = verifyHidden(raw,
    req.headers.get("x-hidden-timestamp"),
    req.headers.get("x-hidden-signature"),
    process.env.HIDDEN_WEBHOOK_SECRET);
  if (!ok) return new Response("bad signature", { status: 401 });
  const { event, data } = JSON.parse(raw);
  if (event === "order.paid" && !data.test)
    await onOrderPaid(data); // your code, once per orderId
  return new Response("ok"); // any 2xx within 15 seconds
}
```

**curl** · `read it back`

```bash
# A shell cannot take a webhook.
# Read the order back instead:
curl https://api.sellhidden.com/v1/orders/4MPT-8WQA \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

**Python** · `orders.py`

```python
import json, os
from flask import Flask, request  # pip install flask
from verify import verify_hidden  # verify.py above

app = Flask(__name__)

@app.post("/hidden-webhook")
def hidden_webhook():
    raw = request.get_data()  # the body exactly as sent
    ts = request.headers.get("X-Hidden-Timestamp")
    sig = request.headers.get("X-Hidden-Signature")
    secret = os.environ["HIDDEN_WEBHOOK_SECRET"]
    if not verify_hidden(raw, ts, sig, secret):
        return "bad signature", 401
    body = json.loads(raw)
    data = body["data"]
    if body["event"] == "order.paid" and not data.get("test"):
        on_order_paid(data)  # your code, once per orderId
    return "ok"  # any 2xx within 15 seconds
```

**PHP** · `orders.php`

```php
<?php
require __DIR__ . "/verify.php";
$raw = file_get_contents("php://input"); // as sent
$ok = verify_hidden($raw,
    $_SERVER["HTTP_X_HIDDEN_TIMESTAMP"] ?? "",
    $_SERVER["HTTP_X_HIDDEN_SIGNATURE"] ?? "",
    (string) getenv("HIDDEN_WEBHOOK_SECRET"));
if (!$ok) {
    http_response_code(401);
    exit("bad signature");
}
$body = json_decode($raw, true);
$data = $body["data"];
if ($body["event"] === "order.paid" && empty($data["test"])) {
    on_order_paid($data); // your code, once per orderId
}
echo "ok"; // any 2xx within 15 seconds
```

Do your part once per `data.orderId`: a retry sends the same event again.

## What an order goes through.

Every step is a webhook event. Most orders take the first three: created, paid, delivered.

**The usual path**

| Event | What it means |
| --- | --- |
| `order.created` | The buyer checked out. Nothing is paid yet. |
| `order.paid` | The payment is confirmed. Delivery starts right after. |
| `order.delivered` | Every item reached the buyer. |

**Or one of these**

| Event | What it means |
| --- | --- |
| `order.underpaid` | Less than the total arrived. The buyer can send the rest until `payableUntil`. |
| `order.manual_claimed` | The buyer sent proof for a manual payment. Check it in the dashboard. |
| `order.expired` | Not paid in full in time. |
| `order.cancelled` | Cancelled before it was paid. |
| `order.delivery_failed` | An item could not be delivered. |
| `order.oversold` | Stock ran out after the payment. |
| `order.refunded` | Refunded, most often to the buyer's store balance. |

API payments send their own four events, never `order.*` (see Payments under Every event). Tick each by name: wildcards such as `payment.*` are refused.

## Every event.

33 events you can pick, plus `webhook.test`.

**Events you can pick**

**Orders**

| Event | Sent when |
| --- | --- |
| `order.created` | The buyer checked out, or Hidden opened a subscription's renewal order (with `renewal: true` and `subscriptionId`). Nothing is paid yet. |
| `order.paid` | Payment confirmed, or a manual payment verified. Delivery starts right after. |
| `order.delivered` | Every item in the order was delivered. |
| `order.delivery_failed` | One or more items could not be delivered. Adds `reason` (`oversold` or `delivery_failed`) and `failures`, one entry per item with its error. An endpoint that lists the older name `order.failed` still gets it under that name; pick `order.delivery_failed` for a new one. |
| `order.oversold` | Stock ran out for a paid order, so part of it waits for a restock. Sent alongside `order.delivery_failed` with the same payload. |
| `order.underpaid` | The buyer sent less than the amount due. Adds `receivedUsd`, `remainingUsd` and `payableUntil`: the buyer can pay the rest until then, or you accept or refund what arrived. |
| `order.manual_claimed` | A buyer submitted proof for a manual payment method. Adds `proof`, `proofImage` (`true` when an image was attached) and `manualMethod`. Verify it in the dashboard. |
| `order.expired` | Not paid in full in time. After `order.underpaid`, `paidAmountUsd` is what arrived: accept or refund it. |
| `order.cancelled` | Cancelled by the seller, an admin or a refunded payment. Adds `reason`. |
| `order.refunded` | The order was refunded: to the buyer's store balance, or back to the card when a card checkout was refunded in your own card account. Adds `refundedUsd` and `reason`, and `partialPayment: true` when only part of the total had arrived. |

**Payments**

| Event | Sent when |
| --- | --- |
| `payment.paid` | An API payment was paid in full, within your tolerance, or accepted by you. Carries the payment object: deliver now. |
| `payment.underpaid` | Less than the amount arrived. `underpaid` holds `receivedUsd`, `remainingUsd` and `payableUntil`. |
| `payment.expired` | The payment expired. `paidUsd` above 0 means money arrived and waits for you to accept it. |
| `payment.cancelled` | The payment was cancelled through the API or the dashboard. |

**Subscriptions**

| Event | Sent when |
| --- | --- |
| `subscription.created` | A buyer paid the first period of a subscription variation, or started its free trial. The data is the subscription as one flat object (`subscriptionId`, `status`, `interval`, `quantity`, the period dates, the buyer and the product), plus `orderId`, `trial` and `keys`, the license keys delivered so far. |
| `subscription.renewed` | The buyer paid a renewal (from the email link, the order page or automatically from store balance), or you extended it by one period. Adds the renewal `orderId` and the new period dates; on an extension `orderId` is `null` and `extendedBySeller` is `true`. |
| `subscription.expiring` | The period ends within the store's reminder window and the buyer was emailed a one-click renewal checkout. Adds `renewalOrderId` and `renewalUrl`. |
| `subscription.cancelled` | The buyer or the seller cancelled the subscription. It stays active until `currentPeriodEnd` (`cancelAtPeriodEnd`). Adds `cancelledBy` and `endsAt`. When the seller ends it at once, only `subscription.expired` is sent. |
| `subscription.expired` | The period and its grace days passed without a renewal (`reason` is `expired`), or a cancelled subscription reached its period end or the seller ended it at once (`reason` is `cancelled`). Discord roles granted by it are removed; the payload lists every license key it delivered (`keys`) so you can disable them on your side. |

**Top-ups**

| Event | Sent when |
| --- | --- |
| `topup.paid` | A buyer added funds to their store balance. Same payload as `order.paid`, with `orderKind` `topup`. |

**Stock**

| Event | Sent when |
| --- | --- |
| `product.low_stock` | A product or variation has 3 units or fewer left after a sale. Adds `productId`, `productSlug`, `title`, `variantId`, `variantLabel`, `deliveryType`, `remaining` and `threshold`. |
| `product.out_of_stock` | A product or variation sold its last unit. Same payload as `product.low_stock`, with `remaining` 0. |

**Tickets**

| Event | Sent when |
| --- | --- |
| `ticket.opened` | A buyer opened a support ticket. Adds `ticketId`, `orderId`, `buyerEmail`, `subject` and `message`. |
| `ticket.reply` | A buyer replied on one of their tickets. Adds `ticketId`, `messageId`, `orderId`, `buyerEmail`, `subject`, `message` and `from` (`buyer`). |

**Reviews**

| Event | Sent when |
| --- | --- |
| `review.created` | A buyer left a review. `replacedAutomatic` is `true` when it replaces an automatic rating. |
| `review.edited` | A buyer edited their review while it could still be changed. |

**Withdrawals**

| Event | Sent when |
| --- | --- |
| `withdrawal.requested` | A withdrawal was requested from the store balance, by you or by the automatic threshold. |
| `withdrawal.processed` | A withdrawal was sent (with the transaction hash) or returned to the balance. |

**Affiliates**

| Event | Sent when |
| --- | --- |
| `affiliate.commission.created` | A paid order was attributed to an affiliate, or you added a manual adjustment. Adds `commissionId`, `affiliateId`, `affiliateCode`, `affiliateEmail`, `orderId`, `amountUsd`, `baseUsd`, `pct`, `status` (`pending`, or `flagged` when a fraud guard tripped), `flagReason` and `releaseAt`. |
| `affiliate.commission.released` | The hold passed (or you released it) and the amount was added to the affiliate's store balance. Same payload, with `releasedAt`. |
| `affiliate.commission.reversed` | The order was refunded or you reversed the commission. Adds `reason` and `clawedBackUsd` (what came back out of an already credited balance). |

**Store and plan**

| Event | Sent when |
| --- | --- |
| `store.debt_limit` | Your balance went past the debt limit and manual payment methods were paused, or it recovered and they resumed. Adds `paused`, `balanceUsd` and `debtLimitUsd`. |
| `plan.changed` | A paid plan was activated or renewed, or the store went back to Free when it ended. Adds `plan`, `period` and `planExpiresAt`. |

**Sent only when you ask**

| Event | What it means |
| --- | --- |
| `webhook.test` | You pressed **Send test event** in the dashboard, or called `POST /webhooks/{id}/test`. Sent whatever the endpoint's events are, and never retried. |

Each sample is the `data` of one event's body. Every order event, and `topup.paid`, sends the order as `order.paid` shows it, with its own `status` (the payment keys are `null` until it is paid) and what its line adds. `buyerName`, `payCurrency`, `network`, `txHash` and `items[].productSlug` come only with `order.paid` and `topup.paid`. The payment events send [the payment object](https://docs.sellhidden.com/reference/payments#object), and the subscription events [the subscription](https://docs.sellhidden.com/reference/subscriptions#subscriptions-subscriptions-get) as the API returns it, each with what its line adds.

**order.paid**

`data`

```json
{
  "buyerName": null,
  "payCurrency": "USDT",
  "network": "Tron (TRC20)",
  "txHash": "7c1e…a90b",
  "orderId": "clx…",
  "publicRef": "4MPT-8WQA",
  "orderKind": "product",
  "storeId": "clx…",
  "status": "paid",
  "buyerEmail": "buyer@example.com",
  "discordUserId": null,
  "grossUsd": 29,
  "discountUsd": 0,
  "buyerTotalUsd": 29,
  "sellerNetUsd": 29,
  "platformFeeUsd": 0,
  "platformFeePaidByBuyerUsd": 0,
  "feeUsd": 0,
  "netUsd": 29,
  "feeBornBy": "seller",
  "networkFeeUsd": null,
  "couponCode": null,
  "paymentMethod": "crypto",
  "paidWithBalance": false,
  "manualMethodId": null,
  "paidAmountUsd": 29,
  "paidCurrency": "USDT",
  "txReference": "clx…",
  "paidAt": "2026-09-26T10:01:12.000Z",
  "deliveredAt": null,
  "refundedAt": null,
  "createdAt": "2026-09-26T09:58:40.000Z",
  "customFields": {},
  "items": [
    {
      "itemId": "clx…",
      "productId": "clx…",
      "productSlug": "lifetime-license",
      "title": "Lifetime license",
      "variantId": "clx…",
      "variantLabel": "Lifetime",
      "quantity": 1,
      "unitPriceUsd": 29,
      "deliveryStatus": "pending"
    }
  ]
}
```

**webhook.test**

`data`

```json
{
  "message": "This is a test delivery from Hidden. Your endpoint received it and the signature headers are real.",
  "store": {
    "id": "clx…",
    "slug": "my-store",
    "name": "My Store"
  },
  "sample": {
    "orderId": "ord_test_0000000000",
    "status": "paid",
    "buyerEmail": "buyer@example.com",
    "grossUsd": 25,
    "discountUsd": 0,
    "buyerTotalUsd": 25,
    "platformFeeUsd": 0,
    "sellerNetUsd": 25,
    "couponCode": null,
    "paymentMethod": "crypto",
    "items": [
      {
        "productId": "prd_test",
        "title": "Sample product",
        "variantId": null,
        "quantity": 1,
        "unitPriceUsd": 25,
        "deliveryStatus": "pending"
      }
    ]
  }
}
```

## Headers and payload.

Deliveries are JSON POSTs with six headers.

```http
Content-Type: application/json
User-Agent: Hidden-Webhooks/1.0 (+https://sellhidden.com)
X-Hidden-Event: order.paid
X-Hidden-Delivery: clx…
X-Hidden-Timestamp: 1790416872
X-Hidden-Signature: sha256=<hex>
```

`what arrives`

```json
{
  "id": "evt_9f2c1a7b3d5e6f80",
  "event": "order.paid",
  "createdAt": "2026-09-26T10:01:12.000Z",
  "data": {
    "orderId": "clx…",
    "publicRef": "4MPT-8WQA",
    "status": "paid"
  }
}
```

`X-Hidden-Event` names the event, `X-Hidden-Delivery` is the id of the delivery, `X-Hidden-Timestamp` is Unix seconds and `X-Hidden-Signature` carries the HMAC.

| Key | Type | Description |
| --- | --- | --- |
| `id` | string | The event id, `evt_` and 16 hex characters. The same on every retry, and for every endpoint that gets this event. |
| `event` | string | The event name, as in `X-Hidden-Event`. |
| `createdAt` | string | When the event happened (ISO 8601, UTC). It does not change on a retry. |
| `data` | object | The event's object: the order, the payment, the subscription and so on. Each event's line above says what it holds. |

On `order.paid` and `topup.paid`, `payCurrency` is the coin the buyer paid with, `network` is the name of its network for people to read, such as "Tron (TRC20)" (do not compare it in code), and `txHash` is the transaction hash on the blockchain once it is known. On every order event, `txReference` is Hidden's own id for the crypto payment, or `null` when there is none.

Anything but a 2xx counts as a failure, a redirect too. The body you return is ignored.

Orders a seller creates with **Test order** in the dashboard send the same events with `"test": true` in `data` (and in the dynamic delivery request), and have `test: true` in the API. Nothing was paid for them: never deliver or count a test order.

## Retries and duplicates.

Answer 2xx within 15 seconds, or Hidden tries again: 7 attempts over about 45 hours.

A failed delivery is retried up to six times: about 30 minutes, then 1, 2, 6, 12 and 24 hours after each failed attempt. Retries are sent in batches at :00 and :30, so one can leave up to 5 minutes early or about 25 minutes late.

- Retried: no answer within 15 seconds, a redirect, a 5xx and every 4xx not listed below, 401, 403 and 429 too, for example from a firewall in front of your server.

Not retried: 400, 404, 410 and 422, which say the request itself is wrong, and an address on a private or local network.

Every retry sends the same body, with the same event `id` and the same `X-Hidden-Delivery`, and a fresh timestamp and signature. The same event can reach you twice: do your part once per order or payment, and ignore an event `id` you already handled.

After 6 deliveries in a row fail, even after their retries, the endpoint is switched off and its pending retries stop. Hidden emails you its last answer and how to fix it, and switches it back on when it answers: every 6 hours for 7 days it sends the newest failed event again, and on a 2xx the events it missed in those days follow. Events raised while it is off are not sent. You can also switch it back on yourself in the dashboard; then use **Resend** for what failed.

Use **Send test event** to receive a signed `webhook.test` delivery, and **Resend** on any failed row to replay its exact payload.

## Webhooks in the dashboard and the API

- [Open the dashboard](https://dashboard.sellhidden.com): Developers, then Webhooks: add an endpoint, send a test event, read the log.
- [The webhooks API](https://docs.sellhidden.com/reference/webhooks): Create endpoints, rotate secrets and read deliveries from your code.
  - [Create an endpoint](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-create)
  - [Rotate the secret](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-rotate)
  - [Delivery log](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-deliveries)

Buy button and checkout links

11 KB of Markdown · Open the page

# Buy button and checkout links

Source: https://docs.sellhidden.com/buy-button

Include one script and give any element your store and product: clicking it opens your checkout on your own page. A price tag shows the current price, and your page gets an event when the order is paid.

## Paste two lines.

Any button or link becomes a Buy button.

`button.html`

```html
<button data-hidden-store="demo" data-hidden-product="starter-kit">Buy now</button>
<script src="https://sellhidden.com/embed.js" async></script>
```

Use your own store and product. Copy the product slug exactly, in lower case.

**What the script does**

- Any element with `data-hidden-store` and `data-hidden-product` opens a checkout modal with your live product page, once `embed.js` is on the page (include it once).
- The buyer never leaves the host page. The modal closes with its X, Escape, a click outside, or the Close button in the checkout.
- It sets no cookies and reads nothing on the host page. Before a click, its only request is the price lookup.
- It takes the checkout host from its own `src`, so a copied snippet cannot be redirected. Messages from the modal are accepted only from that origin.
- Load it from `https://sellhidden.com/embed.js`. Never copy, bundle or inline the script: it would open your own server instead of the checkout.
- An element with no text gets the label `Buy now`, or the text of `data-hidden-text`.
- The v1 snippet (`<script data-store data-product>`) keeps working and now opens the modal too.

## Show the live price.

A price tag shows the product's current price.

`price.html`

```html
<span data-hidden-price="demo/starter-kit" data-hidden-price-prefix="from "></span>
```

Read from the [public API](https://docs.sellhidden.com/reference/public#public-product) when the page loads (cached 60 seconds). Once loaded the tag gets `data-hidden-in-stock="true"` or `"false"`; a failed lookup keeps your text and sets `data-hidden-error="1"`. Prefer your own markup? Read the same product yourself (no key) and render the price.

**Format**

| Field | Type | Description |
| --- | --- | --- |
| `data-hidden-price-prefix` | text | Text put before the price. |
| `data-hidden-currency-symbol` | text | The sign before the number: `$` by default, empty for none. The price is always in US dollars. |
| `data-hidden-format` | usd \| raw | `raw` prints the bare number. |

## Fill in what you know.

The buyer types less. They can still change everything.

The attributes are read when the button is clicked, so you can set them after your page loads (for example once the visitor signs in). The checkout checks every value again, and a value that breaks a rule is dropped without a message.

`prefilled.html`

```html
<button data-hidden-store="demo"
  data-hidden-product="starter-kit"
  data-hidden-email="buyer@example.com"
  data-hidden-coupon="SPRING"
  data-hidden-variant="Team"
  data-hidden-quantity="2"
  data-hidden-ref="user:42"
  data-hidden-meta-discord_username="neo">Buy now</button>
```

The same values work on a [checkout link](https://docs.sellhidden.com/buy-button#checkout-links) as query parameters.

**Prefill attributes**

| Field | Type | Description |
| --- | --- | --- |
| `data-hidden-email` | email | The buyer's email, where the order link and receipt go. Used only when no buyer is signed in and the browser remembers no email. Then a valid site key for your page (on the script tag or the button) fills it in; without one it is offered as a suggestion the buyer accepts. On a checkout link it is only offered. |
| `data-hidden-coupon` | string | A coupon code, applied at checkout as if the buyer typed it. A code that does not apply shows its reason. |
| `data-hidden-variant` | string | The variation to preselect: its id, or its exact name. |
| `data-hidden-quantity` | 1-100 | The quantity to preselect (never more than is in stock). |
| `data-hidden-ref` | string | Your own reference, up to 64 of `A-Z a-z 0-9 _ . : @ + / = -`. Saved on the order as `customFields.ref` (webhooks, API, dashboard) and returned in every embed event. |
| `data-hidden-meta-<key>` | string | Fills your checkout field with that key (lowercase letters, digits and `_`). `data-hidden-meta-discord_user_id` fills the Discord user ID of Discord products (with a valid site key; otherwise it is offered as a suggestion). |

## Hear what happened.

Three events for your page.

`embed.js` tells your page what happens in the modal. Listen for the `hidden:success`, `hidden:error` and `hidden:close` events on `window` (works even before the script loads), or register callbacks with `HiddenEmbed.on("success", fn)` once it has. Every `detail` carries `store`, `product` and your `ref`.

| Key | Type | Description |
| --- | --- | --- |
| `hidden:success` | orderId, status | The order is paid. `status` is `paid`, `delivered`, `oversold` or `failed` (paid, delivery needs attention). Once per order. `orderId` is `null` unless your page holds a site key. |
| `hidden:error` | code, message, status | Something stopped the purchase: `checkout_failed` (the order could not be created; `message` says why), `order_expired`, `order_cancelled` or `sold_out`. |
| `hidden:close` | completed, status, orderId | The modal closed, however it was closed. `completed` is `true` when an order was paid in it. Once per modal. |

`events.html`

```html
<script>
  // Works before or after embed.js loads
  window.addEventListener("hidden:success", (e) => {
    const { orderId, status, ref } = e.detail;
    // status: paid, delivered, oversold, failed
    // orderId: null without a site key
    showThanks(ref); // never deliver here
  });
  window.addEventListener("hidden:error", (e) => {
    // checkout_failed, order_expired, ...
    console.warn(e.detail.code, e.detail.message);
  });
  window.addEventListener("hidden:close", (e) => {
    if (!e.detail.completed) offerHelp(); // closed before paying
  });
</script>
<script src="https://sellhidden.com/embed.js" data-hidden-key="hsk_your_site_key" async></script>
```

Keep one `embed.js` tag on the page and put the site key on it, in place of the tag from the first step: a second tag is ignored, its key included. `showThanks` and `offerHelp` are your own functions.

Never deliver on `hidden:success`: it is a signal for your page, and anyone can fire it from the browser console.

- Deliver from the signed `order.paid` [webhook](https://docs.sellhidden.com/webhooks#webhook-events), matched with `customFields.ref`. A buyer can also close the modal and pay later: only the webhook hears about that.

**The order id needs a site key**

An order id opens the order page and its delivered items, so the modal only hands it to a site you named. Create a site key for your website address in your dashboard:

**Developers** > **Embeds**

Add it to the script tag as `data-hidden-key` (or to one button). The modal learns your page's origin from the browser, checks the key against it and then posts to that exact origin only. On any other page `orderId` is `null`. The site key is not a secret, and it is not your API key.

Removed a team member or gave up a domain? The store owner can revoke every site key at once in the same place. Your sites keep selling, and get the order id again once they have a new key.

## Open it from your own code.

Open and close the modal yourself, or bind buttons you render later.

`app.js`

```javascript
// Open the checkout modal
HiddenEmbed.open("demo", "starter-kit");

// The same, prefilled
HiddenEmbed.open("demo", "starter-kit", {
  email: "buyer@example.com",
  variant: "Team",
  quantity: 2,
  ref: "user:42",
  meta: { discord_username: "neo" },
});

HiddenEmbed.close(); // close it
HiddenEmbed.scan(); // bind buttons added later

// Listen, and stop with the same function
const onPaid = (d) => showThanks(d.ref);
HiddenEmbed.on("success", onPaid);
HiddenEmbed.off("success", onPaid);
```

`HiddenEmbed` exists once `embed.js` has run: call it from a click, not while the page loads. In a single-page app, call `scan()` after rendering new buttons.

## No script? Send a checkout link.

For apps, Discord servers and Telegram bots.

Make a product for each price and send the buyer a checkout link with your own reference. The buyer checks out on Hidden, and the signed `order.paid` webhook carries that value in `customFields.ref`. Keep `buy=1` in the link: then `ref` is never read as an affiliate code.

`checkout links`

```text
https://demo.sellhidden.com/p/starter-kit?buy=1&ref=tg:5123456789
https://demo.sellhidden.com/p/starter-kit?buy=1&email=buyer@example.com&coupon=SPRING&meta.discord_username=neo
```

Every prefill value works on a link: `email` (only offered to the buyer there), `coupon`, `variant`, `quantity`, `ref` and `meta.<key>`. On a plain store link without `buy=1`, a store with an affiliate program can read `ref` as an affiliate code; there, put a colon or a dot in your reference (`tg:5123456789`, `user.42`).

**Check what was paid for**

- Check `items[].productId`, `variantId` and `quantity` in the webhook, not only `customFields.ref`: the buyer can change the link before paying.
- Deliver each `orderId` once.

## Or frame the checkout yourself.

For pages that cannot load a script. Almost every site uses `embed.js`.

Frame the product page with `?embed=1` and the frame sends your page the same messages. Answer its `hidden:ready` with `hidden:hello`: from then on the messages go to your origin only, and a site key in the answer unlocks the order id.

`own-iframe.html`

```html
<script>
  window.addEventListener("message", (e) => {
    if (e.origin !== "https://demo.sellhidden.com") return;
    const msg = e.data;
    if (msg?.type === "hidden:ready") {
      // answer every page load in the frame
      e.source.postMessage({ type: "hidden:hello", v: 2, key: "hsk_your_site_key" }, e.origin);
    }
    if (msg?.type === "hidden:success") showThanks();
    if (msg?.type === "hidden:close") document.getElementById("checkout").remove();
  });
</script>
<iframe id="checkout" title="Checkout"
  allow="clipboard-write"
  style="width:100%;height:820px;border:0"
  src="https://demo.sellhidden.com/p/starter-kit?embed=1"></iframe>
```

The frame never closes itself: when the buyer presses Close in it, you remove it.

**Show the whole checkout. The full rule is in the [Terms](https://sellhidden.com/terms#checkout-integrity).**

- Give the frame room to show the full checkout, and keep it in view.

Never crop, cover, blur or restyle any part of it, or hide anything it shows, the Powered by Hidden mark included.

Never copy the payment address, the amount to send or the QR code out of it onto your own page: the buyer pays inside these pages.

## Events and the configurator

- [Your store's events](https://docs.sellhidden.com/webhooks): The signed order.paid that carries your ref.
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
- [The configurator](https://sellhidden.com/embed): Pick a product and copy a ready snippet.

Deliver from your own server

10 KB of Markdown · Open the page

# Deliver from your own server

Source: https://docs.sellhidden.com/dynamic-delivery

Set a product's delivery to **Dynamic delivery** and paste your URL. On every paid order Hidden POSTs the signed order, once per unit, and delivers the `deliveredData` string you answer with. Use it to create accounts, generate keys or call your own license server.

## How it works.

Open the product. Under **What the buyer gets**, pick **Dynamic delivery**, paste your https address, copy the secret into `HIDDEN_DELIVERY_SECRET` and save.

### 1. What Hidden sends.

When an order is paid, Hidden sends your address one signed POST for each unit: an order of three sends three. It is signed like a [webhook](https://docs.sellhidden.com/webhooks#verify-signature), but the body is one unit of the order, not an event.

```http
Content-Type: application/json
User-Agent: Hidden-Delivery/1.0 (+https://sellhidden.com)
X-Hidden-Event: order.paid
X-Hidden-Order: cmhidden0order0000000001
X-Hidden-Timestamp: 1790416873
X-Hidden-Signature: sha256=5341edb1d4610783532c77e2ce13f775dcf43f6bbda67f9f5d828a6210c26ceb
```

`POST to your address`

```json
{
  "event": "order.paid",
  "orderId": "cmhidden0order0000000001",
  "itemId": "cmhidden0item00000000001",
  "productId": "cmhidden0product00000001",
  "productSlug": "lifetime-license",
  "variantId": "cmhidden0variant00000001",
  "variantLabel": null,
  "quantity": 1,
  "unitPriceUsd": 29,
  "buyerEmail": "buyer@example.com",
  "storeSlug": "my-store",
  "customFields": {},
  "paidAt": "2026-09-26T10:01:12.000Z"
}
```

The real body is one line, exactly as signed. There is no `X-Hidden-Delivery`.

| Key | Type | Description |
| --- | --- | --- |
| `event` | string | Always `order.paid`. |
| `test` | boolean | `true` on a test only: **Send test request** in the editor, or a **Test order** from the dashboard. Absent on real orders. |
| `orderId` | string | The order's id. It works as `{id}` in the API, and comes again in the `X-Hidden-Order` header. |
| `itemId` | string | The unit this call is for. The same on every try: your key for "already handled". |
| `productId` | string | The product's id. |
| `productSlug` | string | The product's slug. |
| `variantId` | string or null | The variation's id. |
| `variantLabel` | string or null | The variation's name; `null` when the product has one variation. |
| `quantity` | number | Always 1: one call per unit. |
| `unitPriceUsd` | number | The price of one unit, in US dollars. |
| `buyerEmail` | string | The buyer's email. |
| `storeSlug` | string | Your store's slug. |
| `customFields` | object | The buyer's answers to your checkout questions, by key. `{}` when there are none. |
| `paidAt` | string or null | When the order was paid (ISO 8601). Set on every paid order. |

### 2. Check the signature.

Check the signature before you hand out anything: anyone who learns your address could POST to it.

```http
X-Hidden-Timestamp: <Unix seconds>
X-Hidden-Signature: sha256=<hex>
```

**Node** · `verify.mjs`

```javascript
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyHidden(raw, timestamp, signature, secret) {
  const age = Math.abs(Date.now() / 1000 - Number(timestamp));
  // missing, or more than 5 minutes off
  if (!timestamp || !(age <= 300)) return false;
  const want = Buffer.from(createHmac("sha256", secret)
    .update(`${timestamp}.${raw}`).digest("hex"));
  const got = Buffer.from(
    String(signature ?? "").replace(/^sha256=/, ""));
  return got.length === want.length && timingSafeEqual(got, want);
}
```

**curl** · `shell`

```bash
# Check a request by hand, in a shell:
TS="1790416873"  # X-Hidden-Timestamp
BODY="$(cat body.json)"  # the raw body, as sent
printf '%s.%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$HIDDEN_DELIVERY_SECRET"
# the hex must equal X-Hidden-Signature
```

**Python** · `verify.py`

```python
import hashlib, hmac, time

def verify_hidden(raw: bytes, timestamp: str, signature: str,
                  secret: str) -> bool:
    timestamp, signature = timestamp or "", signature or ""
    if (not timestamp.isascii() or not timestamp.isdigit()
            or abs(time.time() - int(timestamp)) > 300):
        return False  # missing, or more than 5 minutes off
    want = hmac.new(secret.encode(), timestamp.encode() + b"." + raw,
                    hashlib.sha256).hexdigest()
    return hmac.compare_digest(want.encode(),
        signature.removeprefix("sha256=").encode())
```

**PHP** · `verify.php`

```php
<?php
function verify_hidden(string $raw, string $timestamp,
    string $signature, string $secret): bool {
    if (!ctype_digit($timestamp)
        || abs(time() - (int) $timestamp) > 300) return false;
    $want = hash_hmac("sha256", $timestamp . "." . $raw, $secret);
    return hash_equals($want,
        preg_replace('/^sha256=/', '', $signature));
}
```

HMAC-SHA256 of `<timestamp>.<raw body>`, keyed with the whole `whsec_...` secret of the product, in `HIDDEN_DELIVERY_SECRET`.

**A test case for your signature check**

- Secret: `whsec_test_secret_for_docs_only`
- Timestamp: `1790416873`
- Body: `{"event":"order.paid","orderId":"cmhidden0order0000000001","itemId":"cmhidden0item00000000001","productId":"cmhidden0product00000001","productSlug":"lifetime-license","variantId":"cmhidden0variant00000001","variantLabel":null,"quantity":1,"unitPriceUsd":29,"buyerEmail":"buyer@example.com","storeSlug":"my-store","customFields":{},"paidAt":"2026-09-26T10:01:12.000Z"}`
- Signature: `sha256=5341edb1d4610783532c77e2ce13f775dcf43f6bbda67f9f5d828a6210c26ceb`

The timestamp is old, so the 5-minute check refuses it: for this test, check the HMAC alone or set the clock to `1790416873`.

### 3. Answer.

Answer `200` within 15 seconds. The buyer gets `deliveredData`, and your `note` under it when you send one.

**Node** · `deliver.mjs`

```javascript
import { verifyHidden } from "./verify.mjs";

export async function POST(req) {
  // the raw body, exactly as sent
  const raw = await req.text();
  const ok = verifyHidden(raw,
    req.headers.get("x-hidden-timestamp"),
    req.headers.get("x-hidden-signature"),
    process.env.HIDDEN_DELIVERY_SECRET);
  if (!ok) return new Response(null, { status: 401 });
  const unit = JSON.parse(raw); // one unit of the order
  const key = unit.test ? "TEST-0000" : await keyFor(unit.itemId);
  // keyFor: your code, same key per itemId
  return Response.json({ deliveredData: key });
}
```

**curl** · `test it`

```bash
# Send your server a signed test:
SECRET="$HIDDEN_DELIVERY_SECRET"
BODY='{"event":"order.paid","test":true,"orderId":"test_1","itemId":"test_item_1"}'
TS=$(date +%s)
SIG=$(printf '%s.%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
curl -X POST https://your-server.example/deliver \
  -H "Content-Type: application/json" \
  -H "X-Hidden-Timestamp: $TS" \
  -H "X-Hidden-Signature: sha256=$SIG" \
  -d "$BODY"
```

**Python** · `deliver.py`

```python
import json, os
from flask import Flask, request  # pip install flask
from verify import verify_hidden  # verify.py above

app = Flask(__name__)

@app.post("/deliver")
def deliver():
    raw = request.get_data()  # the body exactly as sent
    ts = request.headers.get("X-Hidden-Timestamp")
    sig = request.headers.get("X-Hidden-Signature")
    secret = os.environ["HIDDEN_DELIVERY_SECRET"]
    if not verify_hidden(raw, ts, sig, secret):
        return "", 401
    unit = json.loads(raw)  # one unit of the order
    key = ("TEST-0000" if unit.get("test")
           else key_for(unit["itemId"]))  # your code
    return {"deliveredData": key}
```

**PHP** · `deliver.php`

```php
<?php
require __DIR__ . "/verify.php";
$raw = file_get_contents("php://input"); // as sent
$ok = verify_hidden($raw,
    $_SERVER["HTTP_X_HIDDEN_TIMESTAMP"] ?? "",
    $_SERVER["HTTP_X_HIDDEN_SIGNATURE"] ?? "",
    (string) getenv("HIDDEN_DELIVERY_SECRET"));
if (!$ok) { http_response_code(401); exit; }
$unit = json_decode($raw, true); // one unit of the order
$key = empty($unit["test"]) ? key_for($unit["itemId"]) : "TEST-0000";
header("Content-Type: application/json");
echo json_encode(["deliveredData" => $key]);
```

Response (200):

```json
{
  "deliveredData": "Your license: HDN-4K2P-88QL-9XQ1",
  "note": "Activate it at example.com/activate"
}
```

- `{ "fields": [{ "label": "Email", "value": "…" }] }`: labelled rows instead of one text.
- `{ "status": "pending", "pollUrl": "/deliver" }`: not ready yet. Hidden sends the same signed POST to `pollUrl` until you answer with the result, or until the product's **Max wait** runs out (1 to 60 minutes, set under **Async delivery** in the editor; 30 when that is off): then it asks one last time, and the unit fails and is refunded.
- `{ "status": "failed", "error": "Out of stock" }`: it failed. Nothing is delivered for that unit, and it is refunded.
- An empty body delivers the text Delivered, and any other body is delivered as plain text, so never answer 200 with an error page.

Your own supplier account cannot pay for this order? Answer 200 with `{ "status": "failed", "code": "insufficient_balance", "error": "Balance too low" }`. The item then waits for you instead of failing: the buyer is told it is on its way, you get an alert, and **Redeliver** sends it once you have topped up.

## Time limits and retries.

- No answer in 15 seconds, a network error, a redirect (redirects are not followed), a 5xx, 408 or 429: Hidden tries again after half a second, then after one second. Three tries in all, each signed anew.
- Any other 4xx, your 401 for a bad signature too, fails the unit at once.
- The same unit can come more than once: give the same answer for the same `itemId`.
- A unit that still fails is refunded to the buyer as store balance in your store.

## Test it before you sell.

In the product editor, **Send test request** sends your address a signed sample order.

The test carries `"test": true` in the body and an `X-Hidden-Test: 1` header. No order is created and nobody is charged. The editor then shows what a real order would do with your answer. The test waits 10 seconds; a real order waits 15.

A **Test order** from the dashboard runs a real delivery: your address gets the normal request with `"test": true`, without the `X-Hidden-Test` header.

## Events and the API

- [Your store's events](https://docs.sellhidden.com/webhooks): A signed event for every order, payment and more.
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)
  - [Retries](https://docs.sellhidden.com/webhooks#webhook-retries)
- [Products API](https://docs.sellhidden.com/reference/products): Set a variation's delivery to dynamic from your code.

How selling works

6.0 KB of Markdown · Open the page

# How selling works

Source: https://docs.sellhidden.com/selling

What a buyer receives, how they pay, how subscriptions renew and how to test it all without paying.

## What the buyer receives.

Every variation has a delivery type. It runs by itself once the order is paid.

A variation can mix several types, one of each, and the buyer receives all of them. Nothing is revealed for pending, expired or cancelled orders.

| Key | Type | Description |
| --- | --- | --- |
| `file` | upload | The buyer gets a signed download link, made fresh every time the order page opens. |
| `text` | text | The text, on the order page. |
| `keys` | pool | Exactly one unused key per unit; stock counts down with the pool. An order paid while the pool is short is delivered when you add keys. |
| `link` | URL | The URL, on the order page and in the receipt email. |
| `discord` | server + role | A role granted by the Hidden bot on payment and removed when the term ends (Pro and Enterprise). It needs your connected server and the buyer's Discord user ID at checkout. |
| `dynamic` | webhook URL | Whatever your endpoint returns; see [Deliver from your own server](https://docs.sellhidden.com/dynamic-delivery). |

## How buyers sign in and pay.

Buyers never create a password.

On any storefront they sign in with their email and a 6-digit one-time code (valid 10 minutes), which unlocks an account page with their orders, subscriptions, reviews (editable for 24 hours), support tickets and a store balance. The session is a per-store cookie that lasts 30 days.

- **Crypto**, the default: the buyer pays on your store's own payment page, and the order is delivered when the payment confirms. Unpaid orders expire after 2 hours at most.
- **Store balance**: buyers top up and pay later from the balance, which needs a signed-in session. Balance orders are delivered at once.
- **Manual**: methods you set up yourself, paid outside Hidden (bank transfer, gift cards and others). The buyer submits proof and the order waits in "awaiting verification" until you mark it paid or reject it (7 days for the buyer to send proof, 7 for you to check it).
- **Card**: your own card processor account. The buyer pays by card, the money goes straight to you, and the processor's signed message marks the order paid.

Storefronts can show prices in the buyer's own currency; every charge is still made in USD.

Orders in the API carry `kind` (for example `product` or `topup`), `payment.method` (for example `crypto`, `balance`, `manual` or `free`) and, for manual methods, the claim and verification timestamps, so integrations can tell a settled order from one still awaiting the seller. Taking a payment on your own site, without a product? Use the [Payments API](https://docs.sellhidden.com/payments).

## Subscriptions and cart reminders.

A renewal is a fresh order the buyer pays with one click.

Any variation can be billed per period (weekly, monthly, every 3 months or yearly) with an optional free trial; the trial starts only for a buyer signed in to your store with that email. Crypto cannot be charged automatically, so the renewal order is created before the period ends. The buyer pays it from the renewal email or the order page, or automatically from their store balance when they turn that on. Available on every plan.

**Each period, step by step**

- **Reminder**, 3 days before the end by default (a store setting): the renewal order is created and the buyer is emailed; `subscription.expiring` carries `renewalOrderId` and `renewalUrl`.
- **Renewal**, paid in crypto or from the store balance: paying the renewal order moves the period forward from the old end (nothing is lost) and sends `subscription.renewed`. The variation decides whether delivery runs again (a new key, a fresh link) or only extends access.
- **Grace**, 1 day after the end by default (up to 3): access stays while the buyer can still renew; one "days left" email goes out at the period end.
- **Expiry**: after the grace period the subscription ends and `subscription.expired` is sent. Discord roles granted by it are removed, and the event lists every license key it delivered (`keys`) so you can disable them in your own systems.
- **Cancel**, by the buyer or the seller: cancelling keeps access until the period end (`subscription.cancelled`). The seller can also end it at once (then only `subscription.expired` is sent) or extend it by one period for free (`subscription.renewed` with `orderId` null).

**Cart reminders**

An unpaid checkout whose buyer signed in or started paying gets up to two reminder emails (1 hour and 24 hours after it started, by default), with a link back to a fresh checkout for the same cart and, if you set a percentage, a single-use coupon. One address gets at most one reminder every 6 hours, a store sends at most 100 reminders an hour, every email has a one-click unsubscribe link, and a payment stops everything. The Abandoned carts page shows what was recovered.

## Test without paying.

- **A $0 product**: test checkout, the order page and delivery without paying. It is a real order, with real keys and stock.
- **Send test event**: press it on a webhook endpoint to receive a signed `webhook.test` delivery.
- **Test order**: create one from the dashboard. It sends `order.paid` and `order.delivered` with `"test": true`, and nothing is paid.
- **Resend**: press it in an endpoint's delivery log to send an event again, with the same delivery id.

To see a real crypto payment end to end, buy a low-priced product of your own with a small crypto amount.

Moving from another platform? Import your store under **Settings** > **Import and export**, and claim 3 months of Pro free: [see how moving works](https://sellhidden.com/switch).

## Delivery and events

- [Deliver from your own server](https://docs.sellhidden.com/dynamic-delivery): Your server makes the goods for each paid order.
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, subscriptions and stock.
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)
  - [Retries](https://docs.sellhidden.com/webhooks#webhook-retries)

For AI tools

7.7 KB of Markdown · Open the page

# For AI tools

Source: https://docs.sellhidden.com/ai

Files your AI tool can read, a prompt to start with, and a rules file for your coding tool.

## Files it can read.

Every page is also Markdown: add `.md` to its address.

- Index: `https://docs.sellhidden.com/llms.txt`
- All pages: `https://docs.sellhidden.com/llms-full.txt`
- OpenAPI 3.1: `https://docs.sellhidden.com/openapi.json`
- Postman: `https://docs.sellhidden.com/postman.json`

The index has one line per page. All pages is the whole documentation in one file: [download it](https://docs.sellhidden.com/llms-full.txt?download=1) and give it to your tool.

## One prompt to start.

Paste it into your AI tool. It asks what you want to build and which language you use.

**the whole API**

`prompt`

```text
Read https://docs.sellhidden.com/llms-full.txt. It is the complete documentation of the Hidden API in one file. Help me connect my Hidden store (sellhidden.com) to my own code. Ask me first what I want to build: take crypto payments on my own site, show my products on my website, get a message when an order is paid, deliver from my own server, or manage my store from code. Ask which language I use. Then write the integration step by step. Base URL https://api.sellhidden.com/v1. Ask me for my API key before any call, keep it in an environment variable, never log it and never put it in a URL or a chat message. Send Idempotency-Key on every POST. To try a payment first, create it with "test": true. No money moves.
```

**products**

`prompt`

```text
Read https://docs.sellhidden.com/reference/products.md and https://docs.sellhidden.com/reference.md. Help me create a product with one variation and serial keys through the Hidden API, then list my products and update the stock. Base URL https://api.sellhidden.com/v1. Send Idempotency-Key on every POST. Ask me for my API key before any call, keep it in an environment variable and never log it.
```

**orders**

`prompt`

```text
Read https://docs.sellhidden.com/reference/orders.md and https://docs.sellhidden.com/reference.md. Help me list my paid orders page by page with limit and cursor, fetch one order and redeliver an order through the Hidden API. Base URL https://api.sellhidden.com/v1. Ask me for my API key before any call, keep it in an environment variable and never log it.
```

**webhooks**

`prompt`

```text
Read https://docs.sellhidden.com/webhooks.md. Build a webhook endpoint for Hidden in my stack: receive order.paid, check X-Hidden-Signature (sha256= plus the hex HMAC-SHA256 of the X-Hidden-Timestamp header, a dot and the raw body, with my signing secret, compared in constant time), reject timestamps older than 5 minutes, ignore repeated X-Hidden-Delivery ids and answer 2xx within 15 seconds. Ask me which language and framework I use.
```

**the Buy button**

`prompt`

```text
Read https://docs.sellhidden.com/buy-button.md. Add the Hidden Buy button to my website: include embed.js once, give a button data-hidden-store and data-hidden-product, show the live price, listen to the hidden:success event, and deliver the order from the order.paid webhook (https://docs.sellhidden.com/webhooks.md), not from the browser event. Ask me for my store slug and product slug.
```

## Rules for your coding tool.

Save this file as `AGENTS.md` in your project, or wherever your tool reads its rules. Your tool then knows the Hidden API on every later task.

`AGENTS.md`

```markdown
# Hidden API: rules for coding tools

- Base URL https://api.sellhidden.com/v1. Public endpoints need no key. Authenticated endpoints take `Authorization: Bearer <key>`.
- Ask the user for their API key and store slug. Never print, log or commit the key; keep it in an environment variable.
- Send `Idempotency-Key` on every POST.
- Verify every webhook: X-Hidden-Signature is `sha256=` plus the hex HMAC-SHA256 of `${X-Hidden-Timestamp}.${rawBody}` with the signing secret, compared in constant time; reject timestamps older than 5 minutes; dedupe by X-Hidden-Delivery; answer 2xx within 15 seconds.
- Payments have a test mode: create the payment with `"test": true`. Its page shows Mark as paid and Mark as expired, which send the real `payment.paid` or `payment.expired` event with `"test": true`; no money moves. Use a new `reference` for each test. Other calls change the real store.
- Create payments from your server; send the buyer to the payment's `url`, a Hidden page that cannot be shown inside a frame. Deliver only on the signed `payment.paid` event, never on `returnUrl`.
- Orders are created by buyers at checkout; the API manages them afterwards.

## Endpoints

Base URL https://api.sellhidden.com/v1
Authorization: Bearer <key>

- Products: GET /products, POST /products, GET /products/{id}, PATCH /products/{id}, DELETE /products/{id}, GET /products/{id}/variations, POST /products/{id}/variations, GET /products/{id}/variations/{variationId}, PATCH /products/{id}/variations/{variationId}, DELETE /products/{id}/variations/{variationId}, GET /products/{id}/keys, POST /products/{id}/keys, DELETE /products/{id}/keys, POST /products/{id}/stock — scope products:read / products:write
- Categories: GET /categories, POST /categories, GET /categories/{id}, PATCH /categories/{id}, DELETE /categories/{id}, POST /categories/reorder — scope categories:read / categories:write
- Coupons: GET /coupons, POST /coupons, GET /coupons/{id}, PATCH /coupons/{id}, DELETE /coupons/{id} — scope coupons:read / coupons:write
- Orders: GET /orders, GET /orders/{id}, POST /orders/{id}/approve, POST /orders/{id}/reject, POST /orders/{id}/cancel, POST /orders/{id}/redeliver, POST /orders/{id}/resend-receipt, POST /orders/{id}/refund, PUT /orders/{id}/note, DELETE /orders/{id}/note — scope orders:read / orders:write
- Payments: POST /payments, GET /payments, GET /payments/{id}, POST /payments/{id}/cancel, POST /payments/{id}/accept — scope payments:read / payments:write
- Subscriptions: GET /subscriptions, GET /subscriptions/{id}, POST /subscriptions/{id}/cancel, POST /subscriptions/{id}/extend — scope subscriptions:read / subscriptions:write
- Customers: GET /customers, GET /customers/{id}, POST /customers/{id}/balance, POST /customers/{id}/ban, DELETE /customers/{id}/ban — scope customers:read / customers:write
- Reviews: GET /reviews, GET /reviews/{id}, PATCH /reviews/{id}, PUT /reviews/{id}/reply, DELETE /reviews/{id}/reply — scope reviews:read / reviews:write
- Tickets: GET /tickets, GET /tickets/{id}, POST /tickets/{id}/messages, PATCH /tickets/{id}, POST /tickets/{id}/close — scope tickets:read / tickets:write
- Store: GET /store, PATCH /store — scope store:read / store:write
- Webhooks: GET /webhooks, POST /webhooks, GET /webhooks/{id}, PATCH /webhooks/{id}, DELETE /webhooks/{id}, POST /webhooks/{id}/rotate-secret, POST /webhooks/{id}/test, GET /webhooks/{id}/deliveries — scope webhooks:read / webhooks:write
- Analytics: GET /analytics — scope analytics:read
- Your key: GET /me — any key

## Webhooks

- Every delivery is a signed POST with X-Hidden-Event, X-Hidden-Delivery, X-Hidden-Timestamp and X-Hidden-Signature.

Docs index: https://docs.sellhidden.com/llms.txt. Everything in one file: https://docs.sellhidden.com/llms-full.txt
```

## The guide and the reference

- [Read the full guide](https://docs.sellhidden.com/payments): From a first test payment to live payments.
  - [First test payment](https://docs.sellhidden.com/payments#how-it-works)
  - [Handle payment.paid](https://docs.sellhidden.com/payments#statuses-and-webhooks)
  - [Go live](https://docs.sellhidden.com/payments#turn-on)
- [API reference](https://docs.sellhidden.com/reference): Every call, its fields and its answer.
  - [Payments](https://docs.sellhidden.com/reference/payments)
  - [Orders](https://docs.sellhidden.com/reference/orders)
  - [Products](https://docs.sellhidden.com/reference/products)

API reference

11 KB of Markdown · Open the page

# API reference

Source: https://docs.sellhidden.com/reference

The base URL and the key, the rules every call shares, and every group of calls.

## Base URL and header

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

`GET` on the base URL lists every call with its full address. No key needed.

## Send your key from your server.

Every call except the public ones needs a key. One kind of key: there are no test keys.

**Developers** > **API keys** > **Create a key**

- You create your own keys and choose what each one may do: read or write, per resource. Nobody else can make a key for your store.
- A key starts with `hsk_live_` and is shown once: Hidden keeps only a hash and its first characters.
- Up to 10 active keys per store. A key can expire (after 30 days, 90 days or 1 year) and can be limited to a list of IP addresses.
- A key acts as the store member who made it. If that member leaves the team, every call answers `401 unauthorized`.

**Node** · `orders.mjs`

```javascript
const key = process.env.HIDDEN_API_KEY;

const res = await fetch("https://api.sellhidden.com/v1/orders?status=paid&limit=25", {
  headers: {
    Authorization: `Bearer ${key}`,
  },
});
const data = await res.json();
```

**curl** · `shell`

```bash
curl \
  "https://api.sellhidden.com/v1/orders?status=paid&limit=25" \
  -H "Authorization: Bearer hsk_live_…"
```

**Python** · `orders.py`

```python
import os
import requests

key = os.environ["HIDDEN_API_KEY"]
res = requests.get(
    "https://api.sellhidden.com/v1/orders?status=paid&limit=25",
    headers={
        "Authorization": f"Bearer {key}",
    },
)
data = res.json()
```

**PHP** · `orders.php`

```php
<?php
$key = getenv('HIDDEN_API_KEY');
$ch = curl_init('https://api.sellhidden.com/v1/orders?status=paid&limit=25');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . $key,
  ],
]);
$data = json_decode(curl_exec($ch), true);
```

`GET /me` shows what a key may do: [Your key](https://docs.sellhidden.com/reference/keys).

## Keys and scopes.

One `read` and one `write` scope per resource. Write includes read.

- `products:read`, `products:write`: Products, variations, keys and stock.
- `categories:read`, `categories:write`: Categories and their order.
- `coupons:read`, `coupons:write`: Discount codes.
- `orders:read`, `orders:write`: Orders, manual payments, refunds, redelivery.
- `payments:read`, `payments:write`: Payments for your own site: create, read, cancel, accept.
- `subscriptions:read`, `subscriptions:write`: Recurring buyers: list, cancel, extend.
- `customers:read`, `customers:write`: Buyers, store balance, bans.
- `reviews:read`, `reviews:write`: Replies and visibility.
- `tickets:read`, `tickets:write`: Support threads.
- `store:read`, `store:write`: Store settings and identity.
- `webhooks:read`, `webhooks:write`: Webhook endpoints, secrets and test events.
- `analytics:read`: Revenue and order statistics.

All 23 scopes together show as `*` (full access). Each call names the scope it needs; `GET /me` needs only a valid key. Changes made through the API go to your store's audit log, with the key that made them.

## Responses and errors.

Every answer is JSON with `ok`. A failure carries one `error` with a stable `code` to branch on.

`200 OK`

```json
{
  "ok": true,
  "products": [ … ],
  "nextCursor": "Y2xxazF…",
  "hasMore": true
}
```

`400 Bad Request`

```json
{
  "ok": false,
  "error": {
    "code": "validation_error",
    "message": "Give the product a title",
    "field": "title"
  }
}
```

| Status | Code | When | Do |
| --- | --- | --- | --- |
| 400 | `bad_request, validation_error, pool_full` | A parameter or a body field is wrong (`field` names it), or a key pool is full. | Fix the request. |
| 401 | `unauthorized, key_revoked, key_expired` | The key is missing, wrong, revoked or expired. | Use a valid key. |
| 403 | `insufficient_scope, ip_not_allowed, store_suspended, plan_limit, plan` | The key may not do this, or the plan does not allow it. | Check the key's scopes and IP list, or the plan. |
| 404 | `not_found` | Unknown store, product, order, customer, ticket or webhook. | Check the id. |
| 409 | `invoice_open, partial_payment, stock_from_keys, …` | A rule refused the change; the code says which. | Read the code and the message. |
| 422 | `idempotency_conflict` | The Idempotency-Key was used with another body. | Send a new Idempotency-Key. |
| 429 | `rate_limited` | Too many requests. | Wait `Retry-After` seconds if sent, then retry with a new Idempotency-Key. |
| 5xx | `upstream_failed, mail_failed, try_again, …` | A step on Hidden's side failed. | Wait a moment, then retry with the same Idempotency-Key. |

- Success is `{ "ok": true, ... }` with the data next to `ok`: there is no `data` wrapper. A create answers `201`.
- Money is US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times are ISO 8601 in UTC.
- Ids are opaque strings: do not parse them.

## Rate limits.

Limits per key and per IP address.

- Calls with a key: 120 requests a minute per key. Payment creates also: 60 live and 20 test a minute per store.
- Public calls: 120 requests a minute per IP address, shared by the five of them. They are cached 60 seconds at the edge, so prices and stock can lag a little.
- Most answers carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix seconds).
- Most `429`s carry `Retry-After` in seconds: wait that long. Do not count calls yourself.

## Pagination.

Lists are newest first, one page at a time, forward only.

`paging`

```bash
# The first page
GET https://api.sellhidden.com/v1/orders?limit=50

# The next page: the cursor of the page before
GET https://api.sellhidden.com/v1/orders?limit=50&cursor=Y2xxazF…

# Stop when "hasMore" is false
```

- Send `limit` and, for the next page, the `nextCursor` of the page before as `cursor`. Stop when `hasMore` is false.
- Cursors are opaque: do not build them yourself. A `limit` out of range is clamped, not refused.
- Pages hold 25 by default (orders, payments, subscriptions, tickets, webhook deliveries) or 50 (products, customers, coupons, reviews, public products). Most lists go up to 100.

## Idempotency.

Send an `Idempotency-Key` with a call that takes one, and a retry never does the work twice.

**Node** · `category.mjs`

```javascript
const key = process.env.HIDDEN_API_KEY;

const res = await fetch("https://api.sellhidden.com/v1/categories", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${key}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "name": "Software"
  }),
});
const data = await res.json();
```

**curl** · `shell`

```bash
curl -X POST "https://api.sellhidden.com/v1/categories" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name":"Software"}'
```

**Python** · `category.py`

```python
import os
import requests
import uuid

key = os.environ["HIDDEN_API_KEY"]
res = requests.post(
    "https://api.sellhidden.com/v1/categories",
    headers={
        "Authorization": f"Bearer {key}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "name": "Software",
    },
)
data = res.json()
```

**PHP** · `category.php`

```php
<?php
$key = getenv('HIDDEN_API_KEY');
$ch = curl_init('https://api.sellhidden.com/v1/categories');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . $key,
    'Content-Type: application/json',
    'Idempotency-Key: ' . bin2hex(random_bytes(16)),
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Software',
  ]),
]);
$data = json_decode(curl_exec($ch), true);
```

- Any unique string up to 255 characters of letters, digits and `- _ : .`: a UUID is fine.
- For 24 hours, the same Idempotency-Key with the same body gets the first answer again, marked `Idempotent-Replayed: true`. Each API key has its own Idempotency-Keys.
- The same Idempotency-Key with another body: `422 idempotency_conflict`. Still running: `409 idempotency_in_progress`.
- Most 4xx answers are stored too: after you fix a request, send a new Idempotency-Key. A 5xx is never stored, so the same one works again.

## OpenAPI and Postman.

The whole API as files: every path, field and scope.

- OpenAPI 3.1: `https://api.sellhidden.com/v1/openapi.json`
- Postman: `https://docs.sellhidden.com/postman.json`

- `x-scope` names the scope of each call; `x-idempotency-key` marks the calls that take an `Idempotency-Key`.
- Give it to a generator for a typed client, or import it into your API tool. There is no SDK: plain HTTPS from any language.

`openapi`

```bash
# The OpenAPI 3.1 document, no key
curl https://api.sellhidden.com/v1/openapi.json

# A typed client, for example in TypeScript
npx openapi-typescript https://api.sellhidden.com/v1/openapi.json -o hidden-api.d.ts
```

## Every group.

One page per group: each call with its request in four languages, its fields and its answer.

- [Public](https://docs.sellhidden.com/reference/public): One store's catalogue for any site. 5 calls.
- [Products](https://docs.sellhidden.com/reference/products): Products, variations, keys and stock. 14 calls.
- [Categories](https://docs.sellhidden.com/reference/categories): Categories and their order. 6 calls.
- [Coupons](https://docs.sellhidden.com/reference/coupons): Discount codes. 5 calls.
- [Orders](https://docs.sellhidden.com/reference/orders): Your store's orders and what you can do with them. 10 calls.
- [Payments](https://docs.sellhidden.com/reference/payments): Crypto payments for your own site. 5 calls.
- [Subscriptions](https://docs.sellhidden.com/reference/subscriptions): Buyers who pay every week, month, quarter or year. 4 calls.
- [Customers](https://docs.sellhidden.com/reference/customers): Your buyers, their store balance and bans. 5 calls.
- [Reviews](https://docs.sellhidden.com/reference/reviews): Buyer reviews, your replies and what is shown. 5 calls.
- [Tickets](https://docs.sellhidden.com/reference/tickets): Support threads buyers open from their order or account. 5 calls.
- [Store](https://docs.sellhidden.com/reference/store): Your store as its seller sees it, and the basic settings. 2 calls.
- [Webhooks](https://docs.sellhidden.com/reference/webhooks): The endpoints that receive your store's signed events. 8 calls.
- [Analytics](https://docs.sellhidden.com/reference/analytics): Revenue and order statistics. 1 call.
- [Your key](https://docs.sellhidden.com/reference/keys): What this key is and may do. 1 call.

Public

8.8 KB of Markdown · Open the page

# Public

Source: https://docs.sellhidden.com/reference/public

One store's catalogue for any site.

## Base URL and the five calls

- Base URL: `https://api.sellhidden.com/v1`

- [GET /public/products/{storeSlug}](https://docs.sellhidden.com/reference/public#public-products): Products of a store
- [GET /public/products/{storeSlug}/{slug}](https://docs.sellhidden.com/reference/public#public-product): One product
- [GET /public/categories/{storeSlug}](https://docs.sellhidden.com/reference/public#public-categories): Categories of a store
- [GET /public/reviews/{storeSlug}](https://docs.sellhidden.com/reference/public#public-reviews): Visible reviews
- [GET /public/recent-sales/{storeSlug}](https://docs.sellhidden.com/reference/public#public-recent-sales): Recent sales

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

No key, safe to call from a browser: products, categories, visible reviews and recent sales of any live store.

- **No key.** Safe to call from a browser: every answer allows any origin.
- **Cache.** Cached 60 seconds at the edge, so prices and stock can lag a little.
- **Rate limit.** 120 requests a minute per IP address, shared by the five calls.
- **Live stores only.** A suspended or Private store answers `404`. Buyer emails in reviews are masked; order ids are never shown.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## Products of a store.

### GET /public/products/{storeSlug}

Active products in storefront order. `displayPriceUsd` is the lowest variation price (or the base price when there are no variations). For serial-key products `stock` is the number of unused keys. When the seller hides sold-out products on the storefront, they are omitted here too. No key needed.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `storeSlug` (required) | string | The store's slug, as in its address. |

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `categorySlug` | string | Only products in this category. |
| `limit` | 1..100 | Page size. Default 50. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl \
  "https://api.sellhidden.com/v1/public/products/my-store"
```

Response (200):

```json
{
  "ok": true,
  "store": {
    "slug": "my-store",
    "name": "My Store"
  },
  "products": [
    {
      "slug": "lifetime-license",
      "name": "Lifetime license",
      "displayPriceUsd": 29,
      "inStock": true,
      …
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

## One product.

### GET /public/products/{storeSlug}/{slug}

One product with its variations, category, stock and rating. This is the call the live-price embed makes. No key needed.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `storeSlug` (required) | string | The store's slug, as in its address. |
| `slug` (required) | string | The product's slug. |

```bash
curl \
  "https://api.sellhidden.com/v1/public/products/my-store/lifetime-license"
```

Response (200):

```json
{
  "ok": true,
  "store": {
    "slug": "my-store",
    "name": "My Store"
  },
  "product": {
    "id": "clx…",
    "slug": "lifetime-license",
    "name": "Lifetime license",
    "description": "…",
    "priceUsd": 49,
    "displayPriceUsd": 29,
    "compareAtUsd": null,
    "currency": "USD",
    "coverImage": "https://…/cover.png",
    "galleryImages": [],
    "deliveryType": "keys",
    "deliveryTypes": [ "keys" ],
    "inStock": true,
    "stock": 120,
    "variations": [
      {
        "id": "clx…",
        "label": "1 device",
        "priceUsd": 29,
        "compareAtUsd": null,
        "inStock": true,
        "stock": 80,
        "description": null,
        "deliveryTypes": [ "keys" ]
      },
      {
        "id": "clx…",
        "label": "5 devices",
        "priceUsd": 49,
        "compareAtUsd": 69,
        "inStock": true,
        "stock": 40,
        "description": "Team pack",
        "deliveryTypes": [ "keys" ]
      }
    ],
    "category": {
      "id": "clx…",
      "name": "Software",
      "slug": "software"
    },
    "salesCount": 312,
    "reviewCount": 41,
    "averageRating": 4.8,
    "url": "https://my-store.sellhidden.com/p/lifetime-license",
    "createdAt": "2026-06-01T10:00:00.000Z",
    "updatedAt": "2026-09-20T08:12:44.000Z"
  }
}
```

## Categories of a store.

### GET /public/categories/{storeSlug}

Categories in display order with the number of active products in each. Use `slug` as `categorySlug` on the products endpoint. No key needed.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `storeSlug` (required) | string | The store's slug, as in its address. |

```bash
curl \
  "https://api.sellhidden.com/v1/public/categories/my-store"
```

Response (200):

```json
{
  "ok": true,
  "store": {
    "slug": "my-store",
    "name": "My Store"
  },
  "categories": [
    {
      "id": "clx…",
      "name": "Software",
      "slug": "software",
      "position": 0,
      "productCount": 12,
      "createdAt": "2026-05-02T09:00:00.000Z"
    }
  ]
}
```

## Visible reviews.

### GET /public/reviews/{storeSlug}

Visible reviews with a store-wide summary. `distribution` counts one to five stars in order. Every review is tied to a paid order; sellers can hide reviews but never edit or delete them. `source` is `buyer`, or `auto` for an automatic rating recorded when the buyer wrote nothing for seven days (never `verified`, and replaced as soon as the buyer writes their own). `editedAt` is set when the buyer changed their review. `sellerReply` is the store's public reply (null if none), with `sellerRepliedAt`. No key needed.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `storeSlug` (required) | string | The store's slug, as in its address. |

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `productSlug` | string | Only reviews of this product. |
| `rating` | 1..5 | Only this star rating. |
| `limit` | 1..100 | Page size. Default 20. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/public/reviews/my-store"
```

Response (200):

```json
{
  "ok": true,
  "store": {
    "slug": "my-store",
    "name": "My Store"
  },
  "summary": {
    "count": 41,
    "average": 4.8,
    "distribution": [ 0, 1, 1, 5, 34 ]
  },
  "reviews": [
    {
      "id": "clx…",
      "productId": "clx…",
      "productSlug": "lifetime-license",
      "productName": "Lifetime license",
      "orderId": null,
      "buyerEmail": "jo***",
      "rating": 5,
      "comment": "Delivered in seconds.",
      "verified": true,
      "visible": true,
      "source": "buyer",
      "editedAt": null,
      "sellerReply":
        "Thanks for the kind words!",
      "sellerRepliedAt":
        "2026-09-19T16:20:00.000Z",
      "createdAt": "2026-09-19T15:04:00.000Z",
      "updatedAt": "2026-09-19T16:20:00.000Z"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

## Recent sales.

### GET /public/recent-sales/{storeSlug}

The latest paid items, to show buyers that others buy here. Times are rounded to the hour. No buyer name or email is included; `country` is the buyer's two-letter country code, or null. Returns an empty list when the seller turned the recent-sales widget off. No key needed.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `storeSlug` (required) | string | The store's slug, as in its address. |

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `limit` | 1..25 | Page size. Default 10. |

```bash
curl \
  "https://api.sellhidden.com/v1/public/recent-sales/my-store"
```

Response (200):

```json
{
  "ok": true,
  "store": {
    "slug": "my-store",
    "name": "My Store"
  },
  "sales": [
    {
      "product": {
        "slug": "lifetime-license",
        "name": "Lifetime license",
        "coverImage": null
      },
      "variationLabel": "1 device",
      "quantity": 1,
      "country": null,
      "at": "2026-09-26T10:00:00.000Z"
    }
  ]
}
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Sell with a Buy button](https://docs.sellhidden.com/buy-button): Two lines on any page, with the live price.
  - [Live price](https://docs.sellhidden.com/buy-button#embed-price)
  - [Checkout links](https://docs.sellhidden.com/buy-button#checkout-links)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Products

17 KB of Markdown · Open the page

# Products

Source: https://docs.sellhidden.com/reference/products

Products, variations, keys and stock.

## Base URL, key and the 14 calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /products](https://docs.sellhidden.com/reference/products#products-products-list): List products
- [POST /products](https://docs.sellhidden.com/reference/products#products-products-create): Create a product
- [GET /products/{id}](https://docs.sellhidden.com/reference/products#products-products-get): Get a product
- [PATCH /products/{id}](https://docs.sellhidden.com/reference/products#products-products-update): Update a product
- [DELETE /products/{id}](https://docs.sellhidden.com/reference/products#products-products-delete): Delete a product
- [GET /products/{id}/variations](https://docs.sellhidden.com/reference/products#products-variations-list): List variations
- [POST /products/{id}/variations](https://docs.sellhidden.com/reference/products#products-variations-create): Add a variation
- [GET /products/{id}/variations/{variationId}](https://docs.sellhidden.com/reference/products#products-variations-get): Get a variation
- [PATCH /products/{id}/variations/{variationId}](https://docs.sellhidden.com/reference/products#products-variations-update): Update a variation
- [DELETE /products/{id}/variations/{variationId}](https://docs.sellhidden.com/reference/products#products-variations-delete): Remove a variation
- [GET /products/{id}/keys](https://docs.sellhidden.com/reference/products#products-keys-list): Pool counts and unused keys
- [POST /products/{id}/keys](https://docs.sellhidden.com/reference/products#products-keys-add): Add keys in bulk
- [DELETE /products/{id}/keys](https://docs.sellhidden.com/reference/products#products-keys-remove): Remove unused keys
- [POST /products/{id}/stock](https://docs.sellhidden.com/reference/products#products-stock-set): Set or adjust stock

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Your catalogue as the seller sees it: hidden products included, every variation with its deliverables, key pools and order counts. Writes follow the dashboard rules: plan limits, unique slugs, deliverable checks, the 2,000,000-key cap per variation and an audit log entry.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `products:write` changes. `products:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List products.

### GET /products

Scope `products:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `active` | true \| false | Only live or only hidden products. |
| `categoryId` | string | Only this category. |
| `q` | string | Title or slug contains this text. |
| `deliveryType` | string | Primary delivery type (file, text, keys, link, discord, dynamic). |
| `limit` | 1..100 | Page size. Default 50. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/products" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "products": [
    {
      "id": "clx…",
      "slug": "lifetime-license",
      "name": "Lifetime license",
      "active": true,
      "displayPriceUsd": 29,
      "stock": 120,
      "variations": [ … ],
      …
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

## Create a product.

### POST /products

A product has at least one variation. Send `variants` (recommended), or the short form `priceUsd` + `deliveryType` + `deliveryData` (+ `keys` for a key product) for a single-price product. Scope `products:write`. Accepts `Idempotency-Key`. Returns 201.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `title` (required) | string | Up to 120 characters. |
| `slug` | string | URL slug; derived from the title when omitted and made unique. |
| `description` | string | Markdown or plain text, up to 20,000 characters. |
| `imageUrl` | string \| null | https URL or an uploaded /media URL. |
| `galleryUrls` | string[] | Up to 8 more images after the cover, in display order: https or uploaded /media URLs. |
| `categoryId` | string \| null | One of your categories. |
| `variants` | array | Variations (see Variations below). At least one. |
| `active` | boolean | Live on the storefront. Default true. Counts against the plan's product limit. |
| `sortOrder` | integer | Lower first. Left out: placed after your other products. |
| `seoTitle` | string \| null | Up to 70 characters. |
| `seoDescription` | string \| null | Up to 200 characters. |

```bash
curl -X POST "https://api.sellhidden.com/v1/products" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "title": "Lifetime license",
    "description": "One key, forever.",
    "variants": [
      {
        "label": "1 device",
        "priceUsd": 29,
        "deliverables": [
          {
            "type": "keys",
            "keys": [
              "AAAA-1111",
              "BBBB-2222"
            ]
          }
        ]
      }
    ]
  }'
```

Response (201):

```json
{
  "ok": true,
  "product": {
    "id": "clx…",
    "slug": "lifetime-license",
    "active": true,
    "variations": [
      {
        "id": "clx…",
        "label": "1 device",
        "priceUsd": 29,
        "stock": 2,
        "unusedKeys": 2,
        "deliverables": [
          {
            "type": "keys",
            "data": "",
            "keyOrder": "fifo"
          }
        ]
      }
    ],
    …
  }
}
```

## Get a product.

### GET /products/{id}

Scope `products:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

```bash
curl "https://api.sellhidden.com/v1/products/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Update a product.

### PATCH /products/{id}

Only the fields you send change. `variants` replaces the whole variation list (variations left out are removed); to change one variation use the Variations endpoints instead. Scope `products:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `title` | string | Up to 120 characters. |
| `slug` | string | URL slug, made unique. A new title does not change it. |
| `description` | string | Markdown or plain text, up to 20,000 characters. |
| `imageUrl` | string \| null | https URL or an uploaded /media URL. |
| `galleryUrls` | string[] | Up to 8 more images after the cover. Replaces the list. |
| `categoryId` | string \| null | One of your categories. |
| `active` | boolean | Activating respects the plan limit; a product removed by the platform stays off. |
| `sortOrder` | integer | Lower first. |
| `seoTitle` | string \| null | Up to 70 characters. |
| `seoDescription` | string \| null | Up to 200 characters. |
| `variants` | array | Full list of variations (with `id` for existing ones). |

```bash
curl -X PATCH "https://api.sellhidden.com/v1/products/ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"active":false}'
```

## Delete a product.

### DELETE /products/{id}

Deleted when it was never ordered; archived (hidden, kept for order history) otherwise. `result` says which. Scope `products:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

```bash
curl -X DELETE "https://api.sellhidden.com/v1/products/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "id": "clx…",
  "result": "deleted"
}
```

## List variations.

### GET /products/{id}/variations

Scope `products:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

```bash
curl \
  "https://api.sellhidden.com/v1/products/ID/variations" \
  -H "Authorization: Bearer hsk_live_…"
```

## Add a variation.

### POST /products/{id}/variations

Scope `products:write`. Accepts `Idempotency-Key`. Returns 201.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `label` (required) | string | Shown to buyers. Required when the product has more than one variation. |
| `priceUsd` (required) | number | Price in USD. |
| `compareAtUsd` | number \| null | Old price shown struck through. |
| `stock` | integer \| null | Units left; null = unlimited. Ignored for variations that deliver keys (the pool is the stock). |
| `description` | string | Short line under the label. |
| `active` | boolean | Hidden variations cannot be bought. Default true. |
| `minPerOrder` | 1..100000 | Fewest units per order. Default 1. |
| `maxPerOrder` | 1..100000 \| null | Most units per order; null = no limit. |
| `billingInterval` | week \| month \| quarter \| year \| null | A subscription billed per period; null (default) = one-time purchase. |
| `trialDays` | 0..365 | Subscription: free trial days before the first payment. Default 0. |
| `renewalDelivers` | boolean | Subscription: deliver again on every renewal (default true); false only extends access. |
| `deliverables` | array | What the buyer receives: [{ type: file \| text \| keys \| link \| discord \| dynamic, data, keyOrder?: fifo \| lifo \| random, keys?: string[] }]. Each type at most once. Omitted on an existing variation = unchanged. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/products/ID/variations" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "label": "5 devices",
    "priceUsd": 49,
    "compareAtUsd": 69,
    "maxPerOrder": 3,
    "deliverables": [
      {
        "type": "keys"
      }
    ]
  }'
```

## Get a variation.

### GET /products/{id}/variations/{variationId}

Scope `products:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |
| `variationId` (required) | string | The variation's id. |

```bash
curl \
  "https://api.sellhidden.com/v1/products/ID/variations/VARIATION_ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Update a variation.

### PATCH /products/{id}/variations/{variationId}

Only the fields you send change. Sending `deliverables` replaces that variation's deliverables. `billingInterval`, `trialDays` and `renewalDelivers` are ignored here: set them when you add the variation, or with `variants` on PATCH /products/{id}. Scope `products:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |
| `variationId` (required) | string | The variation's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `label` | string | Shown to buyers. Required when the product has more than one variation. |
| `priceUsd` | number | Price in USD. |
| `compareAtUsd` | number \| null | Old price shown struck through. |
| `stock` | integer \| null | Units left; null = unlimited. Ignored for variations that deliver keys (the pool is the stock). |
| `description` | string | Short line under the label. |
| `active` | boolean | Hidden variations cannot be bought. Default true. |
| `minPerOrder` | 1..100000 | Fewest units per order. Default 1. |
| `maxPerOrder` | 1..100000 \| null | Most units per order; null = no limit. |
| `deliverables` | array | What the buyer receives: [{ type: file \| text \| keys \| link \| discord \| dynamic, data, keyOrder?: fifo \| lifo \| random, keys?: string[] }]. Each type at most once. Omitted on an existing variation = unchanged. |

```bash
curl -X PATCH \
  "https://api.sellhidden.com/v1/products/ID/variations/VARIATION_ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"priceUsd":39,"minPerOrder":1,"maxPerOrder":5}'
```

## Remove a variation.

### DELETE /products/{id}/variations/{variationId}

A product keeps at least one variation (409 otherwise). A variation that was ordered is archived so its orders still deliver. Scope `products:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |
| `variationId` (required) | string | The variation's id. |

```bash
curl -X DELETE \
  "https://api.sellhidden.com/v1/products/ID/variations/VARIATION_ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Pool counts and unused keys.

### GET /products/{id}/keys

`pool` holds the counts (unused, used, shared pool, per variation); `keys` is one page of unused keys of one pool, oldest first. Scope `products:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `variationId` | string | Which pool. Default: the product's only variation, else the product-wide shared pool. |
| `q` | string | Key value contains this text. |
| `limit` | 1..1000 | Page size. Default 100. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/products/ID/keys" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "pool": {
    "unused": 1200,
    "used": 310,
    "shared": 0,
    "variations": { "clx…": 1200 }
  },
  "variationId": "clx…",
  "keys": [
    {
      "id": "k…",
      "value": "AAAA-1111",
      "createdAt": "…"
    }
  ],
  "nextCursor": "…",
  "hasMore": true
}
```

## Add keys in bulk.

### POST /products/{id}/keys

Up to 50,000 keys per request (send big lists in batches); a pool holds up to 2,000,000 unused keys (400 pool_full past that). Keys already in the product's pools and repeats in the list are skipped. Orders that were waiting for keys are delivered, oldest first. Scope `products:write`. Accepts `Idempotency-Key`. Returns 201.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `keys` (required) | string[] | 1 to 50,000 keys, up to 50,000 characters each. |
| `variationId` | string | Which pool. Default: the product's only variation, else the shared pool. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/products/ID/keys" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"keys":["AAAA-1111","BBBB-2222"]}'
```

Response (201):

```json
{
  "ok": true,
  "added": 2,
  "skipped": 0,
  "skippedExisting": 0,
  "skippedRepeated": 0,
  "inOtherProducts": 0,
  "redelivered": 0,
  "stillWaiting": 0,
  "message": null,
  "pool": {
    "unused": 1202,
    "used": 310,
    "shared": 0,
    "variations": { "clx…": 1202 }
  }
}
```

## Remove unused keys.

### DELETE /products/{id}/keys

Removes up to 500 unused keys by id or by value. Keys already handed to a buyer are never removed. Scope `products:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `ids` | string[] | Key ids from the list endpoint. |
| `values` | string[] | Key values. |

```bash
curl -X DELETE \
  "https://api.sellhidden.com/v1/products/ID/keys" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"values":["AAAA-1111"]}'
```

Response (200):

```json
{ "ok": true, "removed": 1, "pool": { … } }
```

## Set or adjust stock.

### POST /products/{id}/stock

Sets (`stock`) or shifts (`adjust`, can be negative) the stock of one variation. Variations that deliver keys answer 409 stock_from_keys: add or remove keys instead. `adjust` on unlimited stock answers 409 stock_unlimited: send `stock` first. Scope `products:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The product's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `variationId` | string | Default: the product's only variation. |
| `stock` | integer \| null | Absolute units; null = unlimited. |
| `adjust` | integer | Relative change, e.g. -3. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/products/ID/stock" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"adjust":10}'
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Categories

5.1 KB of Markdown · Open the page

# Categories

Source: https://docs.sellhidden.com/reference/categories

Categories and their order.

## Base URL, key and the six calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /categories](https://docs.sellhidden.com/reference/categories#categories-categories-list): List categories
- [POST /categories](https://docs.sellhidden.com/reference/categories#categories-categories-create): Create a category
- [GET /categories/{id}](https://docs.sellhidden.com/reference/categories#categories-categories-get): Get a category
- [PATCH /categories/{id}](https://docs.sellhidden.com/reference/categories#categories-categories-update): Update a category
- [DELETE /categories/{id}](https://docs.sellhidden.com/reference/categories#categories-categories-delete): Delete a category
- [POST /categories/reorder](https://docs.sellhidden.com/reference/categories#categories-categories-reorder): Reorder categories

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Up to 100 categories per store. Deleting one leaves its products uncategorised.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `categories:write` changes. `categories:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List categories.

### GET /categories

Scope `categories:read`.

```bash
curl "https://api.sellhidden.com/v1/categories" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "categories": [
    {
      "id": "clx…",
      "name": "Software",
      "slug": "software",
      "position": 0,
      "productCount": 12,
      "activeProductCount": 11,
      "createdAt": "…"
    }
  ]
}
```

## Create a category.

### POST /categories

Scope `categories:write`. Accepts `Idempotency-Key`. Returns 201.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `name` (required) | string | Unique in the store, up to 60 characters. |
| `slug` | string | Derived from the name when omitted. |

```bash
curl -X POST "https://api.sellhidden.com/v1/categories" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name":"Software"}'
```

## Get a category.

### GET /categories/{id}

Scope `categories:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The category's id. |

```bash
curl "https://api.sellhidden.com/v1/categories/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Update a category.

### PATCH /categories/{id}

Scope `categories:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The category's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `name` | string | Unique in the store, up to 60 characters. |
| `slug` | string | URL slug, made unique. A new name does not change it. |
| `position` | integer | Display position, 0 first. |

```bash
curl -X PATCH \
  "https://api.sellhidden.com/v1/categories/ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Licenses"}'
```

## Delete a category.

### DELETE /categories/{id}

Scope `categories:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The category's id. |

```bash
curl -X DELETE \
  "https://api.sellhidden.com/v1/categories/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "id": "clx…",
  "uncategorisedProducts": 3
}
```

## Reorder categories.

### POST /categories/reorder

Scope `categories:write`. Accepts `Idempotency-Key`.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `order` (required) | string[] | Category ids in display order. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/categories/reorder" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"order":["clx1","clx2"]}'
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Coupons

6.3 KB of Markdown · Open the page

# Coupons

Source: https://docs.sellhidden.com/reference/coupons

Discount codes.

## Base URL, key and the five calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /coupons](https://docs.sellhidden.com/reference/coupons#coupons-coupons-list): List coupons
- [POST /coupons](https://docs.sellhidden.com/reference/coupons#coupons-coupons-create): Create a coupon
- [GET /coupons/{id}](https://docs.sellhidden.com/reference/coupons#coupons-coupons-get): Get a coupon
- [PATCH /coupons/{id}](https://docs.sellhidden.com/reference/coupons#coupons-coupons-update): Update a coupon
- [DELETE /coupons/{id}](https://docs.sellhidden.com/reference/coupons#coupons-coupons-delete): Delete a coupon

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

The code and the discount are fixed once created (orders keep what they used); every other rule can change.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `coupons:write` changes. `coupons:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List coupons.

### GET /coupons

Scope `coupons:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `active` | true \| false | Only usable codes (active and not expired), or only unusable ones. |
| `code` | string | Code contains this text. |
| `limit` | 1..200 | Page size. Default 50. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/coupons" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "coupons": [
    {
      "id": "clx…",
      "code": "LAUNCH20",
      "type": "percent",
      "value": 20,
      "minOrderUsd": null,
      "maxUses": 100,
      "usedCount": 12,
      "active": true,
      "expiresAt": null,
      "createdAt": "…"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

## Create a coupon.

### POST /coupons

Scope `coupons:write`. Accepts `Idempotency-Key`. Returns 201.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `code` (required) | string | 2-40 characters: letters, digits, - and _. Stored upper-case. |
| `percentOff` | 1..100 | Either this or amountOffUsd. |
| `amountOffUsd` | number | Fixed discount in USD. |
| `maxUses` | integer \| null | Total uses; null = unlimited. |
| `perCustomerLimit` | 1..1000 \| null | Uses per buyer email. |
| `firstOrderOnly` | boolean | Only buyers who never paid here. |
| `minOrderUsd` | number \| null | Smallest cart subtotal (before the discount). |
| `maxDiscountUsd` | number \| null | Cap on the discount. |
| `startsAt` | ISO date \| null | Not valid before. |
| `expiresAt` | ISO date \| null | Not valid after. |
| `productIds` | string[] | Only these products (empty = all). |
| `categoryIds` | string[] | Only these categories. |
| `variantIds` | string[] | Only these variations. |
| `paymentMethods` | string[] | "crypto", "balance" or a manual payment method id. |
| `active` | boolean | Default true. |

```bash
curl -X POST "https://api.sellhidden.com/v1/coupons" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "code": "LAUNCH20",
    "percentOff": 20,
    "maxUses": 100,
    "expiresAt": "2026-12-31T23:59:59Z"
  }'
```

## Get a coupon.

### GET /coupons/{id}

Scope `coupons:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The coupon's id. |

```bash
curl "https://api.sellhidden.com/v1/coupons/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Update a coupon.

### PATCH /coupons/{id}

Any rule except code, percentOff and amountOffUsd. null clears a limit or a date; null or [] clears a list. Scope `coupons:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The coupon's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `active` | boolean | Turns the code on or off. |
| `maxUses` | integer \| null | Not below the uses so far. |
| `perCustomerLimit` | 1..1000 \| null | Uses per buyer email. |
| `firstOrderOnly` | boolean | Only buyers who never paid here. |
| `minOrderUsd` | number \| null | Smallest cart subtotal (before the discount). |
| `maxDiscountUsd` | number \| null | Cap on the discount. |
| `startsAt` | ISO date \| null | Not valid before. |
| `expiresAt` | ISO date \| null | Not valid after. |
| `productIds` | string[] \| null | Only these products (empty = all). |
| `categoryIds` | string[] \| null | Only these categories. |
| `variantIds` | string[] \| null | Only these variations. |
| `paymentMethods` | string[] \| null | "crypto", "balance" or a manual payment method id. |

```bash
curl -X PATCH "https://api.sellhidden.com/v1/coupons/ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"active":false}'
```

## Delete a coupon.

### DELETE /coupons/{id}

Scope `coupons:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The coupon's id. |

```bash
curl -X DELETE "https://api.sellhidden.com/v1/coupons/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Orders

12 KB of Markdown · Open the page

# Orders

Source: https://docs.sellhidden.com/reference/orders

Your store's orders and what you can do with them.

## Base URL, key and the ten calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /orders](https://docs.sellhidden.com/reference/orders#orders-orders-list): List orders
- [GET /orders/{id}](https://docs.sellhidden.com/reference/orders#orders-orders-get): Get an order
- [POST /orders/{id}/approve](https://docs.sellhidden.com/reference/orders#orders-orders-approve): Approve a manual payment
- [POST /orders/{id}/reject](https://docs.sellhidden.com/reference/orders#orders-orders-reject): Reject a manual payment
- [POST /orders/{id}/cancel](https://docs.sellhidden.com/reference/orders#orders-orders-cancel): Cancel an order
- [POST /orders/{id}/redeliver](https://docs.sellhidden.com/reference/orders#orders-orders-redeliver): Run delivery again
- [POST /orders/{id}/resend-receipt](https://docs.sellhidden.com/reference/orders#orders-orders-resend-receipt): Resend the receipt
- [POST /orders/{id}/refund](https://docs.sellhidden.com/reference/orders#orders-orders-refund): Refund to store balance
- [PUT /orders/{id}/note](https://docs.sellhidden.com/reference/orders#orders-orders-note): Write the private note
- [DELETE /orders/{id}/note](https://docs.sellhidden.com/reference/orders#orders-orders-note-delete): Remove the private note

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Orders are created by buyers at checkout. The API reads them and runs the same actions as the dashboard: approve or reject a manual payment, cancel, redeliver, resend the receipt, refund to store balance, keep a private note. Every order has a short reference in `publicRef` (for example `4MPT-8WQA`, or `NOVA-4MPT-8WQA` when the store has an order ID prefix): it is what buyers see on their order page and receipts, and it works wherever `{id}` appears in an order path, next to the long `id`. API payments have their own endpoints (Payments): the list leaves them out unless you ask for `kind=payment`, and every action here except the private note answers 409 `use_payments_api` for them.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `orders:write` changes. `orders:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List orders.

### GET /orders

Scope `orders:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `status` | string | pending, awaiting_verification, paid, delivered, cancelled, underpaid, oversold, expired, failed, refunded. |
| `kind` | product \| topup \| payment | Product orders, buyer balance top-ups or API payments. Payments are left out unless you ask for kind=payment. |
| `email` | string | Buyer email contains this text. |
| `since` | ISO date | Created at or after. |
| `until` | ISO date | Created before. |
| `limit` | 1..100 | Page size. Default 25. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/orders" \
  -H "Authorization: Bearer hsk_live_…"
```

## Get an order.

### GET /orders/{id}

{id} is the order's `publicRef` (any case, hyphen optional) or its long id. Scope `orders:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

```bash
curl "https://api.sellhidden.com/v1/orders/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "order": {
    "id": "clx…",
    "publicRef": "4MPT-8WQA",
    "kind": "product",
    "status": "delivered",
    "test": false,
    "buyer": {
      "email": "buyer@example.com",
      "customerId": "clx…",
      "country": null
    },
    "amounts": {
      "grossUsd": 29,
      "discountUsd": 0,
      "buyerTotalUsd": 29,
      "platformFeeRate": 0,
      "platformFeeUsd": 0,
      "platformFeePaidByBuyerUsd": 0,
      "sellerNetUsd": 29,
      "feeBornBy": "seller",
      "networkFeeUsd": null,
      "currencyShown": "EUR"
    },
    "payment": {
      "method": "crypto",
      "paidWithBalance": false,
      "paidAmountUsd": 29,
      "paidCurrency": "USDT",
      "manual": null
    },
    "coupon": null,
    "customFields": null,
    "note": null,
    "items": [
      {
        "id": "clx…",
        "productId": "clx…",
        "productSlug": "lifetime-license",
        "name": "Lifetime license",
        "variationId": "clx…",
        "variationLabel": "Lifetime",
        "quantity": 1,
        "unitPriceUsd": 29,
        "deliveryType": "keys",
        "deliveryTypes": [ "keys" ],
        "deliveryStatus": "delivered",
        "deliveryError": null
      }
    ],
    "refund": null,
    "paidAt": "2026-09-26T10:01:12.000Z",
    "deliveredAt": "2026-09-26T10:01:13.000Z",
    "expiresAt": null,
    "createdAt": "2026-09-26T09:58:40.000Z",
    "updatedAt": "2026-09-26T10:01:13.000Z"
  }
}
```

## Approve a manual payment.

### POST /orders/{id}/approve

Marks the order as paid and delivers it. A manual-method claim is verified; a crypto order that received part of its total is settled on what arrived; any other payable order is settled as paid outside the platform, which needs `confirmOutsidePlatform: true` while its invoice is still open (409 invoice_open otherwise). `warning` appears only when something needs you, for example an item that could not be delivered. Scope `orders:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `confirmOutsidePlatform` | boolean | The buyer paid you directly, outside the platform. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/orders/ID/approve" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
```

Response (200):

```json
{
  "ok": true,
  "credited": 0,
  "feeDebited": 0,
  "order": {
    "id": "clx…",
    "status": "delivered",
    …
  }
}
```

## Reject a manual payment.

### POST /orders/{id}/reject

Cancels a manual-method order with the reason; the buyer is emailed. Scope `orders:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `reason` | string | Up to 500 characters, shown to the buyer. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/orders/ID/reject" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"reason":"No payment received."}'
```

## Cancel an order.

### POST /orders/{id}/cancel

Pending, awaiting-verification, underpaid or expired orders. An order holding a partial crypto payment answers 409 partial_payment: approve or refund it instead. Scope `orders:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `reason` | string | Private, up to 500 characters. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/orders/ID/cancel" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
```

## Run delivery again.

### POST /orders/{id}/redeliver

For a paid order with items still not delivered (oversold, failed). 409 already_delivered when everything was delivered: resend the receipt instead. Scope `orders:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/orders/ID/redeliver" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response (200):

```json
{
  "ok": true,
  "delivered": 2,
  "failed": 0,
  "order": { … }
}
```

## Resend the receipt.

### POST /orders/{id}/resend-receipt

Emails the buyer their receipt and items again. Paid orders only; 3 per order and 60 per store per hour. Scope `orders:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/orders/ID/resend-receipt" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Idempotency-Key: $(uuidgen)"
```

## Refund to store balance.

### POST /orders/{id}/refund

The money goes to the buyer's store balance. A paid order is refunded in full or for `amountUsd`; an underpaid or expired order with a partial crypto payment hands over everything that arrived. Scope `orders:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `amountUsd` | number | Partial refund of a paid order; default: the full amount. |
| `reason` | string | Up to 500 characters. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/orders/ID/refund" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"reason":"Duplicate purchase."}'
```

Response (200):

```json
{
  "ok": true,
  "creditedUsd": 29,
  "order": {
    "id": "clx…",
    "status": "refunded",
    …
  }
}
```

## Write the private note.

### PUT /orders/{id}/note

A note only you see (API and dashboard, as `order.note`). POST works the same. Scope `orders:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `note` (required) | string | Up to 2,000 characters. |

```bash
curl -X PUT "https://api.sellhidden.com/v1/orders/ID/note" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"note":"Verified by hand on 2026-10-01."}'
```

## Remove the private note.

### DELETE /orders/{id}/note

Scope `orders:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The order's `publicRef` (any case, hyphen optional) or its long id. |

```bash
curl -X DELETE \
  "https://api.sellhidden.com/v1/orders/ID/note" \
  -H "Authorization: Bearer hsk_live_…"
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Payments

15 KB of Markdown · Open the page

# Payments

Source: https://docs.sellhidden.com/reference/payments

Crypto payments for your own site.

0% platform fee.

## Base URL, key and the five calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [POST /payments](https://docs.sellhidden.com/reference/payments#payments-payments-create): Create a payment
- [GET /payments/{id}](https://docs.sellhidden.com/reference/payments#payments-payments-get): Read one payment
- [GET /payments](https://docs.sellhidden.com/reference/payments#payments-payments-list): List payments
- [POST /payments/{id}/cancel](https://docs.sellhidden.com/reference/payments#payments-payments-cancel): Cancel a pending payment
- [POST /payments/{id}/accept](https://docs.sellhidden.com/reference/payments#payments-payments-accept): Complete on what arrived

Also here: [the payment object](https://docs.sellhidden.com/reference/payments#object), [statuses and events](https://docs.sellhidden.com/reference/payments#statuses), [errors](https://docs.sellhidden.com/reference/payments#errors).

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Create a payment, send the buyer to its `url` and deliver when `payment.paid` arrives. Turn payments on under Developers > Payments first; test payments work before that.

- **The key.** `hsk_live_` + 32 hex. One kind of key: no test keys. Shown once in the dashboard.
- **Scopes.** `payments:write` creates, cancels and accepts. `payments:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Creates also: 60 live and 20 test a minute per store. On a 429, wait `Retry-After` seconds.
- **Retries.** Header `Idempotency-Key`: the first answer is kept 24 hours. For payments, `reference` is the better guard.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## Create a payment.

### POST /payments

From your server only: a call from a web page is refused (403 server_only). The answer carries `url`: send the buyer there to pay. Unknown fields are ignored. `null` and empty strings count as left out. Test and live payments keep separate references. Sent again with the same reference, amount and test value, it answers 200 with the open payment and `"existing": true`. Scope `payments:write`. Accepts `Idempotency-Key`. Returns 201.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `amountUsd` (required) | number | The price in US dollars, as a JSON number: a string is refused. Not above your store's limit. 1.00 to 10,000. |
| `reference` | string | Your order number; the buyer sees it. Sent again with the same amount and test value, it returns the open payment. 1 to 64: letters, digits, _ . : @ + / = -. |
| `description` | string | Shown to the buyer. Longer than 120 characters is cut. |
| `returnUrl` | string | Where the buyer goes after paying. Its origin must match one of your websites; a test payment may also use localhost. https, up to 2,048 characters. |
| `cancelUrl` | string | The way back on an expired, cancelled or short payment. Same website rule. https, up to 2,048 characters. |
| `buyerEmail` | string | Turns on buyer emails, for live payments only. Up to 254 characters. |
| `expiresInMinutes` | integer | The time the buyer has to start paying. 15 to 1,440, default 60. |
| `metadata` | object | Your own data, never shown to the buyer. Keys: 1 to 40 letters, digits, _ . or -. Each value is a string (up to 200 characters), a number or a boolean. Up to 20 keys, 2,000 bytes as JSON. |
| `test` | boolean | true makes a test payment. No money moves. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/payments" \
  -H "Authorization: Bearer $HIDDEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amountUsd": 49, "reference": "order-1042", "test": true}'
```

Response (201):

```json
{
  "ok": true,
  "payment": {
    "id": "7K2Q-9XHD",
    "url":
      "https://sellhidden.com/order/7K2Q-9XHD",
    "status": "pending",
    "test": true,
    "amountUsd": 49,
    "paidUsd": null,
    "shortUsd": 0,
    "creditedUsd": null,
    "feeUsd": 0,
    "networkFeeUsd": 0,
    "reference": "order-1042",
    "description": null,
    "metadata": {},
    "buyerEmail": null,
    "returnUrl": null,
    "cancelUrl": null,
    "coin": null,
    "network": null,
    "underpaid": null,
    "availableAt": null,
    "createdAt": "2026-11-17T10:00:00.000Z",
    "expiresAt": "2026-11-17T11:00:00.000Z",
    "paidAt": null
  }
}
```

## Read one payment.

### GET /payments/{id}

If a webhook did not arrive, read the payment here. An unknown id answers 404 not_found. Scope `payments:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | Hidden's id, like 7K2Q-9XHD. Any case, with or without the hyphen. |

```bash
curl "https://api.sellhidden.com/v1/payments/7K2Q-9XHD" \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

Response (200):

```json
{
  "ok": true,
  "payment": {
    "id": "7K2Q-9XHD",
    "status": "paid",
    "amountUsd": 49,
    "paidUsd": 49,
    "creditedUsd": 49,
    "coin": "USDT",
    "network": "Tron (TRC20)",
    "availableAt": "2026-11-19T10:12:40.000Z",
    "paidAt": "2026-11-17T10:12:40.000Z",
    …
  }
}
```

## List payments.

### GET /payments

Newest first. Only `status`, `reference` and `test` answer 400 bad_request. A bad `since`, `until` or `limit` is ignored. Send `nextCursor` as `cursor` for the next page. Stop when `hasMore` is false. Scope `payments:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `status` | string | pending includes confirming. confirming itself is refused with 400. pending, underpaid, paid, expired, cancelled. |
| `reference` | string | Your order number. |
| `test` | boolean | Only test payments, or only live ones. true or false. |
| `since` | ISO time | From this time. Inclusive. |
| `until` | ISO time | Up to this time. Exclusive. |
| `limit` | integer | Payments per page. 1 to 100, default 25. |
| `cursor` | string | nextCursor from the page before. |

```bash
curl "https://api.sellhidden.com/v1/payments?status=paid&limit=25" \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

Response (200):

```json
{
  "ok": true,
  "payments": [
    {
      "id": "7K2Q-9XHD",
      "status": "paid",
      "test": false,
      "amountUsd": 49,
      "paidUsd": 49,
      "creditedUsd": 49,
      "reference": "order-1042",
      …
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

## Cancel a payment.

### POST /payments/{id}/cancel

Only a pending one, and only while no address is open and no transfer has been seen. Otherwise 409 payment_started, with `retryAfter` (an ISO time): try again then. It sends payment.cancelled. Already cancelled: 200 again. Not pending: 409 not_cancellable. Scope `payments:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The payment to cancel. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `reason` | string | Why you cancel it. Private. Up to 500 characters. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/payments/7K2Q-9XHD/cancel" \
  -H "Authorization: Bearer $HIDDEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Duplicate order"}'
```

Response (200):

```json
{
  "ok": true,
  "payment": {
    "id": "7K2Q-9XHD",
    "status": "cancelled",
    …
  }
}
```

## Accept what arrived.

### POST /payments/{id}/accept

It cannot be undone. An underpaid or expired payment is completed on what arrived: it is credited to your balance, minus the network cost, if your store pays it (see `creditedUsd`), and payment.paid is sent. A test payment cannot be underpaid. Not possible now: 409 nothing_received, payment_in_flight (a transfer is still confirming; `until` says until when), payment_busy (another action on it is running: retry shortly) or not_underpaid; read the payment and retry later. Already paid: 200 with `"creditedUsd": 0`. Scope `payments:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | An underpaid or expired payment. It is completed on what arrived. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/payments/7K2Q-9XHD/accept" \
  -H "Authorization: Bearer $HIDDEN_API_KEY"
```

Response (200):

```json
{
  "ok": true,
  "creditedUsd": 30,
  "payment": {
    "id": "7K2Q-9XHD",
    "status": "paid",
    "amountUsd": 49,
    "paidUsd": 30,
    "shortUsd": 19,
    "creditedUsd": 30,
    …
  }
}
```

## The payment object.

Every answer and every event carries it, its keys always in this order.

| Key | Type | Description |
| --- | --- | --- |
| `id` | string | Hidden's id for the payment, like 7K2Q-9XHD. |
| `url` | string | The payment page. Send the buyer here. |
| `status` | string | Where it stands: one of the six statuses below. |
| `test` | boolean | true for a test payment. |
| `amountUsd` | number | The price you asked for, in US dollars. |
| `paidUsd` | number or null | How much of the price arrived. Never above amountUsd. |
| `shortUsd` | number | amountUsd minus paidUsd when completed short, else 0. |
| `creditedUsd` | number or null | Added to your store balance. null until paid, 0 for a test. |
| `feeUsd` | number | Hidden's share of this payment, in US dollars. |
| `networkFeeUsd` | number | The share of the network cost your store paid, in US dollars. |
| `reference` | string or null | Your order number. |
| `description` | string or null | Shown to the buyer. |
| `metadata` | object | Your own data. `{}` when none was sent. |
| `buyerEmail` | string or null | The buyer's email, when you sent one. |
| `returnUrl` | string or null | Where the buyer goes after paying. |
| `cancelUrl` | string or null | The way back on an expired, cancelled or short payment. |
| `coin` | string or null | The coin of the buyer's latest transfer. null until one is seen. |
| `network` | string or null | The network of that transfer, like `"Tron (TRC20)"`. null until one is seen. |
| `underpaid` | object or null | Only while underpaid: receivedUsd, remainingUsd, payableUntil. |
| `availableAt` | time or null | When the money can be withdrawn. null for a test. |
| `createdAt` | time | When the payment was created. |
| `expiresAt` | time | When the time to start paying ends. It moves later when the buyer picks a coin, and when the payment is underpaid. |
| `paidAt` | time or null | When it was paid. |

Never in it: a deposit address, a coin amount, a QR code or a transaction hash. The payment page shows those to the buyer.

## Statuses and events.

What moves a payment, and what Hidden sends your webhook endpoint.

| Status | What it means |
| --- | --- |
| `pending` | You create it. Nothing counted yet. |
| `confirming` | A transfer is seen. Waiting for confirmations. |
| `underpaid` | Short by more than the tolerance. **48 hours** to send the rest. |
| `paid` | Paid in full, within the tolerance, or accepted. |
| `expired` | Time ran out. **Not final**: a late transfer can still pay it. |
| `cancelled` | By you, by Hidden, or a failed transfer. **Final.** |

**Events · tick these four in "Add endpoint"**

| Event | What it means |
| --- | --- |
| `payment.paid` | When the payment becomes paid. |
| `payment.underpaid` | When it becomes underpaid, and again whenever its status or the amount received changes. |
| `payment.expired` | Up to about 30 minutes after expiresAt. The API shows expired as soon as expiresAt passes. |
| `payment.cancelled` | When it is cancelled. |

There is no `payment.created`. Each event's `data` is the payment object: read `data.status` and `data.paidUsd`, not only the name. API payments never send `order.*` events.

## Errors.

`{ "ok": false, "error": { "code", "message", "field" } }`. `field` only when one field is wrong.

| Status | Code | When | Do |
| --- | --- | --- | --- |
| 400 | `validation_error` | A field breaks a rule; `field` names it. | Fix the field. |
| 400 | `bad_request` | The body is not JSON, a list filter is wrong, or the Idempotency-Key is. | Fix the request. |
| 400 | `site_not_allowed` | returnUrl or cancelUrl is not on one of your websites. | Add the website, and match the origin exactly. |
| 400 | `amount_over_limit` | Above your store's limit for one payment (`maxUsd`). | Lower the amount, or ask support. |
| 401 | `unauthorized, key_revoked, key_expired` | The key is missing, wrong, revoked or expired. | Use a valid key. |
| 403 | `insufficient_scope` | The key lacks `payments:write`. | Create a key with that scope. |
| 403 | `server_only` | Called from a web page. | Call from your server. |
| 403 | `payments_off` | A live payment while the switch is off. | Under Developers > Payments: add your website, then turn the switch on. |
| 403 | `store_suspended, ip_not_allowed, payments_paused, payments_blocked` | The store or the key is blocked. | Contact support, or check the key's IP list. |
| 404 | `not_found` | Payment not found. | Check the id. |
| 409 | `reference_in_use` | An open payment with this reference asks for another amount, or one expired less than 2 hours ago after the buyer got an address (`paymentId`). | Cancel it, wait, or use a new reference. |
| 409 | `reference_paid` | This reference is already paid (`paymentId`). | Do not charge again. |
| 409 | `not_cancellable, payment_started` | Cancel on a payment that is not pending, or the buyer already started paying. | Wait (`retryAfter`), or leave it. |
| 409 | `not_underpaid, nothing_received, payment_in_flight, payment_busy` | Accept is not possible now. | Read the payment, retry later. |
| 409 | `idempotency_in_progress` | The same Idempotency-Key is still running. | Wait 1 second, then send the same Idempotency-Key. |
| 422 | `idempotency_conflict` | The same Idempotency-Key with another body. | Send a new Idempotency-Key. |
| 429 | `rate_limited, daily_limit, open_limit` | Too many requests, the 24-hour total, or too many open payments. | Wait `Retry-After`; cancel unused payments. |
| 503 | `payments_unavailable` | Live payments paused by Hidden. Test payments still work. | Retry after 300 seconds. |

Extras sit inside `error`: `maxUsd`, `paymentId`, `until`, `retryAfter`, `openMax`, `dailyUsd`. The 429s, the 503 and the 409s `payment_started`, `payment_in_flight`, `payment_busy` are never stored for an `Idempotency-Key`: after the wait, retry with the same one.

## The first payment and the guide

- [Run your first payment](https://docs.sellhidden.com): One payment, part by part: request, page, webhook.
  - [Check the signature](https://docs.sellhidden.com#check-the-signature)
  - [Deliver once](https://docs.sellhidden.com#deliver-once)
- [Read the full guide](https://docs.sellhidden.com/payments): From a first test payment to live payments.
  - [First test payment](https://docs.sellhidden.com/payments#how-it-works)
  - [Handle payment.paid](https://docs.sellhidden.com/payments#statuses-and-webhooks)
  - [The payment page](https://docs.sellhidden.com/payments#the-payment-page)
  - [Go live](https://docs.sellhidden.com/payments#turn-on)
  - [Errors](https://docs.sellhidden.com/payments#errors)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Subscriptions

5.6 KB of Markdown · Open the page

# Subscriptions

Source: https://docs.sellhidden.com/reference/subscriptions

Buyers who pay every week, month, quarter or year.

## Base URL, key and the four calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /subscriptions](https://docs.sellhidden.com/reference/subscriptions#subscriptions-subscriptions-list): List subscriptions
- [GET /subscriptions/{id}](https://docs.sellhidden.com/reference/subscriptions#subscriptions-subscriptions-get): Get a subscription
- [POST /subscriptions/{id}/cancel](https://docs.sellhidden.com/reference/subscriptions#subscriptions-subscriptions-cancel): Cancel a subscription
- [POST /subscriptions/{id}/extend](https://docs.sellhidden.com/reference/subscriptions#subscriptions-subscriptions-extend): Extend by one period

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Each is a variation billed per period. Renewals are fresh orders the buyer pays from the renewal email or the order page, or from their store balance; after the grace period access ends by itself. The subscription.* webhook events carry the same shape.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `subscriptions:write` changes. `subscriptions:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List subscriptions.

### GET /subscriptions

Scope `subscriptions:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `status` | trialing \| active \| past_due \| cancelled \| expired | Only this status. |
| `email` | string | Buyer email contains this text. |
| `product` | string | Product id. |
| `limit` | 1..100 | Page size. Default 25. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/subscriptions" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "subscriptions": [
    {
      "subscriptionId": "clx…",
      "storeId": "clx…",
      "status": "active",
      "buyerEmail": "jo@example.com",
      "customerId": null,
      "productId": "clx…",
      "productTitle": "Pro plan",
      "variantId": "clx…",
      "variantLabel": "Monthly",
      "quantity": 1,
      "priceUsd": 9,
      "interval": "month",
      "currentPeriodStart": "…",
      "currentPeriodEnd": "…",
      "graceEndsAt": "…",
      "cancelAtPeriodEnd": false,
      "autoRenewFromBalance": false,
      "initialOrderId": "clx…",
      "renewalOrderId": null,
      "renewals": 2,
      "endedAt": null,
      "createdAt": "…"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```

## Get a subscription.

### GET /subscriptions/{id}

Scope `subscriptions:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The subscription's id. |

```bash
curl "https://api.sellhidden.com/v1/subscriptions/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Cancel a subscription.

### POST /subscriptions/{id}/cancel

By default the buyer keeps access until the period end and nothing more is charged (cancelAtPeriodEnd). With immediate: true access ends now: Discord roles are removed, the pending renewal order is cancelled and subscription.expired is sent with the keys it delivered. Scope `subscriptions:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The subscription's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `immediate` | boolean | End now instead of at the period end. Default false. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/subscriptions/ID/cancel" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
```

## Extend by one period.

### POST /subscriptions/{id}/extend

Adds one billing period for free from the current end (or from now when it already ended) and brings an expired or cancelled subscription back, Discord roles included. 5 per subscription and 60 per store per hour (429 rate_limited). Scope `subscriptions:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The subscription's id. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/subscriptions/ID/extend" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Customers

5.9 KB of Markdown · Open the page

# Customers

Source: https://docs.sellhidden.com/reference/customers

Your buyers, their store balance and bans.

## Base URL, key and the five calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /customers](https://docs.sellhidden.com/reference/customers#customers-customers-list): List customers
- [GET /customers/{id}](https://docs.sellhidden.com/reference/customers#customers-customers-get): Get a customer
- [POST /customers/{id}/balance](https://docs.sellhidden.com/reference/customers#customers-customers-balance): Adjust store balance
- [POST /customers/{id}/ban](https://docs.sellhidden.com/reference/customers#customers-customers-ban): Ban a customer
- [DELETE /customers/{id}/ban](https://docs.sellhidden.com/reference/customers#customers-customers-unban): Lift a ban

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Everyone who checked out or signed in on your storefront, with their totals.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `customers:write` changes. `customers:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List customers.

### GET /customers

Scope `customers:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `email` | string | Email contains this text. |
| `hasAccount` | true \| false | Only buyers who signed in (or only guests). |
| `limit` | 1..100 | Page size. Default 50. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/customers" \
  -H "Authorization: Bearer hsk_live_…"
```

## Get a customer.

### GET /customers/{id}

With their totals and their ten latest orders. Scope `customers:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The customer's id. |

```bash
curl "https://api.sellhidden.com/v1/customers/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "customer": {
    "id": "clx…",
    "email": "buyer@example.com",
    "name": null,
    "hasAccount": true,
    "balanceUsd": 12.5,
    "lastLoginAt": "2026-09-25T18:20:00.000Z",
    "createdAt": "2026-07-01T12:00:00.000Z",
    "orderCount": 4,
    "topUpCount": 1,
    "totalSpentUsd": 116,
    "openTicketCount": 0,
    "recentOrders": [
      { "id": "clx…", "status": "delivered", … }
    ]
  }
}
```

## Adjust store balance.

### POST /customers/{id}/balance

Adds (positive) or removes (negative) store balance. The balance never goes below zero (409 balance_too_low). Credits are capped at 25,000 USD per store per 24 hours (429 rate_limited). The reason is written to the audit log. Scope `customers:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The customer's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `amountUsd` (required) | number | Positive to credit, negative to debit. |
| `reason` (required) | string | Up to 300 characters. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/customers/ID/balance" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "amountUsd": 10,
    "reason": "Goodwill credit for the delayed delivery."
  }'
```

Response (200):

```json
{
  "ok": true,
  "customer": {
    "id": "clx…",
    "email": "buyer@example.com",
    "balanceUsd": 10,
    …
  },
  "change": { "amountUsd": 10, "reason": "…" }
}
```

## Ban a customer.

### POST /customers/{id}/ban

Blocks the buyer's email at checkout (a blacklist rule you also see under Blacklist in the dashboard). Scope `customers:write`. Accepts `Idempotency-Key`. Returns 201.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The customer's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `reason` | string | Private note, up to 300 characters. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/customers/ID/ban" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"reason":"Chargeback."}'
```

Response (201):

```json
{
  "ok": true,
  "customer": {
    "id": "clx…",
    "email": "buyer@example.com",
    "banned": true
  },
  "ban": {
    "ruleId": "clx…",
    "reason": "Chargeback.",
    "createdAt": "…"
  },
  "alreadyBanned": false
}
```

## Lift a ban.

### DELETE /customers/{id}/ban

Scope `customers:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The customer's id. |

```bash
curl -X DELETE \
  "https://api.sellhidden.com/v1/customers/ID/ban" \
  -H "Authorization: Bearer hsk_live_…"
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Reviews

4.7 KB of Markdown · Open the page

# Reviews

Source: https://docs.sellhidden.com/reference/reviews

Buyer reviews, your replies and what is shown.

## Base URL, key and the five calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /reviews](https://docs.sellhidden.com/reference/reviews#reviews-reviews-list): List reviews
- [GET /reviews/{id}](https://docs.sellhidden.com/reference/reviews#reviews-reviews-get): Get a review
- [PATCH /reviews/{id}](https://docs.sellhidden.com/reference/reviews#reviews-reviews-visibility): Hide or show a review
- [PUT /reviews/{id}/reply](https://docs.sellhidden.com/reference/reviews#reviews-reviews-reply): Reply in public
- [DELETE /reviews/{id}/reply](https://docs.sellhidden.com/reference/reviews#reviews-reviews-reply-delete): Remove the reply

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

You see buyer emails in full. Reviews are never deleted: hide spam instead, or answer in public.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `reviews:write` changes. `reviews:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List reviews.

### GET /reviews

Scope `reviews:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `productId` | string | Only this product. |
| `rating` | 1..5 | Only this rating. |
| `visible` | true \| false | Only shown or only hidden reviews. |
| `limit` | 1..1000 | Page size. Default 50. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/reviews" \
  -H "Authorization: Bearer hsk_live_…"
```

## Get a review.

### GET /reviews/{id}

Scope `reviews:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The review's id. |

```bash
curl "https://api.sellhidden.com/v1/reviews/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Hide or show a review.

### PATCH /reviews/{id}

Hiding needs the Starter plan or higher (403 `plan` otherwise). Showing a hidden review again always works. Scope `reviews:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The review's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `visible` (required) | boolean | false hides it from the storefront. |

```bash
curl -X PATCH "https://api.sellhidden.com/v1/reviews/ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"visible":false}'
```

## Reply in public.

### PUT /reviews/{id}/reply

Writes or edits the store's reply under the review. The buyer is emailed once per review, on the first reply. Automatic ratings cannot be answered (409 review_automatic). POST works the same. Scope `reviews:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The review's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `reply` (required) | string | Up to 1,000 characters. |

```bash
curl -X PUT \
  "https://api.sellhidden.com/v1/reviews/ID/reply" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"reply":"Thanks for the kind words!"}'
```

## Remove the reply.

### DELETE /reviews/{id}/reply

Scope `reviews:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The review's id. |

```bash
curl -X DELETE \
  "https://api.sellhidden.com/v1/reviews/ID/reply" \
  -H "Authorization: Bearer hsk_live_…"
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Tickets

5.3 KB of Markdown · Open the page

# Tickets

Source: https://docs.sellhidden.com/reference/tickets

Support threads buyers open from their order or account.

## Base URL, key and the five calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /tickets](https://docs.sellhidden.com/reference/tickets#tickets-tickets-list): List tickets
- [GET /tickets/{id}](https://docs.sellhidden.com/reference/tickets#tickets-tickets-get): Get a ticket
- [POST /tickets/{id}/messages](https://docs.sellhidden.com/reference/tickets#tickets-tickets-reply): Reply to a ticket
- [PATCH /tickets/{id}](https://docs.sellhidden.com/reference/tickets#tickets-tickets-status): Change the status
- [POST /tickets/{id}/close](https://docs.sellhidden.com/reference/tickets#tickets-tickets-close): Close a ticket

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Replies email the buyer.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `tickets:write` changes. `tickets:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List tickets.

### GET /tickets

Scope `tickets:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `status` | open \| answered \| closed | Only tickets with this status. |
| `email` | string | Buyer email contains this text. |
| `limit` | 1..100 | Page size. Default 25. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl "https://api.sellhidden.com/v1/tickets" \
  -H "Authorization: Bearer hsk_live_…"
```

## Get a ticket.

### GET /tickets/{id}

With its full thread; `fromBuyer` tells you who wrote each message. Scope `tickets:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The ticket's id. |

```bash
curl "https://api.sellhidden.com/v1/tickets/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "ticket": {
    "id": "clx…",
    "orderId": "clx…",
    "buyerEmail": "buyer@example.com",
    "subject": "Key not activating",
    "status": "answered",
    "messageCount": 2,
    "lastMessageAt": "2026-09-26T11:00:00.000Z",
    "createdAt": "2026-09-26T10:30:00.000Z",
    "messages": [
      {
        "id": "clx…",
        "fromBuyer": true,
        "body": "The key says invalid.",
        "createdAt": "2026-09-26T10:30:00.000Z"
      },
      {
        "id": "clx…",
        "fromBuyer": false,
        "body": "Try again without the dashes.",
        "createdAt": "2026-09-26T11:00:00.000Z"
      }
    ]
  }
}
```

## Reply to a ticket.

### POST /tickets/{id}/messages

The ticket becomes answered and the buyer is emailed. A closed ticket must be reopened first. Scope `tickets:write`. Accepts `Idempotency-Key`. Returns 201.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The ticket's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `body` (required) | string | Up to 10,000 characters. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/tickets/ID/messages" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"body":"Sorry about that. A new key is on its way."}'
```

## Change the status.

### PATCH /tickets/{id}

Scope `tickets:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The ticket's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `status` (required) | open \| answered \| closed | The new status. The buyer is not emailed. |

```bash
curl -X PATCH "https://api.sellhidden.com/v1/tickets/ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"status":"open"}'
```

## Close a ticket.

### POST /tickets/{id}/close

Scope `tickets:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The ticket's id. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/tickets/ID/close" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Idempotency-Key: $(uuidgen)"
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Store

4.6 KB of Markdown · Open the page

# Store

Source: https://docs.sellhidden.com/reference/store

Your store as its seller sees it, and the basic settings.

## Base URL, key and the two calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /store](https://docs.sellhidden.com/reference/store#store-store-get): Get the store
- [PATCH /store](https://docs.sellhidden.com/reference/store#store-store-update): Update basic settings

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

Themes, payment methods, payouts and domains stay in the dashboard.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `store:write` changes. `store:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## Get the store.

### GET /store

Scope `store:read`.

```bash
curl "https://api.sellhidden.com/v1/store" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "store": {
    "id": "clx…",
    "slug": "my-store",
    "name": "My Store",
    "url": "https://my-store.sellhidden.com",
    "plan": "pro",
    "balanceUsd": 1240.5,
    "feeBornBy": "seller",
    "support": {
      "email": "help@example.com",
      "discord": null,
      "telegram": null
    },
    "settings": {
      "maintenanceMode": false,
      "hideOutOfStock": false,
      …
    },
    …
  }
}
```

## Update basic settings.

### PATCH /store

Only the fields you send change. Scope `store:write`.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `name` | string | 2-80 characters. |
| `description` | string | Up to 500 characters. |
| `logoUrl` | string \| null | https URL or an uploaded /media URL. |
| `bannerUrl` | string \| null | https URL or an uploaded /media URL. |
| `supportEmail` | string \| null | Shown to buyers so they can reach you. |
| `supportDiscord` | string \| null | Invite URL. |
| `supportTelegram` | string \| null | Link URL, such as https://t.me/yourname. |
| `maintenanceMode` | boolean | Closes the storefront to buyers. |
| `hideOutOfStock` | boolean | Leaves sold-out products off the storefront. |
| `showStockCount` | boolean | Shows how many units are left, not only "In stock". |
| `showStats` | boolean | Shows the number sold on product pages, and the stats on the home page of a store not yet published in the website builder. Publishing there sets it from the hero's Show stats switch. |
| `recentSalesWidget` | boolean | Live sale notifications toggle. |
| `liveSalesCorner` | string | bottom-left \| bottom-right \| top-left \| top-right \| top-center (default bottom-left). |
| `autoReviews` | boolean | Automatic rating after 7 days. Changing it needs Pro (403 `plan`). |
| `showProductReviews` | boolean | Show the rating and reviews on the product page. Default true. |
| `autoCurrency` | boolean | Deprecated; use currencyMode ("auto"). |
| `currencyMode` | usd \| fixed \| auto | Default display currency: USD, a fixed one you pick, or the currency of the buyer's location. |
| `defaultCurrency` | string | ISO 4217 code used when currencyMode is "fixed". |
| `showCurrencyPicker` | boolean | False hides the currency picker everywhere and the shop stays in USD. |
| `feeBornBy` | seller \| customer | Has no effect today. |
| `productsPerPage` | 4..48 | Products per page on the storefront. |
| `subscriptionReminderDays` | 1..14 | Days before a renewal the reminder email goes out. |
| `subscriptionGraceDays` | 0..3 | Days a buyer keeps access after a missed renewal. |

```bash
curl -X PATCH "https://api.sellhidden.com/v1/store" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"maintenanceMode":true}'
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Webhooks

7.1 KB of Markdown · Open the page

# Webhooks

Source: https://docs.sellhidden.com/reference/webhooks

The endpoints that receive your store's signed events.

## Base URL, key and the eight calls

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /webhooks](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-list): List endpoints
- [POST /webhooks](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-create): Create an endpoint
- [GET /webhooks/{id}](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-get): Get an endpoint
- [PATCH /webhooks/{id}](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-update): Update an endpoint
- [DELETE /webhooks/{id}](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-delete): Delete an endpoint
- [POST /webhooks/{id}/rotate-secret](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-rotate): Rotate the secret
- [POST /webhooks/{id}/test](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-test): Send a test event
- [GET /webhooks/{id}/deliveries](https://docs.sellhidden.com/reference/webhooks#webhooks-webhooks-deliveries): Delivery log

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

They are the same ones as under Developers > Webhooks. The signing secret is returned once, on create and on rotate.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `webhooks:write` changes. `webhooks:read` reads. Write includes read.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Retries.** The calls whose request sends `Idempotency-Key` are safe to retry: the first answer is kept 24 hours.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.
- **Lists.** `?limit=&cursor=`, forward only. Stop when `hasMore` is false.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## List endpoints.

### GET /webhooks

Scope `webhooks:read`.

```bash
curl "https://api.sellhidden.com/v1/webhooks" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "webhooks": [
    {
      "id": "clx…",
      "url": "https://example.com/hooks",
      "label": "Fulfilment",
      "events": [ "order.paid" ],
      "active": true,
      "consecutiveFailures": 0,
      "secretHint": "whsec_1a2b…",
      "lastDelivery": { … },
      "deliveryCount": 42,
      "createdAt": "…"
    }
  ],
  "limit": 5
}
```

## Create an endpoint.

### POST /webhooks

Public https URLs only. Counts against the plan's endpoint limit (403 plan_limit). Scope `webhooks:write`. Accepts `Idempotency-Key`. Returns 201.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `url` (required) | string | https URL. |
| `events` (required) | string[] | Event names, each one by name (see Every event on the Webhooks page). Wildcards such as order.* or * are refused. |
| `label` | string | Up to 60 characters. |

```bash
curl -X POST "https://api.sellhidden.com/v1/webhooks" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "url": "https://example.com/hooks/hidden",
    "events": [
      "order.paid",
      "order.delivered"
    ],
    "label": "Fulfilment"
  }'
```

Response (201):

```json
{
  "ok": true,
  "webhook": {
    "id": "clx…",
    "url": "…",
    "events": [
      "order.paid",
      "order.delivered"
    ],
    "active": true,
    "secret": "whsec_…",
    …
  }
}
```

## Get an endpoint.

### GET /webhooks/{id}

Scope `webhooks:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The endpoint's id. |

```bash
curl "https://api.sellhidden.com/v1/webhooks/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Update an endpoint.

### PATCH /webhooks/{id}

Scope `webhooks:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The endpoint's id. |

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `url` | string | https URL. |
| `label` | string | Up to 60 characters. |
| `events` | string[] | Replaces the list. Event names only, no wildcards. |
| `active` | boolean | Switch it on again after it was disabled for failures. |
| `resetFailures` | boolean | Reset the consecutive failure counter. |

```bash
curl -X PATCH "https://api.sellhidden.com/v1/webhooks/ID" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"active":true,"resetFailures":true}'
```

## Delete an endpoint.

### DELETE /webhooks/{id}

Scope `webhooks:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The endpoint's id. |

```bash
curl -X DELETE "https://api.sellhidden.com/v1/webhooks/ID" \
  -H "Authorization: Bearer hsk_live_…"
```

## Rotate the secret.

### POST /webhooks/{id}/rotate-secret

Returns the new secret once. Deliveries are signed with it from now on. Scope `webhooks:write`. Accepts `Idempotency-Key`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The endpoint's id. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/webhooks/ID/rotate-secret" \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Idempotency-Key: $(uuidgen)"
```

## Send a test event.

### POST /webhooks/{id}/test

A signed webhook.test delivery (10 per endpoint per minute). The response carries the delivery row with the status code your endpoint returned. Scope `webhooks:write`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The endpoint's id. |

```bash
curl -X POST \
  "https://api.sellhidden.com/v1/webhooks/ID/test" \
  -H "Authorization: Bearer hsk_live_…"
```

## Delivery log.

### GET /webhooks/{id}/deliveries

Scope `webhooks:read`.

**Path**

| Path | Type | Description |
| --- | --- | --- |
| `id` (required) | string | The endpoint's id. |

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `status` | ok \| failed | Only deliveries that got a 2xx answer (`ok`), or only the rest (`failed`). |
| `limit` | 1..100 | Page size. Default 25. |
| `cursor` | string | nextCursor from the previous page. |

```bash
curl \
  "https://api.sellhidden.com/v1/webhooks/ID/deliveries" \
  -H "Authorization: Bearer hsk_live_…"
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Analytics

2.4 KB of Markdown · Open the page

# Analytics

Source: https://docs.sellhidden.com/reference/analytics

Revenue and order statistics.

## Base URL, key and the one call

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /analytics](https://docs.sellhidden.com/reference/analytics#analytics-analytics-get): Revenue and orders

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** `analytics:read` reads.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## Revenue and orders.

### GET /analytics

Scope `analytics:read`.

**Query parameters**

| Query parameters | Type | Description |
| --- | --- | --- |
| `period` | 24h \| 7d \| 30d \| 90d \| 365d | Window ending now. Default 30d. |

```bash
curl "https://api.sellhidden.com/v1/analytics" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "period": "7d",
  "revenue": {
    "totalUsd": 1240.5,
    "daily": [
      {
        "t": "2026-09-20T00:00:00.000Z",
        "value": 180
      },
      …
    ]
  },
  "orders": {
    "total": 43,
    "daily": [
      {
        "t": "2026-09-20T00:00:00.000Z",
        "value": 6
      },
      …
    ]
  },
  "customerCount": 39,
  "topProducts": [
    {
      "productId": "clx…",
      "slug": "lifetime-license",
      "title": "Lifetime license",
      "imageUrl": null,
      "units": 21,
      "revenueUsd": 609,
      "orders": 21
    }
  ]
}
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`

Your key

2.3 KB of Markdown · Open the page

# Your key

Source: https://docs.sellhidden.com/reference/keys

What this key is and may do.

## Base URL, key and the one call

- Base URL: `https://api.sellhidden.com/v1`
- Header: `Authorization: Bearer hsk_live_…`

- [GET /me](https://docs.sellhidden.com/reference/keys#keys-me): Inspect the key you are using

**Details**

Success is `{ "ok": true, ... }`, with no data wrapper.

- **The key.** `hsk_live_` + 32 hex, from your server. One kind of key: no test keys.
- **Scopes.** None: any valid key.
- **Rate limit.** 120 requests a minute per key. Most 429s carry `Retry-After`: wait that many seconds.
- **Money and time.** US dollars as JSON numbers, rounded to cents (`49`, `9.5`). Times in ISO 8601 UTC.

Every rule in full: [the API basics](https://docs.sellhidden.com/reference#authentication).

## Inspect the key you are using.

### GET /me

The key's store, scopes, expiry and the rate-limit window. Use it to check a key without touching data. Any valid key.

```bash
curl "https://api.sellhidden.com/v1/me" \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{
  "ok": true,
  "key": {
    "id": "clx…",
    "name": "Production",
    "prefix": "hsk_live_1a2b",
    "scopes": [
      "payments:read",
      "payments:write"
    ],
    "allScopes": false,
    "ipAllowlist": [],
    "expiresAt": null,
    "createdAt": "…",
    "lastUsedAt": "…"
  },
  "store": {
    "id": "clx…",
    "slug": "my-store",
    "name": "My Store",
    "plan": "pro"
  },
  "rateLimit": {
    "perMinute": 120,
    "remaining": 119,
    "resetAt": "…"
  }
}
```

## More

- [The API basics](https://docs.sellhidden.com/reference): Keys, scopes, errors and lists, for every call.
  - [Authentication](https://docs.sellhidden.com/reference#authentication)
  - [Scopes](https://docs.sellhidden.com/reference#scopes)
  - [Errors](https://docs.sellhidden.com/reference#responses)
  - [Pagination](https://docs.sellhidden.com/reference#pagination)
- [Your store's events](https://docs.sellhidden.com/webhooks): Signed events for orders, payments and more.
  - [Check the signature](https://docs.sellhidden.com/webhooks#verify-signature)
  - [Every event](https://docs.sellhidden.com/webhooks#webhook-events)

**OpenAPI 3.1**

- the OpenAPI address: `https://api.sellhidden.com/v1/openapi.json`