Telegram · Capability

Telegram Bot API — Payments

Telegram Bot API — Payments. 3 operations. Lead operation: Answer Pre-Checkout Query. Self-contained Naftiko capability covering one Telegram business surface.

Run with Naftiko TelegramPayments

What You Can Do

POST
Answerprecheckoutquery — Answer Pre-Checkout Query
/v1/answerprecheckoutquery
POST
Answershippingquery — Answer Shipping Query
/v1/answershippingquery
POST
Sendinvoice — Send Invoice
/v1/sendinvoice

MCP Tools

answer-pre-checkout-query

Answer Pre-Checkout Query

read-only
answer-shipping-query

Answer Shipping Query

read-only
send-invoice

Send Invoice

Capability Spec

bot-payments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Telegram Bot API — Payments
  description: 'Telegram Bot API — Payments. 3 operations. Lead operation: Answer Pre-Checkout Query. Self-contained Naftiko
    capability covering one Telegram business surface.'
  tags:
  - Telegram
  - Payments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TELEGRAM_API_KEY: TELEGRAM_API_KEY
capability:
  consumes:
  - type: http
    namespace: bot-payments
    baseUri: https://api.telegram.org/bot{token}
    description: Telegram Bot API — Payments business capability. Self-contained, no shared references.
    resources:
    - name: answerPreCheckoutQuery
      path: /answerPreCheckoutQuery
      operations:
      - name: answerprecheckoutquery
        method: POST
        description: Answer Pre-Checkout Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: answerShippingQuery
      path: /answerShippingQuery
      operations:
      - name: answershippingquery
        method: POST
        description: Answer Shipping Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: sendInvoice
      path: /sendInvoice
      operations:
      - name: sendinvoice
        method: POST
        description: Send Invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: token
      value: '{{env.TELEGRAM_API_KEY}}'
      placement: path
  exposes:
  - type: rest
    namespace: bot-payments-rest
    port: 8080
    description: REST adapter for Telegram Bot API — Payments. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/answerprecheckoutquery
      name: answerprecheckoutquery
      description: REST surface for answerPreCheckoutQuery.
      operations:
      - method: POST
        name: answerprecheckoutquery
        description: Answer Pre-Checkout Query
        call: bot-payments.answerprecheckoutquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/answershippingquery
      name: answershippingquery
      description: REST surface for answerShippingQuery.
      operations:
      - method: POST
        name: answershippingquery
        description: Answer Shipping Query
        call: bot-payments.answershippingquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/sendinvoice
      name: sendinvoice
      description: REST surface for sendInvoice.
      operations:
      - method: POST
        name: sendinvoice
        description: Send Invoice
        call: bot-payments.sendinvoice
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: bot-payments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Telegram Bot API — Payments. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: answer-pre-checkout-query
      description: Answer Pre-Checkout Query
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: bot-payments.answerprecheckoutquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: answer-shipping-query
      description: Answer Shipping Query
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: bot-payments.answershippingquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: send-invoice
      description: Send Invoice
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: bot-payments.sendinvoice
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.