Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: TgPay Crypto Merchant App API
version: '2026-11-16'
summary: Merchant payments API of the TgPay Crypto wallet (@tgpaycryptobot).
description: 'The Merchant API of TgPay Crypto (@tgpaycryptobot): create
invoices, refund them, send payouts and checks, withdraw the app
balance on-chain, exchange it between assets, issue withdrawal links,
manage recurring subscriptions, and receive signed webhooks. Human-readable documentation: https://docs.tgpaycrypto.com/crypto-pay-api-reference/
## Conventions
- **Authentication** — send your token in `TgPayCrypto-API-Token`. `TgCryptoPay-API-Token` and `Crypto-Pay-API-Token` are accepted aliases,
in that order. The first non-empty header wins. Full-access primary
tokens have every scope except `withdraw`; restricted tokens need the
operation''s scope, and only a restricted token can hold `withdraw`. - **Envelope** — application success is HTTP 200 with `{ok: true, result}`;
application errors are `{ok: false, error: {code, name}}`, with `code`
equal to the HTTP status. Branch on `error.name`. Transport/framework
rejections, such as malformed typed query parameters, may lack this envelope. - **Amounts** — requests use decimal strings in whole-coin or fiat units,
never JSON numbers. Crypto input is rounded to the asset''s minor unit,
with midpoint rounding away from zero; the result must be positive. Fiat input must represent a positive exact number of cents, at most
10^13 whole fiat units. Responses use fixed-point strings; balance and
fee amounts can be zero. `*_minor` values are integer strings. `getCurrencies` supplies asset decimals. Send exact asset precision. - **POST parameters** — JSON object, form-urlencoded body, or URL query
parameters; body values override query values, including null. Repeated
form/query keys use the last value. Multipart is rejected. Money-moving
methods have no GET aliases. Nested `items` and `recipients` must be
JSON arrays in a JSON body; JSON-encoded strings do not work for them. Required fields must be present after merging query and body. Optional null values generally behave as omitted; per-field rules apply. Integers accept integer strings; booleans also accept 1/0 and the strings
true/false, 1/0, yes/no, on/off (case-insensitive, surrounding whitespace ignored). Text limits are measured in UTF-16 code units by the server. - **Idempotency** — `spend_id` is required for transfers, batch items,
withdraw and exchange, optional for checks and refunds. Empty/null
optional keys disable replay. Keys are scoped per app and operation;
transfer, transferBatch and withdraw share a namespace, exchange has its
own. After validation and access gates, the same parsed request
replays its stored success. Different input returns `409 idempotency_conflict`;
an unfinished claim returns `409 idempotency_in_progress`. Amount strings
and recipient spelling are not normalized for the request hash: keep them
identical on retries. Replays are snapshots, not refreshed objects; use
list methods to obtain current status. createInvoice and plan creation
have no spend_id idempotency; createInvoice''s retry key is
`client_invoice_id`. - **Per-operation webhook and payload** — createInvoice, createCheck,
transfer, each transferBatch item and withdraw accept `webhook_url`
(a public HTTPS URL, up to 256 characters): every update of that
operation goes there instead of the app''s URL, regardless of the app''s
event selection. It is not returned in objects. createCheck, transfer,
transferBatch items and withdraw also accept `payload` (up to 4096
characters), echoed in the object and its webhooks. - **Pagination** — invoices, checks, transfers, withdrawals, exchanges and
withdrawal links default to offset 0, count 100; the server clamps
offset to at least 0 and count to 1..1000. Subscriptions clamp count to 1..500. These lists return `{items: [...]}`,
newest first. getSubscriptionPlans returns all plans without pagination. - **Timestamps** — ISO-8601 strings; nullable timestamps are explicitly null.'
servers:
- url: https://app.tgpaycrypto.com/pay/api
description: Production
- url: https://testnet.tgpaycrypto.com/pay/api
description: Testnet — coins with no value, its own bot @tgpaycrypto_testnet_bot and its own apps and tokens
security:
- apiToken: []
- apiTokenLegacy: []
- apiTokenCompat: []
tags:
# --- truncated at 32 KB (58 KB total) ---
# Full source: https://artifacts.apis.io/tgpaycrypto-com/openapi/tgpaycrypto-com-app-api-openapi.yml