TgPay Merchant API

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

사용해야 할까요

품질 및 안전성

A
설명 품질
92%
스키마 완전성
79%
이름 품질
97%
오염 위험
100%
권한 일치
100%
프로토콜 준수
100%

도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.

컨텍스트 비용

~2,134토큰 (도구 정의)
~731 B일반적인 응답 크기
중간 정도의 주의 영향 (128k 컨텍스트의 1.67%)

이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.

설치

원클릭 설치

`claude_desktop_config.json` 파일에 다음을 추가하세요:

{
  "mcpServers": {
    "merchant-api": {
      "url": "https://crypto.tgpaybot.com/mcp"
    }
  }
}

원격 엔드포인트

https://crypto.tgpaybot.com/mcpstreamable-http
https://app.tgcryptopay.com/mcpstreamable-http
https://app.tgpaycrypto.com/mcpstreamable-http

할 수 있는 일

도구 목록

도구 (20)

🟢 읽기 전용🟡 쓰기🔴 삭제⚪ 알 수 없음
🟢get_docs(topic)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "topic": {
      "type": "string",
      "description": "quickstart | invoices | subscriptions | transfers-checks | webhooks | errors"
    }
  },
  "required": [
    "topic"
  ]
}
🟢connect(app_name)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "app_name": {
      "type": "string",
      "description": "Merchant app name shown to the approving human, 1-64 chars (e.g. the project/bot name)."
    }
  },
  "required": [
    "app_name"
  ]
}
🟡connect_status(poll_secret)

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.

입력 스키마

{
  "type": "object",
  "properties": {
    "poll_secret": {
      "type": "string",
      "description": "The poll_secret from the connect tool."
    }
  },
  "required": [
    "poll_secret"
  ]
}
🟢getMe

Verify the token: app id, name, webhook config, token scopes.

입력 스키마

{
  "type": "object",
  "properties": {}
}
🟢getBalance

Merchant app balance per asset (available + onhold).

입력 스키마

{
  "type": "object",
  "properties": {}
}
🟢getCurrencies

Supported crypto assets (code/name/decimals) and fiats.

입력 스키마

{
  "type": "object",
  "properties": {}
}
🟢getExchangeRates

Current asset↔fiat display rates.

입력 스키마

{
  "type": "object",
  "properties": {}
}
🟢getStats(start_at, end_at)

App volume/count stats for a period.

입력 스키마

{
  "type": "object",
  "properties": {
    "start_at": {
      "type": "string",
      "description": "ISO 8601 period start."
    },
    "end_at": {
      "type": "string",
      "description": "ISO 8601 period end."
    }
  }
}
🟢getInvoices(asset, fiat, invoice_ids, status, offset, ...)

List invoices (newest first).

입력 스키마

{
  "type": "object",
  "properties": {
    "asset": {
      "type": "string",
      "description": "Filter by asset code."
    },
    "fiat": {
      "type": "string",
      "description": "Filter by fiat code."
    },
    "invoice_ids": {
      "type": "string",
      "description": "Comma-separated ids."
    },
    "status": {
      "type": "string",
      "description": "active | paid | expired."
    },
    "offset": {
      "type": "integer",
      "description": "Skip this many."
    },
    "count": {
      "type": "integer",
      "description": "Page size (default 100)."
    }
  }
}
🟢getChecks(asset, check_ids, status, offset, count)

List checks.

입력 스키마

{
  "type": "object",
  "properties": {
    "asset": {
      "type": "string",
      "description": "Filter by asset code."
    },
    "check_ids": {
      "type": "string",
      "description": "Comma-separated ids."
    },
    "status": {
      "type": "string",
      "description": "active | activated."
    },
    "offset": {
      "type": "integer",
      "description": "Skip this many."
    },
    "count": {
      "type": "integer",
      "description": "Page size (default 100)."
    }
  }
}
🟢getTransfers(asset, transfer_ids, spend_id, offset, count)

List app→user transfers.

입력 스키마

