TgPay Merchant API

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

Sollte ich dies verwenden

Qualität und Sicherheit

A
Qualität der Beschreibung
92%
Vollständigkeit des Schemas
79%
Qualität der Benennung
97%
Risiko der Vergiftung
100%
Übereinstimmung der Berechtigungen
100%
Einhaltung des Protokolls
100%

Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.

Kontextkosten

~2,134Tokens (Tool-Definitionen)
~731 BTypische Antwortgröße
Mittlere Auswirkung auf die Aufmerksamkeit (1.67% von 128k Kontext)

Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.

Installieren

Installation mit einem Klick

Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:

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

Remote-Endpunkte

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

Was es kann

Tool-Inventar

Tools (20)

🟢 Nur lesen🟡 Schreiben🔴 Löschen⚪ Unbekannt
🟢get_docs(topic)

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

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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.

Eingabe-Schema

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

Merchant app balance per asset (available + onhold).

Eingabe-Schema

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

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

Eingabe-Schema

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

Current asset↔fiat display rates.

Eingabe-Schema

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

App volume/count stats for a period.

Eingabe-Schema

{
  "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).

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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.

Eingabe-Schema

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

List subscriptions (subscribers).

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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).

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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).

Eingabe-Schema

{
  "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).

Eingabe-Schema

{
  "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.

Eingabe-Schema

{
  "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."
      }
    }
  }
}

Community

Diesen Server bewerten

Nachweis

Aktuelle Beobachtungen

verifiziertVersion nicht aufgezeichnet20 Tools
verifiziertVersion nicht aufgezeichnet20 Tools
verifiziertVersion nicht aufgezeichnet20 Tools
verifiziertVersion nicht aufgezeichnet20 Tools
verifiziertVersion nicht aufgezeichnet20 Tools
verifiziertVersion nicht aufgezeichnet20 Tools