TgPay Crypto Merchant API is an MCP server published by com.tgpaybot, hosted at app.tgpaycrypto.com. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 32 tools, including get_docs, connect, connect_status, getMe, getBalance.
Accept crypto payments via the TgPay Crypto Merchant API — invoices, subscriptions, webhooks.
Nothing else in the archive shares these values.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Read a TgPay Crypto Merchant API integration doc. START HERE before integrating: topics quickstart, invoices, subscriptions, transfers-checks, webhooks, errors.
| Parameter | Type | Description |
|---|---|---|
| topic * | string | quickstart | invoices | subscriptions | transfers-checks | webhooks | errors |
{
"name": "get_docs",
"description": "Read a TgPay Crypto Merchant API integration doc. START HERE before integrating: topics quickstart, invoices, subscriptions, transfers-checks, webhooks, errors.",
"inputSchema": {
"type": "object",
"required": [
"topic"
],
"properties": {
"topic": {
"type": "string",
"description": "quickstart | invoices | subscriptions | transfers-checks | webhooks | errors"
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Start token issuance WITHOUT the Mini App UI: creates a merchant-app request and returns a t.me approve link plus a poll_secret. Show the link to the human — they approve with one button ("Create app and issue token") in the @tgpaycryptobot bot — then call connect_status with the poll_secret. Use only when no API token is configured yet.
| Parameter | Type | Description |
|---|---|---|
| app_name * | string | Merchant app name shown to the approving human, 1-64 chars (e.g. the project/bot name). |
{
"name": "connect",
"description": "Start token issuance WITHOUT the Mini App UI: creates a merchant-app request and returns a t.me approve link plus a poll_secret. Show the link to the human — they approve with one button (\"Create app and issue token\") in the @tgpaycryptobot bot — then call connect_status with the poll_secret. Use only when no API token is configured yet.",
"inputSchema": {
"type": "object",
"required": [
"app_name"
],
"properties": {
"app_name": {
"type": "string",
"description": "Merchant app name shown to the approving human, 1-64 chars (e.g. the project/bot name)."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Poll a connect request. Returns pending | denied | expired, or — once approved — the app id and the API TOKEN (returned exactly once: save it to the project's .env immediately, never print it in logs). The token is SCOPED (read, invoices, subscriptions, webhooks) — it cannot move money out of the app; transfers/refunds/checks need the primary token the human holds in the Mini App. Poll every 3-5 seconds while pending.
| Parameter | Type | Description |
|---|---|---|
| poll_secret * | string | The poll_secret from the connect tool. |
{
"name": "connect_status",
"description": "Poll a connect request. Returns pending | denied | expired, or — once approved — the app id and the API TOKEN (returned exactly once: save it to the project's .env immediately, never print it in logs). The token is SCOPED (read, invoices, subscriptions, webhooks) — it cannot move money out of the app; transfers/refunds/checks need the primary token the human holds in the Mini App. Poll every 3-5 seconds while pending.",
"inputSchema": {
"type": "object",
"required": [
"poll_secret"
],
"properties": {
"poll_secret": {
"type": "string",
"description": "The poll_secret from the connect tool."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Verify the token: app id, name, webhook config, token scopes.
No parameters.
{
"name": "getMe",
"description": "Verify the token: app id, name, webhook config, token scopes.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Merchant app balance per asset (available + onhold).
No parameters.
{
"name": "getBalance",
"description": "Merchant app balance per asset (available + onhold).",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Supported crypto assets (code/name/decimals) and fiats.
No parameters.
{
"name": "getCurrencies",
"description": "Supported crypto assets (code/name/decimals) and fiats.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Current asset↔fiat display rates.
No parameters.
{
"name": "getExchangeRates",
"description": "Current asset↔fiat display rates.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}App volume/count stats for a period.
| Parameter | Type | Description |
|---|---|---|
| end_at | string | ISO 8601 period end. |
| start_at | string | ISO 8601 period start. |
{
"name": "getStats",
"description": "App volume/count stats for a period.",
"inputSchema": {
"type": "object",
"properties": {
"end_at": {
"type": "string",
"description": "ISO 8601 period end."
},
"start_at": {
"type": "string",
"description": "ISO 8601 period start."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List invoices (newest first).
| Parameter | Type | Description |
|---|---|---|
| fiat | string | Filter by fiat code. |
| asset | string | Filter by asset code. |
| count | integer | Page size (default 100). |
| offset | integer | Skip this many. |
| status | string | active | paid | expired. |
| invoice_ids | string | Comma-separated ids. |
| client_invoice_id | string | Your own id given at createInvoice. |
| parent_invoice_id | integer | The payments of this multi-payment invoice. |
{
"name": "getInvoices",
"description": "List invoices (newest first).",
"inputSchema": {
"type": "object",
"properties": {
"fiat": {
"type": "string",
"description": "Filter by fiat code."
},
"asset": {
"type": "string",
"description": "Filter by asset code."
},
"count": {
"type": "integer",
"description": "Page size (default 100)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
},
"status": {
"type": "string",
"description": "active | paid | expired."
},
"invoice_ids": {
"type": "string",
"description": "Comma-separated ids."
},
"client_invoice_id": {
"type": "string",
"description": "Your own id given at createInvoice."
},
"parent_invoice_id": {
"type": "integer",
"description": "The payments of this multi-payment invoice."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List checks.
| Parameter | Type | Description |
|---|---|---|
| asset | string | Filter by asset code. |
| count | integer | Page size (default 100). |
| offset | integer | Skip this many. |
| status | string | active | activated | expired. |
| check_ids | string | Comma-separated ids. |
{
"name": "getChecks",
"description": "List checks.",
"inputSchema": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "Filter by asset code."
},
"count": {
"type": "integer",
"description": "Page size (default 100)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
},
"status": {
"type": "string",
"description": "active | activated | expired."
},
"check_ids": {
"type": "string",
"description": "Comma-separated ids."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List app→user transfers.
| Parameter | Type | Description |
|---|---|---|
| asset | string | Filter by asset code. |
| count | integer | Page size (default 100). |
| offset | integer | Skip this many. |
| status | string | pending (parked until the recipient opens the bot) | completed | returned. |
| spend_id | string | Filter by idempotency key. |
| transfer_ids | string | Comma-separated ids. |
{
"name": "getTransfers",
"description": "List app→user transfers.",
"inputSchema": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "Filter by asset code."
},
"count": {
"type": "integer",
"description": "Page size (default 100)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
},
"status": {
"type": "string",
"description": "pending (parked until the recipient opens the bot) | completed | returned."
},
"spend_id": {
"type": "string",
"description": "Filter by idempotency key."
},
"transfer_ids": {
"type": "string",
"description": "Comma-separated ids."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List the receipts of one invoice for reconciliation: the wallet payment and every transfer that came to its payment address (paid, pending, late, review), with the amount, sender and tx hash.
| Parameter | Type | Description |
|---|---|---|
| invoice_id * | integer | The invoice id. |
{
"name": "getInvoicePayments",
"description": "List the receipts of one invoice for reconciliation: the wallet payment and every transfer that came to its payment address (paid, pending, late, review), with the amount, sender and tx hash.",
"inputSchema": {
"type": "object",
"required": [
"invoice_id"
],
"properties": {
"invoice_id": {
"type": "integer",
"description": "The invoice id."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List the app's on-chain withdrawals and their status.
| Parameter | Type | Description |
|---|---|---|
| asset | string | Filter by asset code. |
| count | integer | Page size (default 100). |
| offset | integer | Skip this many. |
| status | string | processing | completed | failed. |
| spend_id | string | Filter by idempotency key. |
| withdrawal_ids | string | Comma-separated withdrawal ids (uuid). |
{
"name": "getWithdrawals",
"description": "List the app's on-chain withdrawals and their status.",
"inputSchema": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "Filter by asset code."
},
"count": {
"type": "integer",
"description": "Page size (default 100)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
},
"status": {
"type": "string",
"description": "processing | completed | failed."
},
"spend_id": {
"type": "string",
"description": "Filter by idempotency key."
},
"withdrawal_ids": {
"type": "string",
"description": "Comma-separated withdrawal ids (uuid)."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List the app's saved withdrawal addresses (address_id, network, address, memo, when each becomes usable).
No parameters.
{
"name": "getWithdrawAddresses",
"description": "List the app's saved withdrawal addresses (address_id, network, address, memo, when each becomes usable).",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}What a withdrawal costs per asset and network: the network fee charged on top of the amount (`fee`; `fee_empty` to a never-used address where it differs) and the least amount.
| Parameter | Type | Description |
|---|---|---|
| asset | string | Only this asset. |
| network | string | Only this network code. |
{
"name": "getWithdrawFees",
"description": "What a withdrawal costs per asset and network: the network fee charged on top of the amount (`fee`; `fee_empty` to a never-used address where it differs) and the least amount.",
"inputSchema": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"description": "Only this asset."
},
"network": {
"type": "string",
"description": "Only this network code."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List the app's withdrawal links (status active | expired | deleted), newest first.
| Parameter | Type | Description |
|---|---|---|
| count | integer | Page size (default 100). |
| offset | integer | Skip this many. |
{
"name": "getWithdrawalLinks",
"description": "List the app's withdrawal links (status active | expired | deleted), newest first.",
"inputSchema": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "Page size (default 100)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Assets the app balance can be exchanged between (any two differing ones are a pair) and the USD limits.
No parameters.
{
"name": "getExchangePairs",
"description": "Assets the app balance can be exchanged between (any two differing ones are a pair) and the USD limits.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Preview an exchange of the app balance at the current rate; moves nothing.
| Parameter | Type | Description |
|---|---|---|
| amount | string | Amount of asset_from to spend (or pass amount_to). |
| asset_to * | string | Asset to buy. |
| amount_to | string | Exact amount of asset_to to receive (instead of amount); amount_from in the answer is what it costs. |
| asset_from * | string | Asset to sell. |
{
"name": "getExchangeEstimate",
"description": "Preview an exchange of the app balance at the current rate; moves nothing.",
"inputSchema": {
"type": "object",
"required": [
"asset_from",
"asset_to"
],
"properties": {
"amount": {
"type": "string",
"description": "Amount of asset_from to spend (or pass amount_to)."
},
"asset_to": {
"type": "string",
"description": "Asset to buy."
},
"amount_to": {
"type": "string",
"description": "Exact amount of asset_to to receive (instead of amount); amount_from in the answer is what it costs."
},
"asset_from": {
"type": "string",
"description": "Asset to sell."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List the app's balance exchanges.
| Parameter | Type | Description |
|---|---|---|
| count | integer | Page size (default 100). |
| offset | integer | Skip this many. |
| spend_id | string | Filter by idempotency key. |
| exchange_ids | string | Comma-separated exchange ids (uuid). |
{
"name": "getExchanges",
"description": "List the app's balance exchanges.",
"inputSchema": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "Page size (default 100)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
},
"spend_id": {
"type": "string",
"description": "Filter by idempotency key."
},
"exchange_ids": {
"type": "string",
"description": "Comma-separated exchange ids (uuid)."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List subscription plans.
No parameters.
{
"name": "getSubscriptionPlans",
"description": "List subscription plans.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}List subscriptions (subscribers).
| Parameter | Type | Description |
|---|---|---|
| count | integer | Page size (default 100, max 500). |
| offset | integer | Skip this many. |
| status | string | active | grace | cancelled | expired. |
| plan_id | integer | Filter by plan. |
| user_id | integer | Filter by Telegram user id. |
{
"name": "getSubscriptions",
"description": "List subscriptions (subscribers).",
"inputSchema": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "Page size (default 100, max 500)."
},
"offset": {
"type": "integer",
"description": "Skip this many."
},
"status": {
"type": "string",
"description": "active | grace | cancelled | expired."
},
"plan_id": {
"type": "integer",
"description": "Filter by plan."
},
"user_id": {
"type": "integer",
"description": "Filter by Telegram user id."
}
}
},
"annotations": {
"readOnlyHint": true,
"destructiveHint": false
}
}Create a one-off payment invoice; the payer opens result.mini_app_invoice_url. See the invoices doc.
| Parameter | Type | Description |
|---|---|---|
| fiat | string | Fiat code (fiat mode). |
| asset | string | Asset code (crypto mode). |
| amount | string | Decimal string in MAJOR units, e.g. "5" = 5 USDT. Never a float. Required unless open_amount is true. |
| payload | string | Opaque data echoed back in the webhook (≤4096). |
| swap_to | string | Auto-convert the received amount to this asset. |
| customer | object | |
| cancel_url | string | A «Return» link shown while the invoice is unpaid. |
| expires_in | integer | Invoice TTL in seconds. |
| description | string | Shown to the payer (≤1024). |
| open_amount | boolean | Crypto mode only: the payer chooses the amount (donation) — pass true and NO amount. |
| success_url | string | Short form of the paid button: a «Return» button to this link after the payment (not together with paid_btn_*). |
Delete an unpaid invoice.
| Parameter | Type | Description |
|---|---|---|
| invoice_id * | integer | The invoice to delete. |
{
"name": "deleteInvoice",
"description": "Delete an unpaid invoice.",
"inputSchema": {
"type": "object",
"required": [
"invoice_id"
],
"properties": {
"invoice_id": {
"type": "integer",
"description": "The invoice to delete."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true
}
}The invoice's own payment address for your checkout page: the payer sends `amount` of `asset` on `network` (plus `memo` when set) before `expires_at`; the invoice is paid by itself once it arrives. A repeat call returns the same address and never extends the window. Show the amount, the network and the deadline from the answer UNCHANGED. Money comes IN only. 409 `checkout_disabled` while the app's address payment method is off.
| Parameter | Type | Description |
|---|---|---|
| asset * | string | Asset the payer sends, e.g. USDT. |
| network * | string | Network code, e.g. TRON. |
| invoice_id * | integer | The unpaid invoice. |
{
"name": "getInvoiceAddress",
"description": "The invoice's own payment address for your checkout page: the payer sends `amount` of `asset` on `network` (plus `memo` when set) before `expires_at`; the invoice is paid by itself once it arrives. A repeat call returns the same address and never extends the window. Show the amount, the network and the deadline from the answer UNCHANGED. Money comes IN only. 409 `checkout_disabled` while the app's address payment method is off.",
"inputSchema": {
"type": "object",
"required": [
"invoice_id",
"asset",
"network"
],
"properties": {
"asset": {
"type": "string",
"description": "Asset the payer sends, e.g. USDT."
},
"network": {
"type": "string",
"description": "Network code, e.g. TRON."
},
"invoice_id": {
"type": "integer",
"description": "The unpaid invoice."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Set or clear the description an active check's page shows. No money moves.
| Parameter | Type | Description |
|---|---|---|
| check_id * | integer | The check to edit. |
| description | string | The new text (≤1024); empty clears it. |
{
"name": "editCheck",
"description": "Set or clear the description an active check's page shows. No money moves.",
"inputSchema": {
"type": "object",
"required": [
"check_id"
],
"properties": {
"check_id": {
"type": "integer",
"description": "The check to edit."
},
"description": {
"type": "string",
"description": "The new text (≤1024); empty clears it."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}A link that opens the wallet's Withdraw form for the PERSON who taps it, with your address (and optionally network, amount, memo) filled in — they confirm the withdrawal from their own balance. No app money moves. 403 `withdrawal_link_unavailable` while the feature is off.
| Parameter | Type | Description |
|---|---|---|
| memo | string | Memo / tag, on networks that have one. |
| asset * | string | Asset code. |
| amount | string | Decimal string in MAJOR units, e.g. "5" = 5 USDT. Never a float. Optional. |
| address * | string | The address to receive at. |
| network | string | Network code; needed only when the address fits several. |
| expires_in | integer | Seconds the link works (60..2592000, default 86400). |
{
"name": "createWithdrawalLink",
"description": "A link that opens the wallet's Withdraw form for the PERSON who taps it, with your address (and optionally network, amount, memo) filled in — they confirm the withdrawal from their own balance. No app money moves. 403 `withdrawal_link_unavailable` while the feature is off.",
"inputSchema": {
"type": "object",
"required": [
"asset",
"address"
],
"properties": {
"memo": {
"type": "string",
"description": "Memo / tag, on networks that have one."
},
"asset": {
"type": "string",
"description": "Asset code."
},
"amount": {
"type": "string",
"description": "Decimal string in MAJOR units, e.g. \"5\" = 5 USDT. Never a float. Optional."
},
"address": {
"type": "string",
"description": "The address to receive at."
},
"network": {
"type": "string",
"description": "Network code; needed only when the address fits several."
},
"expires_in": {
"type": "integer",
"description": "Seconds the link works (60..2592000, default 86400)."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Switch a withdrawal link off before its term — it stops opening the form at once.
| Parameter | Type | Description |
|---|---|---|
| link_id * | string | The link to switch off. |
{
"name": "deleteWithdrawalLink",
"description": "Switch a withdrawal link off before its term — it stops opening the form at once.",
"inputSchema": {
"type": "object",
"required": [
"link_id"
],
"properties": {
"link_id": {
"type": "string",
"description": "The link to switch off."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Delete an unclaimed check (refunds the hold).
| Parameter | Type | Description |
|---|---|---|
| check_id * | integer | The check to delete. |
{
"name": "deleteCheck",
"description": "Delete an unclaimed check (refunds the hold).",
"inputSchema": {
"type": "object",
"required": [
"check_id"
],
"properties": {
"check_id": {
"type": "integer",
"description": "The check to delete."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true
}
}Create an IMMUTABLE recurring-billing plan; send payers to result.mini_app_subscribe_url. See the subscriptions doc.
| Parameter | Type | Description |
|---|---|---|
| name * | string | Plan name shown to payers (≤64). |
| asset * | string | Asset code, e.g. USDT. |
| amount * | string | Decimal string in MAJOR units, e.g. "5" = 5 USDT. Never a float. Charged per period. |
| period_days * | integer | Billing period in days. |
{
"name": "createSubscriptionPlan",
"description": "Create an IMMUTABLE recurring-billing plan; send payers to result.mini_app_subscribe_url. See the subscriptions doc.",
"inputSchema": {
"type": "object",
"required": [
"name",
"asset",
"amount",
"period_days"
],
"properties": {
"name": {
"type": "string",
"description": "Plan name shown to payers (≤64)."
},
"asset": {
"type": "string",
"description": "Asset code, e.g. USDT."
},
"amount": {
"type": "string",
"description": "Decimal string in MAJOR units, e.g. \"5\" = 5 USDT. Never a float. Charged per period."
},
"period_days": {
"type": "integer",
"description": "Billing period in days."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Stop new signups for a plan (live subscriptions keep renewing).
| Parameter | Type | Description |
|---|---|---|
| plan_id * | integer | The plan to archive. |
{
"name": "archiveSubscriptionPlan",
"description": "Stop new signups for a plan (live subscriptions keep renewing).",
"inputSchema": {
"type": "object",
"required": [
"plan_id"
],
"properties": {
"plan_id": {
"type": "integer",
"description": "The plan to archive."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}Stop future charges for one subscription (paid time runs out).
| Parameter | Type | Description |
|---|---|---|
| subscription_id * | integer | The subscription. |
{
"name": "cancelSubscription",
"description": "Stop future charges for one subscription (paid time runs out).",
"inputSchema": {
"type": "object",
"required": [
"subscription_id"
],
"properties": {
"subscription_id": {
"type": "integer",
"description": "The subscription."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true
}
}Update app name / webhook_url (https) / webhook_events opt-in list. Needs the 'webhooks' scope (the connect-issued token has it) or the primary token. See the webhooks doc for the event types and signature verification.
| Parameter | Type | Description |
|---|---|---|
| name | string | New app name (1-64). |
| webhook_url | string | https URL for webhook delivery; "" clears it. |
| webhook_events | array | Extended event types to opt into (invoice_paid is always delivered); [] = invoice_paid-only. |
{
"name": "updateApp",
"description": "Update app name / webhook_url (https) / webhook_events opt-in list. Needs the 'webhooks' scope (the connect-issued token has it) or the primary token. See the webhooks doc for the event types and signature verification.",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "New app name (1-64)."
},
"webhook_url": {
"type": "string",
"description": "https URL for webhook delivery; \"\" clears it."
},
"webhook_events": {
"type": "array",
"items": {
"type": "string",
"description": "Event type."
},
"description": "Extended event types to opt into (invoice_paid is always delivered); [] = invoice_paid-only."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}TgPay Crypto Merchant API — crypto payments inside Telegram. Read get_docs('quickstart') before integrating. No API token yet? Call connect — the human approves once in Telegram — then poll connect_status; afterwards pass the token via the 'TgPayCrypto-API-Token' header on this MCP server, or as an extra 'api_token' argument on any tool. Amounts are decimal strings in major units; user_id is the Telegram user id.
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.
| webhook_url | string | This operation's own https webhook address — its updates go there instead of the app's `webhook_url`. |
| max_payments | integer | Multi-payment invoice (2..1000000): the link takes this many payments, each one its own invoice with `parent_invoice_id`; wallet payments only. |
| paid_btn_url | string | URL for the paid button. |
| currency_type | string | crypto (default) | fiat. |
| paid_btn_name | string | viewItem | openChannel | openBot | callback. |
| allow_comments | boolean | Default true. |
| hidden_message | string | Revealed to the payer ONLY after payment (≤2048). |
| accepted_assets | string | Fiat mode: comma-separated assets the payer may pay in. |
| allow_anonymous | boolean | Default true. |
| client_invoice_id | string | Your own id of the invoice (≤64, unique per app): a create that repeats it returns the existing invoice; `getInvoices {client_invoice_id}` finds it. |
| rate_lock_seconds | integer | Fiat mode: freeze crypto quotes for this long. |
{
"name": "createInvoice",
"description": "Create a one-off payment invoice; the payer opens result.mini_app_invoice_url. See the invoices doc.",
"inputSchema": {
"type": "object",
"properties": {
"fiat": {
"type": "string",
"description": "Fiat code (fiat mode)."
},
"asset": {
"type": "string",
"description": "Asset code (crypto mode)."
},
"amount": {
"type": "string",
"description": "Decimal string in MAJOR units, e.g. \"5\" = 5 USDT. Never a float. Required unless open_amount is true."
},
"payload": {
"type": "string",
"description": "Opaque data echoed back in the webhook (≤4096)."
},
"swap_to": {
"type": "string",
"description": "Auto-convert the received amount to this asset."
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The buyer's id in your system."
},
"email": {
"type": "string",
"description": "The buyer's email."
},
"telegram_id": {
"type": "string",
"description": "The buyer's Telegram id."
},
"telegram_username": {
"type": "string",
"description": "Without @."
}
}
},
"cancel_url": {
"type": "string",
"description": "A «Return» link shown while the invoice is unpaid."
},
"expires_in": {
"type": "integer",
"description": "Invoice TTL in seconds."
},
"description": {
"type": "string",
"description": "Shown to the payer (≤1024)."
},
"open_amount": {
"type": "boolean",
"description": "Crypto mode only: the payer chooses the amount (donation) — pass true and NO amount."
},
"success_url": {
"type": "string",
"description": "Short form of the paid button: a «Return» button to this link after the payment (not together with paid_btn_*)."
},
"webhook_url": {
"type": "string",
"description": "This operation's own https webhook address — its updates go there instead of the app's `webhook_url`."
},
"max_payments": {
"type": "integer",
"description": "Multi-payment invoice (2..1000000): the link takes this many payments, each one its own invoice with `parent_invoice_id`; wallet payments only."
},
"paid_btn_url": {
"type": "string",
"description": "URL for the paid button."
},
"currency_type": {
"type": "string",
"description": "crypto (default) | fiat."
},
"paid_btn_name": {
"type": "string",
"description": "viewItem | openChannel | openBot | callback."
},
"allow_comments": {
"type": "boolean",
"description": "Default true."
},
"hidden_message": {
"type": "string",
"description": "Revealed to the payer ONLY after payment (≤2048)."
},
"accepted_assets": {
"type": "string",
"description": "Fiat mode: comma-separated assets the payer may pay in."
},
"allow_anonymous": {
"type": "boolean",
"description": "Default true."
},
"client_invoice_id": {
"type": "string",
"description": "Your own id of the invoice (≤64, unique per app): a create that repeats it returns the existing invoice; `getInvoices {client_invoice_id}` finds it."
},
"rate_lock_seconds": {
"type": "integer",
"description": "Fiat mode: freeze crypto quotes for this long."
}
}
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": false
}
}