{
  "type": "object",
  "properties": {
    "asset": {
      "type": "string",
      "description": "Filter by asset code."
    },
    "transfer_ids": {
      "type": "string",
      "description": "Comma-separated ids."
    },
    "spend_id": {
      "type": "string",
      "description": "Filter by idempotency key."
    },
    "offset": {
      "type": "integer",
      "description": "Skip this many."
    },
    "count": {
      "type": "integer",
      "description": "Page size (default 100)."
    }
  }
}
🟢getSubscriptionPlans

List subscription plans.

입력 스키마

{
  "type": "object",
  "properties": {}
}
🟢getSubscriptions(plan_id, user_id, status)

List subscriptions (subscribers).

입력 스키마

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "integer",
      "description": "Filter by plan."
    },
    "user_id": {
      "type": "integer",
      "description": "Filter by Telegram user id."
    },
    "status": {
      "type": "string",
      "description": "active | grace | cancelled | expired."
    }
  }
}
🟡createInvoice(currency_type, asset, amount, fiat, accepted_assets, ...)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "currency_type": {
      "type": "string",
      "description": "crypto (default) | fiat."
    },
    "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. Omit for an open-amount invoice."
    },
    "fiat": {
      "type": "string",
      "description": "Fiat code (fiat mode)."
    },
    "accepted_assets": {
      "type": "string",
      "description": "Fiat mode: comma-separated assets the payer may pay in."
    },
    "rate_lock_seconds": {
      "type": "integer",
      "description": "Fiat mode: freeze crypto quotes for this long."
    },
    "description": {
      "type": "string",
      "description": "Shown to the payer (≤1024)."
    },
    "hidden_message": {
      "type": "string",
      "description": "Revealed to the payer ONLY after payment (≤2048)."
    },
    "payload": {
      "type": "string",
      "description": "Opaque data echoed back in the webhook (≤4096)."
    },
    "paid_btn_name": {
      "type": "string",
      "description": "viewItem | openChannel | openBot | callback."
    },
    "paid_btn_url": {
      "type": "string",
      "description": "URL for the paid button."
    },
    "allow_comments": {
      "type": "boolean",
      "description": "Default true."
    },
    "allow_anonymous": {
      "type": "boolean",
      "description": "Default true."
    },
    "expires_in": {
      "type": "integer",
      "description": "Invoice TTL in seconds."
    },
    "swap_to": {
      "type": "string",
      "description": "Auto-convert the received amount to this asset."
    }
  }
}
🔴deleteInvoice(invoice_id)

Delete an unpaid invoice.

입력 스키마

{
  "type": "object",
  "properties": {
    "invoice_id": {
      "type": "integer",
      "description": "The invoice to delete."
    }
  },
  "required": [
    "invoice_id"
  ]
}
🔴deleteCheck(check_id)

Delete an unclaimed check (refunds the hold).

입력 스키마

{
  "type": "object",
  "properties": {
    "check_id": {
      "type": "integer",
      "description": "The check to delete."
    }
  },
  "required": [
    "check_id"
  ]
}
🟡createSubscriptionPlan(name, asset, amount, period_days)

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

입력 스키마

{
  "type": "object",
  "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."
    }
  },
  "required": [
    "name",
    "asset",
    "amount",
    "period_days"
  ]
}
⚪archiveSubscriptionPlan(plan_id)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "integer",
      "description": "The plan to archive."
    }
  },
  "required": [
    "plan_id"
  ]
}
🔴cancelSubscription(subscription_id)

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

입력 스키마

{
  "type": "object",
  "properties": {
    "subscription_id": {
      "type": "integer",
      "description": "The subscription."
    }
  },
  "required": [
    "subscription_id"
  ]
}
🟡updateApp(name, webhook_url, webhook_events)

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.

입력 스키마

{
  "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",
      "description": "Extended event types to opt into (invoice_paid is always delivered); [] = invoice_paid-only.",
      "items": {
        "type": "string",
        "description": "Event type."
      }
    }
  }
}

커뮤니티

이 서버 평가하기

증거

최근 관측

검증됨버전이 기록되지 않음도구 20개
검증됨버전이 기록되지 않음도구 20개
검증됨버전이 기록되지 않음도구 20개
검증됨버전이 기록되지 않음도구 20개
검증됨버전이 기록되지 않음도구 20개
검증됨버전이 기록되지 않음도구 20개