# TgPay Merchant API [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://app.tgpaycrypto.com/mcp  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tgpay-merchant-api-3

## Description
Accept crypto payments via the TgPay Merchant API — invoices, subscriptions, webhooks.

## Tools
Capabilities this server exposes over MCP:

- **get_docs** — Read a TgPay Crypto Merchant API integration doc. START HERE before integrating: topics quickstart, invoices, subscriptions, transfers-checks, webhooks, errors.
- **connect** — 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.
- **connect_status** — 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.
- **getMe** — Verify the token: app id, name, webhook config, token scopes.
- **getBalance** — Merchant app balance per asset (available + onhold).
- **getCurrencies** — Supported crypto assets (code/name/decimals) and fiats.
- **getExchangeRates** — Current asset↔fiat display rates.
- **getStats** — App volume/count stats for a period.
- **getInvoices** — List invoices (newest first).
- **getChecks** — List checks.
- **getTransfers** — List app→user transfers.
- **getInvoicePayments** — 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.
- **getWithdrawals** — List the app's on-chain withdrawals and their status.
- **getWithdrawAddresses** — List the app's saved withdrawal addresses (address_id, network, address, memo, when each becomes usable).
- **getWithdrawFees** — 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.
- **getWithdrawalLinks** — List the app's withdrawal links (status active | expired | deleted), newest first.
- **getExchangePairs** — Assets the app balance can be exchanged between (any two differing ones are a pair) and the USD limits.
- **getExchangeEstimate** — Preview an exchange of the app balance at the current rate; moves nothing.
- **getExchanges** — List the app's balance exchanges.
- **getSubscriptionPlans** — List subscription plans.
- **getSubscriptions** — List subscriptions (subscribers).
- **createInvoice** — Create a one-off payment invoice; the payer opens result.mini_app_invoice_url. See the invoices doc.
- **deleteInvoice** — Delete an unpaid invoice.
- **getInvoiceAddress** — 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.
- **editCheck** — Set or clear the description an active check's page shows. No money moves.
- **createWithdrawalLink** — 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.
- **deleteWithdrawalLink** — Switch a withdrawal link off before its term — it stops opening the form at once.
- **deleteCheck** — Delete an unclaimed check (refunds the hold).
- **createSubscriptionPlan** — Create an IMMUTABLE recurring-billing plan; send payers to result.mini_app_subscribe_url. See the subscriptions doc.
- **archiveSubscriptionPlan** — Stop new signups for a plan (live subscriptions keep renewing).
- **cancelSubscription** — Stop future charges for one subscription (paid time runs out).
- **updateApp** — 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.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "tgpay-merchant-api": {
    "url": "https://app.tgpaycrypto.com/mcp"
  }
}
```

## Documentation

## What TgPay Merchant API does

TgPay Merchant API connects MCP clients to the TgPay Crypto Merchant API for crypto payment operations. It supports both read and write actions across merchant apps, including invoice creation, subscription-plan management, payment reconciliation, and withdrawal-link handling.

The server can also expose operational data such as balances by asset, supported crypto and fiat currencies, exchange rates, period statistics, transfers, checks, withdrawals, saved withdrawal addresses, exchange activity, and subscription records. Webhook configuration and token scopes can be inspected through the merchant-app identity tool.

## How it works

Clients connect to the hosted MCP endpoint:

`https://app.tgpaycrypto.com/mcp`

Tools are invoked through MCP rather than through direct REST calls. If an API token is not configured, `connect` starts a merchant-app authorization request and returns a Telegram approval link. A human approves the request in the `@tgpaycryptobot` bot, after which `connect_status` is polled with the returned `poll_secret`. Polling should occur every three to five seconds while the request remains pending. On approval, the API token is returned once and should be saved immediately in the project environment without logging it.

The token issued through this flow is scoped to reading data, invoices, subscriptions, and webhooks. It cannot move money out of the app. Transfers, refunds, and checks that require the primary token must use the token held by the human in the TgPay Mini App.

## Tools and capabilities

- Read integration guidance with `get_docs`, covering quickstart, invoices, subscriptions, transfers and checks, webhooks, and errors. This is intended as the starting point for an integration.
- Verify the connected app with `getMe`, including its ID, name, webhook configuration, and token scopes.
- Inspect balances, supported assets, fiat currencies, exchange rates, and time-period statistics.
- List invoices, checks, transfers, withdrawals, withdrawal addresses, withdrawal links, subscription plans, subscriptions, exchanges, and invoice payment receipts.
- Create one-off invoices and retrieve an invoice-specific payment address for a checkout page. The address response includes the asset, network, amount, memo when applicable, and payment deadline.
- Create immutable recurring-billing plans, archive plans to stop new signups, and manage subscription records.
- Edit or delete eligible checks, create or disable withdrawal links, and preview balance exchanges without moving funds.
- Review withdrawal fees, minimum amounts, address-specific fee differences, exchange pairs, and exchange estimates.

## Limitations and notes

Invoice payment addresses are for incoming funds only. A repeated request returns the same address and does not extend its expiry window. The checkout address method can return `checkout_disabled` when the app has disabled that payment method.

Withdrawal links open a withdrawal form for the person who taps the link; the person's wallet balance is used, so creating one does not move app funds. The feature can return `withdrawal_link_unavailable` when disabled.

A withdrawal, transfer, refund, or check operation may require the primary token rather than the scoped token issued by `connect`. Subscription plans are immutable after creation; archiving prevents new signups while existing subscriptions continue renewing. Deleting an unpaid invoice removes it, and deleting an unclaimed check refunds its hold.

For payment reconciliation, `getInvoicePayments` reports the wallet payment and transfers received at the invoice payment address, including payment state, amount, sender, and transaction hash. Invoice checkout details such as amount, network, and deadline should be presented unchanged from the tool response.

_Full upstream README: https://allmcps.com/mcp/tgpay-merchant-api-3/readme_

