TgPay Merchant API

com.tgpaybot由 tgpaybot.com 发布v1.0.2更新于 Oct 24, 2026

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

已验证Streamable HTTP可网页运行金融开发者工具商业与电商

概览

AI 生成的概览

TgPay Merchant API MCP 服务器,让助手创建加密货币发票和订阅计划、查看余额与统计,并管理 webhook。

可以做什么
阅读集成文档,核验商户令牌及其权限范围、应用信息和 webhook 配置,以及支持的资产与汇率。查看各资产余额、交易量与笔数统计,并列出发票、支票、转账、订阅计划和订阅者。创建一次性付款发票,删除未付款发票。创建不可更改的定期计费计划、归档计划并取消单个订阅。更新应用名称、webhook 地址和 webhook 事件订阅列表。通过 Telegram 审批链接发起令牌签发,并轮询获取带权限范围的令牌。
适用场景
适用于商户希望由助手处理 TgPay 加密货币支付事务的场景:开具发票、设置或管理订阅、查看余额与统计,或配置 webhook。集成前应先从文档工具入手。
运行要求
以远程 streamable HTTP 端点形式运行于 app.tgpaycrypto.com,无需本地安装包。需要一个 TgPay 商户应用。认证可选:提供 TgPayCrypto-API-Token 请求头,或省略它并使用 connect 工具,该工具会返回 Telegram 审批链接和用于 connect_status 的 poll_secret。需要能访问该端点和 Telegram 的网络。
安装前请注意
connect 流程只返回一次 API 令牌,应立即保存到项目的 .env,切勿打印到日志中。connect 签发的令牌权限限于读取、发票、订阅和 webhook,无法将资金转出应用。相关工具会创建发票和计划、删除未付款发票和未领取的支票、取消订阅并更改 webhook 设置,这些写入操作会影响真实支付流程。订阅计划创建后不可更改。

安装

在 SourceWeft 中

  1. 打开 控制台中的 TgPay Merchant API,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/com.tgpaybot%2Fmerchant-api/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "tgpay-merchant-api": {
      "type": "http",
      "url": "https://app.tgpaycrypto.com/mcp"
    }
  }
}

工具

20

get_docs

Read a TgPay Merchant API integration doc. START HERE before integrating: topics quickstart, invoices, subscriptions, transfers-checks, webhooks, errors.

输入参数topic必填

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 in the @tgpaycryptobot bot — then call connect_status with the poll_secret. Use only when no API token is configured yet.

输入参数app_name必填

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.

输入参数poll_secret必填

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.

输入参数end_atstart_at

getInvoices

List invoices (newest first).

输入参数fiatassetcountoffsetstatusinvoice_ids

getChecks

List checks.

输入参数assetcountoffsetstatuscheck_ids

getTransfers

List app→user transfers.

输入参数assetcountoffsetspend_idtransfer_ids

getSubscriptionPlans

List subscription plans.

无需输入参数。

getSubscriptions

List subscriptions (subscribers).

输入参数statusplan_iduser_id

createInvoice

Create a one-off payment invoice; the payer opens result.mini_app_invoice_url. See the invoices doc.

输入参数fiatassetamountpayloadswap_toexpires_indescriptionpaid_btn_urlcurrency_typepaid_btn_nameallow_commentshidden_message另有 3 个

deleteInvoice

Delete an unpaid invoice.

输入参数invoice_id必填

deleteCheck

Delete an unclaimed check (refunds the hold).

输入参数check_id必填

createSubscriptionPlan

Create an IMMUTABLE recurring-billing plan; send payers to result.mini_app_subscribe_url. See the subscriptions doc.

输入参数name必填asset必填amount必填period_days必填

archiveSubscriptionPlan

Stop new signups for a plan (live subscriptions keep renewing).

输入参数plan_id必填

cancelSubscription

Stop future charges for one subscription (paid time runs out).

输入参数subscription_id必填

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.

输入参数namewebhook_urlwebhook_events

版本历史

1
  1. v1.0.2最新Sep 16, 2026

评分

已满足适用检查项的 72%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分

    请在注册中心条目中发布图标。

  • 文档15 分

    请声明包含 README 的 GitHub 仓库,或在 OAuth 受保护资源元数据中提供 resource_documentation。

  • 许可证不适用

    托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。