{"openapi":"3.1.0","info":{"title":"CoinsPay API","version":"1.0","description":"The CoinsPay API accepts cryptocurrency on your website: invoices with a payment page, receiving addresses, payments, payouts to your wallets and webhooks on every event.\n\nThe API lives at `/api/v1` on the same domain as the dashboard. All requests and responses are UTF-8 JSON.\n\n## Quick start\n\n1. **API key.** In the dashboard open the shop → \"API keys\" → \"Create key\". The `cpk_…` key is shown once: keep it on your server, the buyer-facing code does not need it.\n2. **Check the key**: `GET /shop` returns your shop.\n3. **Invoice.** Create an invoice and send the buyer to `pay_url` from the response:\n\n```bash\nBASE=https://<dashboard domain>/api/v1\nKEY=cpk_…\n\ncurl -X POST \"$BASE/invoices\" \\\n  -H \"Authorization: Bearer $KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: order-1042\" \\\n  -d '{\"currency\": \"USD\", \"amount\": \"49.90\", \"reference\": \"order-1042\", \"return_url\": \"https://shop.example/orders/1042\"}'\n```\n\n   On the payment page the buyer picks a coin and a network and sees the amount, the address and a QR code. After payment, and on an expired or cancelled invoice, a button leads back to `return_url`; with `auto_return: true` the page goes there by itself 5 seconds after payment. The page language follows the buyer's browser; `pay_url?lang=en` or `?lang=ru` sets it explicitly.\n4. **Webhook.** In the dashboard open the shop → \"Webhook\", enter the `https://…` address of your server and save the `whsec_…` secret. On payment you get an `invoice.paid` event: verify the signature (see \"Webhooks\") and mark the order as paid:\n\n```json\n{\n  \"id\": \"4f7c2a52-8a6e-4c1d-9a51-0e3b6f1d2c11\",\n  \"type\": \"invoice.paid\",\n  \"created_at\": \"2026-10-16T09:12:44.512Z\",\n  \"shop_id\": \"1b2c3d4e-5f60-4718-8293-a4b5c6d7e8f9\",\n  \"test\": false,\n  \"data\": { \"invoice\": { \"id\": \"…\", \"status\": \"paid\", \"reference\": \"order-1042\", \"amount\": \"49.9\", \"amount_paid\": \"49.9\" } }\n}\n```\n\n5. **Test.** The \"Send test event\" button on the webhook page sends an event of any type with `test: true`, so you can debug without paying. To walk an invoice end to end without money, use a test key (see \"Test mode\").\n\nWithout an invoice you can issue a permanent receiving address (`POST /addresses`) with your order number in `reference`: payments to it come as `payment.*` events.\n\n## SDK\n\nThe official libraries follow this API: methods for invoices, addresses, payments, balances and payouts, webhook signature verification and response types. They have no dependencies, and the source code is open.\n\n| Language | Install | Versions | Code |\n|---|---|---|---|\n| Node.js | `npm install coinspay` | Node.js 18+ | [GitHub](https://github.com/coinspayapp/coinspay-node) |\n| PHP | `composer require coinspay/coinspay-php` | PHP 7.0–8.5 | [GitHub](https://github.com/coinspayapp/coinspay-php) |\n| Python | `pip install coinspay` | Python 3.8+ | [GitHub](https://github.com/coinspayapp/coinspay-python) |\n| Go | `go get github.com/coinspayapp/coinspay-go` | Go 1.21+ | [GitHub](https://github.com/coinspayapp/coinspay-go) |\n\nAmounts in the libraries are strings, as in the API: `\"49.90\"`, not a number.\n\n## AI assistants (MCP)\n\nYou can connect your shop to an AI assistant: Claude, ChatGPT, Cursor, VS Code and other MCP clients. The assistant creates and checks invoices, looks at payments and balances, and prepares payouts. Only a person can send money, in the dashboard.\n\n| Address | What it does | Sign-in |\n|---|---|---|\n| `https://coinspay.app/mcp` | searches and reads these docs | none |\n| `https://coinspay.app/mcp/shop` | works with your shop, plus the same docs | through the dashboard or with an API key |\n\n### Connecting\n\n- **Claude** (claude.ai and Claude Desktop): Customize → Connectors → \"+\" → Add custom connector, address `https://coinspay.app/mcp/shop`. Custom connectors work on every plan, one on the Free plan; on Team and Enterprise an organization owner adds it.\n- **ChatGPT** (web only): Plugins → \"+\" → Add custom MCP server, address `https://coinspay.app/mcp/shop`. Creating invoices and requesting payouts works on Business, Enterprise and Edu; on Pro the server connects read-only.\n- **Claude Code**: `claude mcp add --transport http coinspay https://coinspay.app/mcp/shop`\n- **Cursor**, file `~/.cursor/mcp.json`: `{ \"mcpServers\": { \"coinspay\": { \"url\": \"https://coinspay.app/mcp/shop\" } } }`\n- **VS Code**, file `.vscode/mcp.json`: `{ \"servers\": { \"coinspay\": { \"type\": \"http\", \"url\": \"https://coinspay.app/mcp/shop\" } } }`\n\nOn the first call the CoinsPay dashboard opens. Sign in, choose the shop, the mode and the permissions, and confirm with your password or two-factor code. The connection appears on the shop's \"API\" tab, where you can also disconnect it. Every new connection is reported to you in Telegram.\n\nIf signing in through a browser does not suit you, pass an API key in the `Authorization: Bearer cpk_…` header instead. An invoices-only key gives the invoices permission, a full-access key gives all of them. The key's IP allowlist applies here too. Don't give a full-access key to an assistant that has a terminal: it can withdraw money through the API with no confirmation in the dashboard.\n\n### Permissions and mode\n\n- **Invoices**: create, find and cancel invoices; in test mode, also pay a test invoice without coins.\n- **Payments and balances**: receiving addresses, payments, balances, the payout list and payout quotes. The assistant cannot set automatic payout recipients for an address: that is done only in the dashboard.\n- **Payout requests**: see below.\n\nIn test mode only invoices are available, and they are all test ones, as with a `cpk_test_…` key.\n\n### Payouts need your confirmation\n\nThe `request_payout` tool does not send money. It creates a request with fixed amounts: MAX and percentages become exact amounts based on the current balance. You get a message in Telegram.\n\nThe payout is created by a person on the request page in the dashboard, after entering a password or two-factor code. The page shows the recipient addresses in full and highlights any address this shop has never paid to. A request is valid for 30 minutes. The assistant learns the outcome with `get_payout_request`.\n\nThis way an instruction slipped to the assistant in the data (for example, in an order title) cannot move the shop's money.\n\n### Tools\n\n| Tool | What it does | Permission |\n|---|---|---|\n| `get_shop` | the shop, mode and permissions of the connection | — |\n| `list_payment_options` | networks, coins and price currencies | — |\n| `create_invoice`, `list_invoices`, `get_invoice`, `cancel_invoice` | invoices | Invoices |\n| `pay_test_invoice` | pays a test invoice | Invoices, test mode |\n| `create_address`, `list_addresses`, `get_address` | receiving addresses | Payments |\n| `list_payments`, `get_payment`, `get_balances` | payments and balances | Payments |\n| `list_payouts`, `get_payout`, `quote_payout` | payouts and quotes | Payments |\n| `request_payout`, `get_payout_request` | a payout request and its outcome | Payout requests |\n| `search_docs`, `list_docs`, `get_doc` | these docs | — |\n\nThe sign-in token lasts an hour and renews itself. A connection stops working when you disconnect it on the \"API\" tab, and also when you change your password or two-factor settings or choose \"Sign out other sessions\".\n\n## API key\n\nEvery request carries the shop key in the `Authorization: Bearer cpk_…` header. A key works only for its shop: another shop's address, payment or invoice looks like a missing one, `404`. A missing or invalid key gives `401 UNAUTHORIZED`, a disabled shop gives `403 SHOP_DISABLED`. A shop may have several keys; a revoked key stops working at once.\n\nThe access of a key is chosen when it is issued and does not change later:\n\n- **invoices only**: invoices, `GET /shop`, `/chains`, `/currencies`. Put this key into CMS plugins and websites: everyone with access to the CMS admin can see it, and it cannot withdraw money from the shop. Addresses, payments, balances and payouts answer `403 KEY_ACCESS_DENIED`;\n- **full**: adds addresses, payments, balances and payouts. Your own server that withdraws money needs it; keep it only there.\n\n`GET /shop` shows the access of the key in `key.access`.\n\nIn the dashboard a key can get an IP allowlist: addresses and subnets (`203.0.113.7`, `203.0.113.0/24`, `2001:db8::/48`), up to 20 entries. A request from any other address then gets `403 IP_NOT_ALLOWED`, and `details.ip` holds the address it came from: that is the one to add. An empty list lets the key work from any address. The address is the one the request reached us from: behind NAT, a proxy or in a cloud it is the server's public address, not its internal one.\n\n## Test mode\n\nTo test your integration without money, create a **test key** in the dashboard: tick \"Test key\" when you create it. It starts with `cpk_test_…` and works with invoices only:\n\n- `POST /invoices` creates a test invoice with `test: true`, its own numbering and a regular `pay_url`;\n- the payment page of a test invoice has no address or QR code: the buyer picks a coin and clicks \"Pay\" or \"Pay part\", which pays half of what is due;\n- the rest goes as with a real payment: `payment.detected` at once, `payment.confirmed` and `invoice.paid` or `invoice.partially_paid` 10 seconds later, all with `test: true`. `GET /invoices/{id}` shows the same amounts and status, and the page button leads to `return_url`;\n- the address, transaction hash and sender in the events are made up, but in the network format;\n- test expiry with a short `lifetime_minutes` (15 minutes or more) and cancellation with `POST /invoices/{id}/cancel`.\n\nA test key sees only test invoices, a live key only real ones. Addresses, payments, balances and payouts are not available to a test key: `403 TEST_MODE_UNSUPPORTED`. Test invoices never reach balances, payouts, turnover or reports; in the dashboard they are on the \"Test\" tab of \"Invoices\".\n\n## Formats\n\n- **Amounts are strings** with a decimal point: `\"49.9\"`. JSON numbers lose precision at 18 decimals, so responses never use numeric amounts; requests accept numbers too.\n- `amount_base` is the same amount in base units of the asset (satoshi, wei, sun) as an integer string; `decimals` tells how many decimals the asset has.\n- **Time** is UTC in ISO 8601: `2026-10-16T09:12:44.512Z`.\n- **ids** are UUIDs. Pass your own order number in `reference`: it comes back in payments and events.\n- A field without a value is `null`, it is never omitted.\n\n## Errors\n\nAn error is an HTTP 4xx or 5xx status and a body with a code:\n\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Request validation failed\",\n    \"details\": { \"currency\": \"Required\" }\n  }\n}\n```\n\nBranch on `code`: `message` is an English explanation and may change.\n\n| Status | Codes |\n|---|---|\n| 400 | `VALIDATION_ERROR` (fields and reasons in `details`), `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED` |\n| 401 | `UNAUTHORIZED` |\n| 403 | `SHOP_DISABLED`, `IP_NOT_ALLOWED`, `TEST_MODE_UNSUPPORTED`, `KEY_ACCESS_DENIED` |\n| 404 | `NOT_FOUND` |\n| 409 | `IDEMPOTENCY_CONFLICT`, `INVOICE_NOT_OPEN` |\n| 422 | `INSUFFICIENT_BALANCE`, `FUNDS_NOT_MATURE`, `BELOW_MINIMUM`, `COSTS_EXCEED_AMOUNT`, `PAYOUT_NOT_VIABLE` |\n| 429 | `RATE_LIMITED` |\n| 503 | `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE`, `NETWORK_FEE_TOO_HIGH`: retry later |\n\n## Idempotency\n\nA request that creates money movements or obligations can be safely retried after a network failure with the `Idempotency-Key` header: 8 to 128 printable ASCII characters, unique within the shop. A retry with the same key and body returns the previous result with status `200`; with another body it gives `409 IDEMPOTENCY_CONFLICT`.\n\n- `POST /payouts`: the key is **required**, otherwise a retry would really send a second payout;\n- `POST /invoices`: the key is optional, but with it a retry does not create a second invoice. Your order number is a good key.\n\n## Pagination\n\nLists are returned newest first, `limit` records per page (1 to 100, 50 by default). Get the next page with `cursor` set to `next_cursor` of the previous one; `next_cursor: null` means there are no more pages.\n\n## Limits\n\n- At most 600 requests per minute from one IP.\n- At most 60 per minute per shop, separately for issuing addresses, for invoices and for payouts (`POST /payouts` and `POST /payouts/quote` together).\n- After 30 requests with an invalid key in 10 minutes the IP gets `429`.\n\nExceeding a limit gives `429 RATE_LIMITED`; retry later.\n\n## Webhooks\n\nOn every shop event (payment, payout, invoice) CoinsPay sends a `POST` to the shop webhook address. The body is an envelope `{ id, type, created_at, shop_id, test, data }`; `data` holds the payment, payout or invoice in the same shape as API responses. All types and bodies are in the \"Webhooks\" section.\n\n| Header | Value |\n|---|---|\n| `x-cpay-signature` | `t=<unix>,v1=<hex>`: HMAC-SHA256 of `${t}.${body}` with the webhook secret |\n| `x-cpay-event` | event type |\n| `x-cpay-delivery` | event id: the same on a repeated delivery |\n\n**Response.** Any 2xx within 10 seconds means the event is accepted. Otherwise it is retried with a growing pause up to 4 hours, 20 attempts, about a day. Reply at once and do long work after replying. If no event gets through for a week, the webhook is turned off and the shop owner gets a notice; it is turned on again in the cabinet once a test event gets through.\n\n**Reliable handling:**\n\n- verify the signature over the body **exactly as received**, before parsing JSON, and reject signatures older than 5 minutes;\n- drop duplicates by event `id`: one event may arrive twice;\n- rely on the state in the body (`data.deposit.status`, `data.invoice.status`), not on the arrival order: a retry may overtake the next event;\n- an event with `test: true` is a dashboard test or an event of a test invoice: do not touch real orders for it.\n\nThe webhook address must be `https` on a public host, redirects are not followed.\n\n### Signature verification\n\n**Node.js**\n\n```javascript\nimport crypto from 'node:crypto';\n\n// rawBody is the request body exactly as received, before JSON.parse.\nfunction verifyCPay(rawBody, header, secret) {\n  const parts = Object.fromEntries(header.split(',').map((part) => part.split('=')));\n  const expected = crypto\n    .createHmac('sha256', secret)\n    .update(`${parts.t}.${rawBody}`)\n    .digest('hex');\n  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) <= 300;\n  return (\n    fresh &&\n    typeof parts.v1 === 'string' &&\n    parts.v1.length === expected.length &&\n    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected))\n  );\n}\n```\n\n**Go**\n\n```go\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// rawBody is the request body exactly as received, before json.Unmarshal.\nfunc VerifyCPay(rawBody []byte, header, secret string) bool {\n\tparts := map[string]string{}\n\tfor _, part := range strings.Split(header, \",\") {\n\t\tif key, value, ok := strings.Cut(part, \"=\"); ok {\n\t\t\tparts[strings.TrimSpace(key)] = strings.TrimSpace(value)\n\t\t}\n\t}\n\tt, err := strconv.ParseInt(parts[\"t\"], 10, 64)\n\tif err != nil {\n\t\treturn false\n\t}\n\tif age := time.Now().Unix() - t; age > 300 || age < -300 {\n\t\treturn false\n\t}\n\tmac := hmac.New(sha256.New, []byte(secret))\n\tmac.Write([]byte(parts[\"t\"] + \".\"))\n\tmac.Write(rawBody)\n\texpected := hex.EncodeToString(mac.Sum(nil))\n\treturn hmac.Equal([]byte(expected), []byte(parts[\"v1\"]))\n}\n```\n\n**PHP**\n\n```php\n<?php\n// $rawBody is the request body exactly as received: file_get_contents('php://input').\nfunction verifyCPay(string $rawBody, string $header, string $secret): bool\n{\n    $parts = [];\n    foreach (explode(',', $header) as $part) {\n        [$key, $value] = array_pad(explode('=', $part, 2), 2, '');\n        $parts[trim($key)] = trim($value);\n    }\n    if (!isset($parts['t'], $parts['v1']) || !ctype_digit($parts['t'])) {\n        return false;\n    }\n    if (abs(time() - (int) $parts['t']) > 300) {\n        return false;\n    }\n    $expected = hash_hmac('sha256', $parts['t'] . '.' . $rawBody, $secret);\n    return hash_equals($expected, $parts['v1']);\n}\n```\n\n**Python**\n\n```python\nimport hashlib\nimport hmac\nimport time\n\n\n# raw_body is the request body exactly as received (bytes), before json.loads.\ndef verify_cpay(raw_body: bytes, header: str, secret: str) -> bool:\n    parts = dict(part.strip().split(\"=\", 1) for part in header.split(\",\") if \"=\" in part)\n    timestamp = parts.get(\"t\", \"\")\n    if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > 300:\n        return False\n    message = timestamp.encode() + b\".\" + raw_body\n    expected = hmac.new(secret.encode(), message, hashlib.sha256).hexdigest()\n    return hmac.compare_digest(expected, parts.get(\"v1\", \"\"))\n```\n\n## States\n\n- **Payment:** `seen` (mempool, Bitcoin and Litecoin only) → `pending` (in a block) → `confirmed` (credited); `orphaned` means the block was reorganized or the transaction disappeared. Ship the order on `confirmed`.\n- **Payout:** `pending` → `submitted` → `broadcast` → `confirmed`; also `waiting_maturity` (funds are not deep enough to withdraw, the payout waits), `failed`, `partially_completed`, `rejected`.\n- **Invoice:** `open` → `paid`, `expired` or `cancelled`. An invoice with a payment in transit does not expire until the payment settles; full payment after the deadline makes it paid with `paid_late: true`."},"servers":[{"url":"/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Invoices","description":"An invoice is the simplest way to accept payment: an amount in a currency, a payment page with a choice of coins and a webhook on payment."},{"name":"Addresses","description":"A receiving address in the chosen network: permanent, without an amount. Payments to it come as `payment.*` events."},{"name":"Payments","description":"Payments to the shop addresses and balances by asset."},{"name":"Payouts","description":"Withdrawal from a shop address to your wallets. Automatic payouts by the rule run by themselves; here are payouts on request."},{"name":"Shop","description":"Key check: the shop the key belongs to."},{"name":"Reference data","description":"Values of request parameters: networks (`chain`), assets (`asset`, `pay_options`) and invoice price currencies (`currency`). The current values as tables are in [Networks and coins](/docs/networks)."}],"paths":{"/invoices":{"post":{"operationId":"createInvoice","tags":["Invoices"],"summary":"Create an invoice","description":"An invoice by items or by one amount. The response has `pay_url`: send the buyer there. `Idempotency-Key` is optional: with it a retry after a network failure returns the same invoice (`200`) instead of a second one.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Idempotency key: 8 to 128 printable ASCII characters, unique within the shop. A retry with the same key returns the previous result.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[\\x21-\\x7e]{8,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"responses":{"200":{"description":"Retry with the same idempotency key: the previous result.","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"]}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: `IDEMPOTENCY_CONFLICT` — the key was used for another request; `INVOICE_NOT_OPEN` — the invoice is no longer open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: `RATE_LIMITED`. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listInvoices","tags":["Invoices"],"summary":"List invoices","description":"Shop invoices, newest first.","parameters":[{"name":"status","in":"query","required":false,"description":"Only invoices in this state.","schema":{"type":"string","enum":["open","paid","expired","cancelled"]}},{"name":"reference","in":"query","required":false,"description":"Order number, exact match.","schema":{"type":"string","maxLength":190}},{"name":"cursor","in":"query","required":false,"description":"`next_cursor` of the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"Page size: 1 to 100, 50 by default.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["invoices","next_cursor"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"summary":"Get an invoice","description":"An invoice by id, with items and payments.","parameters":[{"name":"id","in":"path","required":true,"description":"Public id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}/cancel":{"post":{"operationId":"cancelInvoice","tags":["Invoices"],"summary":"Cancel an invoice","description":"Cancels an open invoice; a paid, expired or cancelled one gives `409 INVOICE_NOT_OPEN`. A payment that arrives after cancellation is still credited to the shop.","parameters":[{"name":"id","in":"path","required":true,"description":"Public id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: `IDEMPOTENCY_CONFLICT` — the key was used for another request; `INVOICE_NOT_OPEN` — the invoice is no longer open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/addresses":{"post":{"operationId":"createAddress","tags":["Addresses"],"summary":"Issue an address","description":"A new receiving address in the network. `reference` is your order number: it comes back in payment events. At most 60 addresses per minute per shop.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewAddressRequest"}}}},"responses":{"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"}},"required":["address"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: `RATE_LIMITED`. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listAddresses","tags":["Addresses"],"summary":"List addresses","description":"Shop addresses, newest first, paginated.","parameters":[{"name":"chain","in":"query","required":false,"description":"Only this network.","schema":{"type":"string","minLength":1,"maxLength":32}},{"name":"reference","in":"query","required":false,"description":"Order number, exact match.","schema":{"type":"string","maxLength":190}},{"name":"address","in":"query","required":false,"description":"Shop address, exact match.","schema":{"type":"string","maxLength":128}},{"name":"cursor","in":"query","required":false,"description":"`next_cursor` of the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"Page size: 1 to 100, 50 by default.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["addresses","next_cursor"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/addresses/{id}":{"get":{"operationId":"getAddress","tags":["Addresses"],"summary":"Get an address","description":"A shop address by id. Another shop's address looks like a missing one: 404.","parameters":[{"name":"id","in":"path","required":true,"description":"Public id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"}},"required":["address"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deposits":{"get":{"operationId":"listDeposits","tags":["Payments"],"summary":"List payments","description":"Payments to the shop addresses, newest first, with filters.","parameters":[{"name":"status","in":"query","required":false,"description":"Only payments in this state.","schema":{"type":"string","enum":["seen","pending","confirmed","orphaned"]}},{"name":"chain","in":"query","required":false,"description":"Only this network.","schema":{"type":"string","minLength":1,"maxLength":32}},{"name":"asset","in":"query","required":false,"description":"Only this asset.","schema":{"type":"string","minLength":1,"maxLength":32}},{"name":"reference","in":"query","required":false,"description":"Order number, exact match.","schema":{"type":"string","maxLength":190}},{"name":"address","in":"query","required":false,"description":"Shop address, exact match.","schema":{"type":"string","maxLength":128}},{"name":"tx_hash","in":"query","required":false,"description":"Transaction hash, exact match.","schema":{"type":"string","maxLength":128}},{"name":"cursor","in":"query","required":false,"description":"`next_cursor` of the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"Page size: 1 to 100, 50 by default.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"deposits":{"type":"array","items":{"$ref":"#/components/schemas/Deposit"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["deposits","next_cursor"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/deposits/{id}":{"get":{"operationId":"getDeposit","tags":["Payments"],"summary":"Get a payment","description":"A payment by id, the same shape as in `payment.*` events.","parameters":[{"name":"id","in":"path","required":true,"description":"Public id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"deposit":{"$ref":"#/components/schemas/Deposit"}},"required":["deposit"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/balances":{"get":{"operationId":"listBalances","tags":["Payments"],"summary":"Balances","description":"Balances by asset: `confirmed` is credited minus payouts and fees, `pending` and `seen` are payments in transit.","responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}}},"required":["balances"]}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payouts/quote":{"post":{"operationId":"quotePayout","tags":["Payouts"],"summary":"Quote a payout","description":"What each recipient will get and what will be deducted, without creating a payout. The body is the same as for `POST /payouts`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutRequest"}}}},"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"quote":{"$ref":"#/components/schemas/PayoutQuote"}},"required":["quote"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The payout cannot be executed: `INSUFFICIENT_BALANCE`, `FUNDS_NOT_MATURE`, `BELOW_MINIMUM`, `COSTS_EXCEED_AMOUNT`, `PAYOUT_NOT_VIABLE`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: `RATE_LIMITED`. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payouts":{"post":{"operationId":"createPayout","tags":["Payouts"],"summary":"Create a payout","description":"A payout from a shop address. The `Idempotency-Key` header is required: a retry with the same key and body returns the same payout (`200`), with another body — `409 IDEMPOTENCY_CONFLICT`. A payout that cannot be executed is refused at once and not stored: `422` with the reason.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Idempotency key: 8 to 128 printable ASCII characters, unique within the shop. A retry with the same key returns the previous result.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[\\x21-\\x7e]{8,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutRequest"}}}},"responses":{"200":{"description":"Retry with the same idempotency key: the previous result.","content":{"application/json":{"schema":{"type":"object","properties":{"payout":{"$ref":"#/components/schemas/Payout"}},"required":["payout"]}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"type":"object","properties":{"payout":{"$ref":"#/components/schemas/Payout"}},"required":["payout"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: `IDEMPOTENCY_CONFLICT` — the key was used for another request; `INVOICE_NOT_OPEN` — the invoice is no longer open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The payout cannot be executed: `INSUFFICIENT_BALANCE`, `FUNDS_NOT_MATURE`, `BELOW_MINIMUM`, `COSTS_EXCEED_AMOUNT`, `PAYOUT_NOT_VIABLE`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests: `RATE_LIMITED`. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listPayouts","tags":["Payouts"],"summary":"List payouts","description":"Shop payouts, by API and automatic, newest first.","parameters":[{"name":"status","in":"query","required":false,"description":"Only payouts in this state.","schema":{"type":"string","enum":["pending","waiting_maturity","submitted","broadcast","confirmed","failed","partially_completed","rejected"]}},{"name":"chain","in":"query","required":false,"description":"Only this network.","schema":{"type":"string","minLength":1,"maxLength":32}},{"name":"address_id","in":"query","required":false,"description":"Only payouts from this shop address.","schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","required":false,"description":"`next_cursor` of the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","required":false,"description":"Page size: 1 to 100, 50 by default.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"payouts":{"type":"array","items":{"$ref":"#/components/schemas/Payout"}},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["payouts","next_cursor"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/payouts/{id}":{"get":{"operationId":"getPayout","tags":["Payouts"],"summary":"Get a payout","description":"A payout by id, the same shape as in `payout.*` events.","parameters":[{"name":"id","in":"path","required":true,"description":"Public id.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"payout":{"$ref":"#/components/schemas/Payout"}},"required":["payout"]}}}},"400":{"description":"The request failed validation: `VALIDATION_ERROR` with fields and reasons in `details`; `UNKNOWN_CHAIN`, `UNKNOWN_ASSET`, `CHAIN_DISABLED`, `INVALID_ADDRESS`, `IDEMPOTENCY_KEY_REQUIRED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found: `NOT_FOUND`. Another shop's record looks like a missing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/shop":{"get":{"operationId":"getShop","tags":["Shop"],"summary":"Shop of the key","description":"The shop the key belongs to and the access of the key: a convenient check of the key and the integration.","responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"shop":{"$ref":"#/components/schemas/Shop"},"key":{"$ref":"#/components/schemas/ShopKey"}},"required":["shop","key"]}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/chains":{"get":{"operationId":"listChains","tags":["Reference data"],"summary":"Networks and assets","description":"The `chain` and `asset` values for requests: what can be accepted, how many confirmations are required and the minimum payout.","responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"network_mode":{"type":"string","enum":["mainnet","testnet"]},"chains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"}}},"required":["network_mode","chains"]}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/currencies":{"get":{"operationId":"listCurrencies","tags":["Reference data"],"summary":"Price currencies","description":"The `currency` values for `POST /invoices`: fiat currencies and cryptocurrencies, with the precision of amounts.","responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"type":"object","properties":{"fiat":{"type":"array","items":{"$ref":"#/components/schemas/FiatCurrency"}},"crypto":{"type":"array","items":{"$ref":"#/components/schemas/CryptoCurrency"}}},"required":["fiat","crypto"]}}}},"401":{"description":"No key or an invalid key: `UNAUTHORIZED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The shop is disabled: `SHOP_DISABLED`; the request came from an address outside the key's IP allowlist: `IP_NOT_ALLOWED`, the address is in `details.ip`; a test key called a method without test mode: `TEST_MODE_UNSUPPORTED`; an invoices-only key called a method that needs full access: `KEY_ACCESS_DENIED`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable: `CORE_UNAVAILABLE`, `RATE_UNAVAILABLE` (no fresh rate) or `NETWORK_FEE_TOO_HIGH` (network gas above the cap). Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"payment.seen":{"post":{"operationId":"webhook-payment.seen","summary":"Payment in the mempool","description":"Bitcoin and Litecoin only: the transaction is visible but not in a block yet. It is not a payment: the payer can replace it (`rbf`).","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentEvent"},{"type":"object","properties":{"type":{"const":"payment.seen"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"payment.detected":{"post":{"operationId":"webhook-payment.detected","summary":"Payment in a block","description":"The payment is in a block and waits for confirmations.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentEvent"},{"type":"object","properties":{"type":{"const":"payment.detected"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"payment.confirmed":{"post":{"operationId":"webhook-payment.confirmed","summary":"Payment credited","description":"The payment reached the required depth and is credited: you can ship the order. Fiat amounts at crediting are included.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentEvent"},{"type":"object","properties":{"type":{"const":"payment.confirmed"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"payment.orphaned":{"post":{"operationId":"webhook-payment.orphaned","summary":"Payment cancelled","description":"The block with the payment was reorganized or the transaction disappeared. A credited payment is reversed.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaymentEvent"},{"type":"object","properties":{"type":{"const":"payment.orphaned"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"payout.broadcast":{"post":{"operationId":"webhook-payout.broadcast","summary":"Payout broadcast","description":"Payout transfers were sent to the network.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PayoutEvent"},{"type":"object","properties":{"type":{"const":"payout.broadcast"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"payout.confirmed":{"post":{"operationId":"webhook-payout.confirmed","summary":"Payout confirmed","description":"All transfers are confirmed.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PayoutEvent"},{"type":"object","properties":{"type":{"const":"payout.confirmed"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"payout.failed":{"post":{"operationId":"webhook-payout.failed","summary":"Payout failed","description":"The payout was rejected, failed or partially completed: see `data.payout.status` and `data.payout.error`.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PayoutEvent"},{"type":"object","properties":{"type":{"const":"payout.failed"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"invoice.paid":{"post":{"operationId":"webhook-invoice.paid","summary":"Invoice paid","description":"The invoice is fully paid by confirmed payments.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InvoiceEvent"},{"type":"object","properties":{"type":{"const":"invoice.paid"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"invoice.partially_paid":{"post":{"operationId":"webhook-invoice.partially_paid","summary":"Invoice partially paid","description":"Part of the amount arrived: the rest is in `data.invoice.amount_due`.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InvoiceEvent"},{"type":"object","properties":{"type":{"const":"invoice.partially_paid"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"invoice.expired":{"post":{"operationId":"webhook-invoice.expired","summary":"Invoice expired","description":"The payment time is over and no payment is in transit.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InvoiceEvent"},{"type":"object","properties":{"type":{"const":"invoice.expired"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"invoice.cancelled":{"post":{"operationId":"webhook-invoice.cancelled","summary":"Invoice cancelled","description":"The invoice was cancelled in the dashboard or via the API.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InvoiceEvent"},{"type":"object","properties":{"type":{"const":"invoice.cancelled"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}},"webhook.test":{"post":{"operationId":"webhook-webhook.test","summary":"Test event","description":"The \"Send test event\" button in the dashboard: checks that your endpoint receives events and the signature matches.","parameters":[{"name":"x-cpay-signature","in":"header","required":true,"description":"Signature: `t=<unix>,v1=<hex>`, HMAC-SHA256 of `${t}.${body}` with the webhook secret.","schema":{"type":"string"}},{"name":"x-cpay-event","in":"header","required":true,"description":"Event type.","schema":{"type":"string"}},{"name":"x-cpay-delivery","in":"header","required":true,"description":"Event id: the same on a repeated delivery.","schema":{"type":"string"}}],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TestEvent"},{"type":"object","properties":{"type":{"const":"webhook.test"}}}]}}}},"responses":{"200":{"description":"Any 2xx response means the event is accepted. Otherwise it is retried with a growing pause."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"cpk_…","description":"Shop API key: `Authorization: Bearer cpk_…`. Issue it in the dashboard on the shop page, with invoices-only or full access. A test key `cpk_test_…` works with invoices only, and its invoices are test ones."}},"schemas":{"Shop":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public id of the shop."},"name":{"type":"string","description":"Shop name."},"created_at":{"type":"string","format":"date-time","description":"Creation time, UTC (ISO 8601)."}},"required":["id","name","created_at"]},"ShopKey":{"type":"object","properties":{"test":{"type":"boolean","description":"`true` for a test key `cpk_test_…`: test invoices only."},"access":{"type":"string","enum":["invoices","full"],"description":"Key access: `invoices` covers invoices, the shop, networks and price currencies; `full` adds addresses, payments, balances and payouts."}},"required":["test","access"]},"Chain":{"type":"object","properties":{"id":{"type":"string","description":"Network id used in requests."},"name":{"type":"string","description":"Human-readable network name."},"family":{"type":"string","enum":["evm","tron","bitcoin","litecoin","solana"],"description":"Network family: the address format. An EVM address is the same in every EVM network. Solana addresses are case-sensitive."},"native_symbol":{"type":"string","description":"Native coin of the network: fees are paid in it."},"confirmations":{"type":"integer","description":"Depth at which a payment is credited (`payment.confirmed`)."},"block_time_ms":{"type":"integer","description":"Average block time, ms."},"enabled":{"type":"boolean","description":"`false`: the network is disabled by the administrator; no new addresses, issued ones keep working."},"assets":{"type":"array","items":{"$ref":"#/components/schemas/ChainAsset"},"description":"Assets of the network: the coin and tokens."}},"required":["id","name","family","native_symbol","confirmations","block_time_ms","enabled","assets"]},"ChainAsset":{"type":"object","properties":{"symbol":{"type":"string","description":"Asset ticker."},"decimals":{"type":"integer","description":"Decimal places of the asset: how many base units make one coin."},"native":{"type":"boolean","description":"`true` for the network coin, `false` for a token."},"contract":{"type":["string","null"],"description":"Token contract address; `null` for the network coin."},"stablecoin":{"type":"boolean","description":"`true` for a stablecoin (USDT, USDC): an invoice with `stablecoins_only` accepts these coins."},"enabled":{"type":"boolean","description":"Whether the asset is accepted: `false` if it or its network is disabled."},"payout_minimum":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Minimum payout amount; `null` means no minimum."}},"required":["symbol","decimals","native","contract","stablecoin","enabled","payout_minimum"]},"ChainList":{"type":"object","properties":{"network_mode":{"type":"string","enum":["mainnet","testnet"],"description":"`mainnet` for real money, `testnet` for test networks."},"chains":{"type":"array","items":{"$ref":"#/components/schemas/Chain"},"description":"Networks of the platform."}},"required":["network_mode","chains"]},"FiatCurrency":{"type":"object","properties":{"code":{"type":"string","description":"Code: the `currency` value in `POST /invoices`."},"symbol":{"type":"string","description":"Currency sign."},"scale":{"type":"integer","description":"Decimal places of the invoice prices and amount."}},"required":["code","symbol","scale"]},"CryptoCurrency":{"type":"object","properties":{"code":{"type":"string","description":"Code: the `currency` value in `POST /invoices`."},"scale":{"type":"integer","description":"Decimal places of the invoice prices and amount."}},"required":["code","scale"]},"CurrencyList":{"type":"object","properties":{"fiat":{"type":"array","items":{"$ref":"#/components/schemas/FiatCurrency"},"description":"Fiat currencies enabled on the platform."},"crypto":{"type":"array","items":{"$ref":"#/components/schemas/CryptoCurrency"},"description":"Cryptocurrencies: the coin of any network. An invoice in a coin is not converted when the buyer pays with the same coin."}},"required":["fiat","crypto"]},"Address":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public id of the address."},"chain":{"type":"string","description":"Network: `tron`, `ethereum`, `bsc`… All values are in [Networks and coins](/docs/networks) and in the `GET /chains` response.","examples":["tron"]},"address":{"type":"string","description":"Address in the network: the buyer sends the payment here."},"reference":{"type":["string","null"],"description":"Your order number: comes back in payments and events. Up to 190 characters.","examples":["order-1042"]},"payout":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PayoutShare"},"description":"Payout recipients of this address; `null` means the shop payout rule applies."},"pay_url":{"type":"string","format":"uri","description":"Payment page for the buyer: address, QR code and payments. For an invoice address it is the invoice page."},"invoice_id":{"type":["string","null"],"format":"uuid","description":"Invoice the address was issued for; `null` for a standalone address."},"created_at":{"type":"string","format":"date-time","description":"Creation time, UTC (ISO 8601)."}},"required":["id","chain","address","reference","payout","pay_url","invoice_id","created_at"]},"PayoutShare":{"type":"object","properties":{"address":{"type":"string","description":"Payout recipient address."},"percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Recipient share in percent, up to hundredths. Shares add up to 100."}},"required":["address","percent"]},"AddressList":{"type":"object","properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"},"description":"Addresses, newest first."},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Cursor of the next page: pass it as `cursor`. `null` means there are no more pages."}},"required":["addresses","next_cursor"]},"Deposit":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public id of the payment."},"status":{"type":"string","enum":["seen","pending","confirmed","orphaned"],"description":"`seen`: the transaction is in the mempool (Bitcoin and Litecoin), not a payment yet; `pending`: in a block, waiting for confirmations; `confirmed`: credited; `orphaned`: the block was reorganized or the transaction disappeared."},"chain":{"type":"string","description":"Network: `tron`, `ethereum`, `bsc`… All values are in [Networks and coins](/docs/networks) and in the `GET /chains` response.","examples":["tron"]},"asset":{"type":"string","description":"Asset: the network coin (`ETH`, `TRX`, `BTC`…) or a token (`USDT`, `USDC`…). The assets of each network are in [Networks and coins](/docs/networks).","examples":["USDT"]},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Payment amount in asset units, as a decimal string."},"amount_base":{"type":"string","pattern":"^-?\\d+$","description":"The same amount in base units of the asset (satoshi, wei, sun) as an integer string."},"decimals":{"type":"integer","description":"Decimal places of the asset: how many base units make one coin."},"amount_usd":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Value in US dollars at the moment of crediting; `null` before crediting or without a rate."},"amounts_fiat":{"type":["object","null"],"additionalProperties":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"description":"Amounts in all reference currencies fixed at crediting: `{ \"USD\": \"100\", \"EUR\": \"92.15\" }`. `null` as for `amount_usd`."},"address":{"type":"string","description":"Shop address that received the payment."},"address_id":{"type":"string","format":"uuid","description":"id of the shop receiving address."},"invoice_id":{"type":["string","null"],"format":"uuid","description":"Invoice the address belongs to; `null` if the payment is not for an invoice."},"reference":{"type":["string","null"],"description":"Your order number: comes back in payments and events. Up to 190 characters.","examples":["order-1042"]},"tx_hash":{"type":"string","description":"Transaction hash in the network."},"output_index":{"type":"integer","description":"Output or log index inside the transaction: together with the hash it identifies the payment. Negative for SOL on Solana: −(1 + account index in the transaction)."},"from_address":{"type":["string","null"],"description":"Sender if the network knows it; `null` in Bitcoin and Litecoin."},"block_height":{"type":["integer","null"],"description":"Block with the transaction; `null` while it is in the mempool."},"confirmations_required":{"type":"integer","description":"Confirmations required for crediting."},"unexpected_chain":{"type":"boolean","description":"The payment arrived in a different EVM network than the address was issued for: it is counted in the actual network."},"expected_chain":{"type":["string","null"],"description":"Network the address was issued for."},"rbf":{"type":["boolean","null"],"description":"Bitcoin and Litecoin mempool only: the transaction is replaceable (RBF). Otherwise `null`."},"double_spend":{"type":["boolean","null"],"description":"Bitcoin mempool only: a conflicting spend of the same coins was seen. Otherwise `null`."},"created_at":{"type":"string","format":"date-time","description":"When the platform first saw the payment, UTC."},"confirmed_at":{"type":["string","null"],"format":"date-time","description":"When the payment was credited; `null` if not yet."},"orphaned_at":{"type":["string","null"],"format":"date-time","description":"When the payment was cancelled by a reorganization; `null` if never."}},"required":["id","status","chain","asset","amount","amount_base","decimals","amount_usd","amounts_fiat","address","address_id","invoice_id","reference","tx_hash","output_index","from_address","block_height","confirmations_required","unexpected_chain","expected_chain","rbf","double_spend","created_at","confirmed_at","orphaned_at"]},"DepositList":{"type":"object","properties":{"deposits":{"type":"array","items":{"$ref":"#/components/schemas/Deposit"},"description":"Payments, newest first."},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Cursor of the next page: pass it as `cursor`. `null` means there are no more pages."}},"required":["deposits","next_cursor"]},"Balance":{"type":"object","properties":{"chain":{"type":"string","description":"Network: `tron`, `ethereum`, `bsc`… All values are in [Networks and coins](/docs/networks) and in the `GET /chains` response.","examples":["tron"]},"asset":{"type":"string","description":"Asset: the network coin (`ETH`, `TRX`, `BTC`…) or a token (`USDT`, `USDC`…). The assets of each network are in [Networks and coins](/docs/networks).","examples":["USDT"]},"decimals":{"type":"integer","description":"Decimal places of the asset: how many base units make one coin."},"confirmed":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Balance: credited funds minus payouts and fees."},"pending":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Payments in a block waiting for confirmations."},"seen":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Payments in the mempool, not credited yet."}},"required":["chain","asset","decimals","confirmed","pending","seen"]},"BalanceList":{"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/Balance"},"description":"Balances by network and asset."}},"required":["balances"]},"Payout":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public id of the payout."},"status":{"type":"string","enum":["pending","waiting_maturity","submitted","broadcast","confirmed","failed","partially_completed","rejected"],"description":"`pending`: created; `submitted`: handed over for execution; `broadcast`: transfers are in the network; `confirmed`: done; `waiting_maturity`: funds are not deep enough to withdraw yet, the payout waits; `failed`: not executed; `partially_completed`: some recipients were paid; `rejected`: refused before start, funds stay on the address."},"origin":{"type":"string","enum":["api","auto"],"description":"`api`: created by an API request; `auto`: automatic payout by the rule when a payment was credited."},"chain":{"type":"string","description":"Network: `tron`, `ethereum`, `bsc`… All values are in [Networks and coins](/docs/networks) and in the `GET /chains` response.","examples":["tron"]},"asset":{"type":"string","description":"Asset: the network coin (`ETH`, `TRX`, `BTC`…) or a token (`USDT`, `USDC`…). The assets of each network are in [Networks and coins](/docs/networks).","examples":["USDT"]},"decimals":{"type":"integer","description":"Decimal places of the asset: how many base units make one coin."},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount leaving the address: recipients and the platform together."},"amount_base":{"type":"string","pattern":"^-?\\d+$","description":"The same amount in base units of the asset (satoshi, wei, sun) as an integer string."},"address":{"type":"string","description":"Shop address the payout is sent from."},"address_id":{"type":"string","format":"uuid","description":"id of the shop receiving address."},"deposit_id":{"type":["string","null"],"format":"uuid","description":"Payment paid out automatically; `null` for an API payout."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/PayoutRecipient"},"description":"Recipients with the calculation and the actual result."},"error":{"anyOf":[{"$ref":"#/components/schemas/PayoutError"},{"type":"null"}],"description":"Reason of refusal or failure; `null` if there is none."},"created_at":{"type":"string","format":"date-time","description":"Creation time, UTC (ISO 8601)."},"submitted_at":{"type":["string","null"],"format":"date-time","description":"When the payout was handed over for execution."},"completed_at":{"type":["string","null"],"format":"date-time","description":"When the payout finished, successfully or not."}},"required":["id","status","origin","chain","asset","decimals","amount","amount_base","address","address_id","deposit_id","recipients","error","created_at","submitted_at","completed_at"]},"PayoutRecipient":{"type":"object","properties":{"address":{"type":"string","description":"Recipient address."},"percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Share if recipients are set by percent."},"requested":{"type":["string","null"],"description":"Requested amount if recipients are set by amount (or `MAX`)."},"amount":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount for the recipient after deductions; `null` until calculated."},"sent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount actually sent."},"tx_hash":{"type":["string","null"],"description":"Hash of the transfer to the recipient."},"status":{"type":["string","null"],"description":"Transfer state: `pending`, `signed`, `broadcast`, `confirmed`, `failed`."}},"required":["address","percent","requested","amount","sent","tx_hash","status"]},"PayoutError":{"type":"object","properties":{"code":{"type":"string","description":"Reason code: `BELOW_MINIMUM`, `INSUFFICIENT_BALANCE`, `FUNDS_NOT_MATURE`, `COSTS_EXCEED_AMOUNT`, `PAYOUT_NOT_VIABLE`, `PAYOUT_FAILED`."},"message":{"type":["string","null"],"description":"Explanation in English."}},"required":["code","message"]},"PayoutList":{"type":"object","properties":{"payouts":{"type":"array","items":{"$ref":"#/components/schemas/Payout"},"description":"Payouts, newest first."},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Cursor of the next page: pass it as `cursor`. `null` means there are no more pages."}},"required":["payouts","next_cursor"]},"PayoutQuote":{"type":"object","properties":{"chain":{"type":"string","description":"Network: `tron`, `ethereum`, `bsc`… All values are in [Networks and coins](/docs/networks) and in the `GET /chains` response.","examples":["tron"]},"asset":{"type":"string","description":"Asset: the network coin (`ETH`, `TRX`, `BTC`…) or a token (`USDT`, `USDC`…). The assets of each network are in [Networks and coins](/docs/networks).","examples":["USDT"]},"decimals":{"type":"integer","description":"Decimal places of the asset: how many base units make one coin."},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount that will leave the address."},"address":{"type":"string","description":"Shop address the payout will be sent from."},"address_id":{"type":"string","format":"uuid","description":"id of the shop receiving address."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/PayoutQuoteRecipient"},"description":"What each recipient will get."}},"required":["chain","asset","decimals","amount","address","address_id","recipients"]},"PayoutQuoteRecipient":{"type":"object","properties":{"address":{"type":"string","description":"Recipient address."},"percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Share if recipients are set by percent."},"requested":{"type":["string","null"],"description":"Requested amount if recipients are set by amount (or `MAX`)."},"amount":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount for the recipient after deductions; `null` until calculated."}},"required":["address","percent","requested","amount"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public id of the invoice."},"number":{"type":"integer","description":"Invoice number within the shop: 1, 2, 3…"},"title":{"type":["string","null"],"description":"Custom invoice title; with `null` the dashboard names the invoice by its number, and the buyer sees \"Order <reference>\" or \"Payment\"."},"shop_id":{"type":"string","format":"uuid","description":"Public id of the shop."},"test":{"type":"boolean","description":"`true` for a test invoice issued with a test key `cpk_test_…`. It has no address; a button on the payment page simulates the payment, no money moves."},"status":{"type":"string","enum":["open","paid","expired","cancelled"],"description":"`open`: waiting for payment; `paid`: paid; `expired`: expired; `cancelled`: cancelled."},"currency":{"type":"string","description":"Price currency: fiat (`USD`, `EUR`…) or crypto (`USDT`, `BTC`…)."},"currency_kind":{"type":"string","enum":["fiat","crypto"],"description":"`fiat` or `crypto`."},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Invoice total in its currency."},"amount_paid":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Paid by confirmed payments, in the invoice currency."},"amount_pending":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Payments in transit: in a block without enough depth or in the mempool."},"amount_due":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount still due: total minus paid and in transit."},"amount_overpaid":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Paid above the total; `null` if there is no overpayment."},"reference":{"type":["string","null"],"description":"Your order number: comes back in payments and events. Up to 190 characters.","examples":["order-1042"]},"pay_url":{"type":"string","format":"uri","description":"Payment page: send the buyer here."},"paid_late":{"type":"boolean","description":"Paid after the due time."},"paid_manually":{"type":"boolean","description":"Marked as paid manually in the dashboard."},"expires_at":{"type":"string","format":"date-time","description":"Payment deadline, UTC."},"paid_at":{"type":["string","null"],"format":"date-time","description":"When the invoice was paid."},"created_at":{"type":"string","format":"date-time","description":"Creation time, UTC (ISO 8601)."},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Items; empty for an amount-only invoice."},"pay_options":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PayOption"},"description":"Accepted coins; `null` means any enabled coin."},"buyer_pays_fee":{"type":"boolean","description":"The buyer pays the service fee: it is added to the amount."},"buyer_pays_network":{"type":"boolean","description":"The buyer pays the network fee of the future payout."},"description":{"type":["string","null"],"description":"Description for the buyer."},"return_url":{"type":["string","null"],"description":"Where to return the buyer: the \"Back to the shop\" button on the payment page after the invoice is paid, expires or is cancelled."},"auto_return":{"type":"boolean","description":"After payment the page takes the buyer to `return_url` by itself in 5 seconds."},"origin":{"type":"string","enum":["cabinet","api"],"description":"Where it was created: `api` or `cabinet`."},"expired_at":{"type":["string","null"],"format":"date-time","description":"When the invoice expired."},"cancelled_at":{"type":["string","null"],"format":"date-time","description":"When the invoice was cancelled."},"payments":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePayment"},"description":"Payments for the invoice."}},"required":["id","number","title","shop_id","test","status","currency","currency_kind","amount","amount_paid","amount_pending","amount_due","amount_overpaid","reference","pay_url","paid_late","paid_manually","expires_at","paid_at","created_at","items","pay_options","buyer_pays_fee","buyer_pays_network","description","return_url","auto_return","origin","expired_at","cancelled_at","payments"]},"InvoiceSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public id of the invoice."},"number":{"type":"integer","description":"Invoice number within the shop: 1, 2, 3…"},"title":{"type":["string","null"],"description":"Custom invoice title; with `null` the dashboard names the invoice by its number, and the buyer sees \"Order <reference>\" or \"Payment\"."},"shop_id":{"type":"string","format":"uuid","description":"Public id of the shop."},"test":{"type":"boolean","description":"`true` for a test invoice issued with a test key `cpk_test_…`. It has no address; a button on the payment page simulates the payment, no money moves."},"status":{"type":"string","enum":["open","paid","expired","cancelled"],"description":"`open`: waiting for payment; `paid`: paid; `expired`: expired; `cancelled`: cancelled."},"currency":{"type":"string","description":"Price currency: fiat (`USD`, `EUR`…) or crypto (`USDT`, `BTC`…)."},"currency_kind":{"type":"string","enum":["fiat","crypto"],"description":"`fiat` or `crypto`."},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Invoice total in its currency."},"amount_paid":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Paid by confirmed payments, in the invoice currency."},"amount_pending":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Payments in transit: in a block without enough depth or in the mempool."},"amount_due":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Amount still due: total minus paid and in transit."},"amount_overpaid":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$","description":"Paid above the total; `null` if there is no overpayment."},"reference":{"type":["string","null"],"description":"Your order number: comes back in payments and events. Up to 190 characters.","examples":["order-1042"]},"pay_url":{"type":"string","format":"uri","description":"Payment page: send the buyer here."},"paid_late":{"type":"boolean","description":"Paid after the due time."},"paid_manually":{"type":"boolean","description":"Marked as paid manually in the dashboard."},"expires_at":{"type":"string","format":"date-time","description":"Payment deadline, UTC."},"paid_at":{"type":["string","null"],"format":"date-time","description":"When the invoice was paid."},"created_at":{"type":"string","format":"date-time","description":"Creation time, UTC (ISO 8601)."}},"required":["id","number","title","shop_id","test","status","currency","currency_kind","amount","amount_paid","amount_pending","amount_due","amount_overpaid","reference","pay_url","paid_late","paid_manually","expires_at","paid_at","created_at"]},"InvoiceItem":{"type":"object","properties":{"name":{"type":"string","description":"Item name."},"quantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Quantity."},"unit":{"type":["string","null"],"description":"Unit: \"pcs\", \"h\"…"},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Unit price in the invoice currency."},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Item total: quantity × price."}},"required":["name","quantity","unit","price","amount"]},"InvoicePayment":{"type":"object","properties":{"deposit_id":{"type":"string","format":"uuid","description":"Payment id: details in `GET /deposits/{id}`."},"status":{"type":"string","enum":["seen","pending","confirmed","orphaned"],"description":"Payment state, as in `Deposit.status`."},"chain":{"type":"string","description":"Network: `tron`, `ethereum`, `bsc`… All values are in [Networks and coins](/docs/networks) and in the `GET /chains` response.","examples":["tron"]},"asset":{"type":"string","description":"Asset: the network coin (`ETH`, `TRX`, `BTC`…) or a token (`USDT`, `USDC`…). The assets of each network are in [Networks and coins](/docs/networks).","examples":["USDT"]},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Payment amount in the coin."},"tx_hash":{"type":"string","description":"Transaction hash in the network."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Part of the invoice covered by the payment, in the invoice currency."},"late":{"type":"boolean","description":"Counted at the rate at detection: it came after the quote expired or in another coin."},"created_at":{"type":"string","format":"date-time","description":"When the payment was detected."},"confirmed_at":{"type":["string","null"],"format":"date-time","description":"When the payment was credited."}},"required":["deposit_id","status","chain","asset","amount","tx_hash","value","late","created_at","confirmed_at"]},"PayOption":{"type":"object","properties":{"chain":{"type":"string","description":"Network.","examples":["tron"]},"asset":{"type":"string","description":"Asset.","examples":["USDT"]}},"required":["chain","asset"]},"InvoiceList":{"type":"object","properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"},"description":"Invoices, newest first."},"next_cursor":{"type":["string","null"],"format":"uuid","description":"Cursor of the next page: pass it as `cursor`. `null` means there are no more pages."}},"required":["invoices","next_cursor"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable code: branch on it, not on the message."},"message":{"type":"string","description":"Explanation in English."},"details":{"type":"object","additionalProperties":{},"description":"Details: invalid fields, available amount and so on."}},"required":["code","message"],"description":"Error."}},"required":["error"]},"NewAddressRequest":{"type":"object","properties":{"chain":{"type":"string","minLength":1,"maxLength":32,"description":"Network of the address: `tron`, `ethereum`, `bitcoin`… All values are in [Networks and coins](/docs/networks).","examples":["tron"]},"reference":{"type":["string","null"],"minLength":1,"maxLength":190,"description":"Your order number: comes back in payments and events. Up to 190 characters.","examples":["order-1042"]},"payout":{"type":["array","null"],"items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":128,"description":"Recipient address.","examples":["TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8"]},"percent":{"anyOf":[{"type":"string","minLength":1,"maxLength":10},{"type":"number","exclusiveMinimum":0,"maximum":100}],"description":"Share in percent: a string \"33.33\" or a number.","examples":["100"]}},"required":["address","percent"]},"minItems":1,"maxItems":5,"description":"Payout recipients for this address instead of the shop rule: up to 5 addresses, shares add up to 100."}},"required":["chain"]},"PayoutRequest":{"type":"object","properties":{"address_id":{"type":"string","format":"uuid","description":"id of the shop address to pay from. Specify it or `address`.","examples":["6f1c2b0e-4d8a-4c3e-9b21-7a5d0e3f8c42"]},"address":{"type":"string","minLength":1,"maxLength":128,"description":"The shop address itself instead of `address_id`.","examples":["TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"]},"chain":{"type":"string","minLength":1,"maxLength":32,"description":"Payout network; defaults to the address network. An EVM address may use another EVM network.","examples":["tron"]},"asset":{"type":"string","minLength":1,"maxLength":32,"description":"Payout asset: the network coin or a token from the network list in [Networks and coins](/docs/networks).","examples":["USDT"]},"amount":{"anyOf":[{"type":"string","const":"MAX"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}],"description":"Payout amount with recipients by percent; omit it to pay out everything available. `MAX` also means everything available.","examples":["50"]},"recipients":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":128,"description":"Recipient address.","examples":["TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8"]},"percent":{"anyOf":[{"type":"string","minLength":1,"maxLength":10},{"type":"number","exclusiveMinimum":0,"maximum":100}],"description":"Share in percent; shares add up to 100.","examples":["100"]},"amount":{"anyOf":[{"type":"string","const":"MAX"},{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}],"description":"Amount for the recipient; `MAX` only with a single recipient. Deductions are taken from it.","examples":["50"]}},"required":["address"]},"minItems":1,"maxItems":5,"description":"Recipients: up to 5, all by percent or all by amount."}},"required":["asset","recipients"]},"InvoiceRequest":{"type":"object","properties":{"title":{"type":["string","null"],"maxLength":200,"description":"Title on the payment page, up to 200 characters. Without it the buyer sees \"Order <reference>\" or \"Payment\".","examples":["Consulting"]},"currency":{"type":"string","minLength":1,"maxLength":10,"description":"Price currency: fiat (`USD`, `EUR`, `RUB`…) or crypto (`USDT`, `BTC`…). All values are in `GET /currencies` and [Networks and coins](/docs/networks).","examples":["USD"]},"items":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Item name, up to 200 characters.","examples":["Consulting"]},"quantity":{"anyOf":[{"type":"string"},{"type":"number","minimum":0}],"description":"Quantity as a string or a number.","examples":["1"]},"unit":{"type":["string","null"],"maxLength":20,"description":"Unit, up to 20 characters.","examples":["h"]},"price":{"anyOf":[{"type":"string"},{"type":"number","minimum":0}],"description":"Unit price; precision follows the currency.","examples":["49.90"]}},"required":["name","quantity","price"]},"maxItems":100,"description":"Items, up to 100. Specify them or `amount`."},"amount":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number","minimum":0}]},{"type":"null"}],"description":"Invoice amount without items. Specify it or `items`.","examples":["49.90"]},"pay_options":{"type":["array","null"],"items":{"type":"object","properties":{"chain":{"type":"string","minLength":1,"maxLength":32,"description":"Network.","examples":["tron"]},"asset":{"type":"string","minLength":1,"maxLength":32,"description":"Asset.","examples":["USDT"]}},"required":["chain","asset"]},"maxItems":50,"description":"Accepted coins: `chain` and `asset` pairs from [Networks and coins](/docs/networks); omit to accept any enabled coin."},"stablecoins_only":{"type":"boolean","description":"Stablecoins only: USDT and USDC. Without `pay_options` the invoice accepts every enabled stablecoin in every network, and `pay_options` in the response lists them. With `pay_options`, a coin that is not a stablecoin gives `400 VALIDATION_ERROR`."},"buyer_pays_fee":{"type":"boolean","description":"The buyer pays the service fee: it is added to the amount."},"buyer_pays_network":{"type":"boolean","description":"The buyer pays the network fee of the future payout."},"lifetime_minutes":{"type":"integer","minimum":15,"maximum":43200,"description":"Payment time in minutes: 15 to 43200 (30 days), 1440 (one day) by default.","examples":[1440]},"reference":{"type":["string","null"],"minLength":1,"maxLength":190,"description":"Your order number: comes back in payments and events. Up to 190 characters.","examples":["order-1042"]},"description":{"type":["string","null"],"maxLength":1000,"description":"Description for the buyer, up to 1000 characters.","examples":["Order 1042"]},"return_url":{"type":["string","null"],"maxLength":500,"description":"Where to return the buyer, up to 500 characters: the \"Back to the shop\" button after the invoice is paid, expires or is cancelled.","examples":["https://shop.example/orders/1042"]},"auto_return":{"type":"boolean","description":"After payment the page takes the buyer to `return_url` by itself in 5 seconds; the buyer can press \"Stay\". Without `return_url` it gives `400 VALIDATION_ERROR`."}},"required":["currency"]},"PaymentEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id: a repeated delivery of the same event has the same id; use it to drop duplicates."},"type":{"type":"string","enum":["payment.seen","payment.detected","payment.confirmed","payment.orphaned"],"description":"Event type."},"created_at":{"type":"string","format":"date-time","description":"Event time, UTC."},"shop_id":{"type":"string","format":"uuid","description":"Public id of the shop."},"test":{"type":"boolean","description":"`true` for a test event: sent from the dashboard or about a test invoice. No money arrived, do not touch real orders. The field is signed."},"data":{"type":"object","properties":{"deposit":{"$ref":"#/components/schemas/Deposit","description":"The payment, as in `GET /deposits/{id}`."}},"required":["deposit"],"description":"Event data."}},"required":["id","type","created_at","shop_id","test","data"]},"PayoutEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id: a repeated delivery of the same event has the same id; use it to drop duplicates."},"type":{"type":"string","enum":["payout.broadcast","payout.confirmed","payout.failed"],"description":"Event type."},"created_at":{"type":"string","format":"date-time","description":"Event time, UTC."},"shop_id":{"type":"string","format":"uuid","description":"Public id of the shop."},"test":{"type":"boolean","description":"`true` for a test event: sent from the dashboard or about a test invoice. No money arrived, do not touch real orders. The field is signed."},"data":{"type":"object","properties":{"payout":{"$ref":"#/components/schemas/Payout","description":"The payout, as in `GET /payouts/{id}`."}},"required":["payout"],"description":"Event data."}},"required":["id","type","created_at","shop_id","test","data"]},"InvoiceEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id: a repeated delivery of the same event has the same id; use it to drop duplicates."},"type":{"type":"string","enum":["invoice.paid","invoice.partially_paid","invoice.expired","invoice.cancelled"],"description":"Event type."},"created_at":{"type":"string","format":"date-time","description":"Event time, UTC."},"shop_id":{"type":"string","format":"uuid","description":"Public id of the shop."},"test":{"type":"boolean","description":"`true` for a test event: sent from the dashboard or about a test invoice. No money arrived, do not touch real orders. The field is signed."},"data":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice","description":"The invoice, as in `GET /invoices/{id}`."}},"required":["invoice"],"description":"Event data."}},"required":["id","type","created_at","shop_id","test","data"]},"TestEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Event id: a repeated delivery of the same event has the same id; use it to drop duplicates."},"type":{"type":"string","const":"webhook.test","description":"Event type."},"created_at":{"type":"string","format":"date-time","description":"Event time, UTC."},"shop_id":{"type":"string","format":"uuid","description":"Public id of the shop."},"test":{"type":"boolean","description":"`true` for a test event: sent from the dashboard or about a test invoice. No money arrived, do not touch real orders. The field is signed."},"data":{"type":"object","properties":{"message":{"type":"string","description":"Test event text."}},"required":["message"],"description":"Event data."}},"required":["id","type","created_at","shop_id","test","data"]}}},"x-reference":{"network_mode":"mainnet","chains":[{"id":"ethereum","name":"Ethereum","native_symbol":"ETH","enabled":true,"assets":[{"symbol":"ETH","decimals":18,"native":true,"stablecoin":false,"enabled":true},{"symbol":"USDT","decimals":6,"native":false,"stablecoin":true,"enabled":true},{"symbol":"USDC","decimals":6,"native":false,"stablecoin":true,"enabled":true},{"symbol":"WETH","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"WBTC","decimals":8,"native":false,"stablecoin":false,"enabled":true},{"symbol":"BNB","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"TRX","decimals":6,"native":false,"stablecoin":false,"enabled":true},{"symbol":"LINK","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"UNI","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"SHIB","decimals":18,"native":false,"stablecoin":false,"enabled":true}]},{"id":"bsc","name":"BNB Smart Chain","native_symbol":"BNB","enabled":true,"assets":[{"symbol":"BNB","decimals":18,"native":true,"stablecoin":false,"enabled":true},{"symbol":"USDT","decimals":18,"native":false,"stablecoin":true,"enabled":true},{"symbol":"USDC","decimals":18,"native":false,"stablecoin":true,"enabled":true},{"symbol":"ETH","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"WBNB","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"BTCB","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"TRX","decimals":6,"native":false,"stablecoin":false,"enabled":true},{"symbol":"SOL","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"LINK","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"UNI","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"SHIB","decimals":18,"native":false,"stablecoin":false,"enabled":true}]},{"id":"tron","name":"TRON","native_symbol":"TRX","enabled":true,"assets":[{"symbol":"TRX","decimals":6,"native":true,"stablecoin":false,"enabled":true},{"symbol":"USDT","decimals":6,"native":false,"stablecoin":true,"enabled":true},{"symbol":"USDC","decimals":6,"native":false,"stablecoin":true,"enabled":true},{"symbol":"BTC","decimals":8,"native":false,"stablecoin":false,"enabled":true},{"symbol":"ETH","decimals":18,"native":false,"stablecoin":false,"enabled":true},{"symbol":"LTC","decimals":8,"native":false,"stablecoin":false,"enabled":true}]},{"id":"bitcoin","name":"Bitcoin","native_symbol":"BTC","enabled":true,"assets":[{"symbol":"BTC","decimals":8,"native":true,"stablecoin":false,"enabled":true}]},{"id":"litecoin","name":"Litecoin","native_symbol":"LTC","enabled":true,"assets":[{"symbol":"LTC","decimals":8,"native":true,"stablecoin":false,"enabled":true}]},{"id":"solana","name":"Solana","native_symbol":"SOL","enabled":true,"assets":[{"symbol":"SOL","decimals":9,"native":true,"stablecoin":false,"enabled":true},{"symbol":"USDT","decimals":6,"native":false,"stablecoin":true,"enabled":true},{"symbol":"USDC","decimals":6,"native":false,"stablecoin":true,"enabled":true}]}],"currencies":{"fiat":[{"code":"USD","symbol":"$","scale":2},{"code":"EUR","symbol":"€","scale":2},{"code":"GBP","symbol":"£","scale":2},{"code":"CAD","symbol":"CA$","scale":2},{"code":"JPY","symbol":"¥","scale":0},{"code":"AED","symbol":"د.إ","scale":2},{"code":"MYR","symbol":"RM","scale":2},{"code":"IDR","symbol":"Rp","scale":0},{"code":"THB","symbol":"฿","scale":2},{"code":"CHF","symbol":"CHF","scale":2},{"code":"COP","symbol":"COL$","scale":0},{"code":"SGD","symbol":"S$","scale":2},{"code":"RUB","symbol":"₽","scale":2},{"code":"ZAR","symbol":"R","scale":2},{"code":"TRY","symbol":"₺","scale":2},{"code":"LKR","symbol":"Rs","scale":2},{"code":"XAF","symbol":"FCFA","scale":0},{"code":"RON","symbol":"lei","scale":2},{"code":"HUF","symbol":"Ft","scale":0},{"code":"CZK","symbol":"Kč","scale":2},{"code":"PHP","symbol":"₱","scale":2},{"code":"PLN","symbol":"zł","scale":2},{"code":"UGX","symbol":"USh","scale":0},{"code":"MXN","symbol":"MX$","scale":2},{"code":"INR","symbol":"₹","scale":2},{"code":"HKD","symbol":"HK$","scale":2},{"code":"CNY","symbol":"¥","scale":2},{"code":"BRL","symbol":"R$","scale":2},{"code":"DKK","symbol":"kr","scale":2}],"crypto":[{"code":"BNB","scale":8},{"code":"BTC","scale":8},{"code":"BTCB","scale":8},{"code":"ETH","scale":8},{"code":"LINK","scale":8},{"code":"LTC","scale":8},{"code":"SHIB","scale":8},{"code":"SOL","scale":8},{"code":"TRX","scale":6},{"code":"UNI","scale":8},{"code":"USDC","scale":6},{"code":"USDT","scale":6},{"code":"WBNB","scale":8},{"code":"WBTC","scale":8},{"code":"WETH","scale":8}]}}}