TgPay Crypto Transfers API

Payouts to Telegram users from the app balance.

GitHub OpenAPI

Operations 3

POST /transfer Pay out to a Telegram user #
POST /transferBatch Batch payouts #
GET /getTransfers List transfers #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tgpaycrypto-com:tgpaycrypto-com-transfers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

tgpaycrypto-com-transfers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TgPay Crypto Merchant Transfers API
  version: '2026-11-16'
  summary: Merchant payments API of the TgPay Crypto wallet (@tgpaycryptobot).
  description: 'The Merchant API of TgPay Crypto (@tgpaycryptobot): create

    invoices, refund them, send payouts and checks, withdraw the app

    balance on-chain, exchange it between assets, issue withdrawal links,

    manage recurring subscriptions, and receive signed webhooks. Human-readable documentation: https://docs.tgpaycrypto.com/crypto-pay-api-reference/


    ## Conventions


    - **Authentication** — send your token in `TgPayCrypto-API-Token`. `TgCryptoPay-API-Token` and `Crypto-Pay-API-Token` are accepted aliases,

    in that order. The first non-empty header wins. Full-access primary

    tokens have every scope except `withdraw`; restricted tokens need the

    operation''s scope, and only a restricted token can hold `withdraw`. - **Envelope** — application success is HTTP 200 with `{ok: true, result}`;

    application errors are `{ok: false, error: {code, name}}`, with `code`

    equal to the HTTP status. Branch on `error.name`. Transport/framework

    rejections, such as malformed typed query parameters, may lack this envelope. - **Amounts** — requests use decimal strings in whole-coin or fiat units,

    never JSON numbers. Crypto input is rounded to the asset''s minor unit,

    with midpoint rounding away from zero; the result must be positive. Fiat input must represent a positive exact number of cents, at most

    10^13 whole fiat units. Responses use fixed-point strings; balance and

    fee amounts can be zero. `*_minor` values are integer strings. `getCurrencies` supplies asset decimals. Send exact asset precision. - **POST parameters** — JSON object, form-urlencoded body, or URL query

    parameters; body values override query values, including null. Repeated

    form/query keys use the last value. Multipart is rejected. Money-moving

    methods have no GET aliases. Nested `items` and `recipients` must be

    JSON arrays in a JSON body; JSON-encoded strings do not work for them. Required fields must be present after merging query and body. Optional null values generally behave as omitted; per-field rules apply. Integers accept integer strings; booleans also accept 1/0 and the strings

    true/false, 1/0, yes/no, on/off (case-insensitive, surrounding whitespace ignored). Text limits are measured in UTF-16 code units by the server. - **Idempotency** — `spend_id` is required for transfers, batch items,

    withdraw and exchange, optional for checks and refunds. Empty/null

    optional keys disable replay. Keys are scoped per app and operation;

    transfer, transferBatch and withdraw share a namespace, exchange has its

    own. After validation and access gates, the same parsed request

    replays its stored success. Different input returns `409 idempotency_conflict`;

    an unfinished claim returns `409 idempotency_in_progress`. Amount strings

    and recipient spelling are not normalized for the request hash: keep them

    identical on retries. Replays are snapshots, not refreshed objects; use

    list methods to obtain current status. createInvoice and plan creation

    have no spend_id idempotency; createInvoice''s retry key is

    `client_invoice_id`. - **Per-operation webhook and payload** — createInvoice, createCheck,

    transfer, each transferBatch item and withdraw accept `webhook_url`

    (a public HTTPS URL, up to 256 characters): every update of that

    operation goes there instead of the app''s URL, regardless of the app''s

    event selection. It is not returned in objects. createCheck, transfer,

    transferBatch items and withdraw also accept `payload` (up to 4096

    characters), echoed in the object and its webhooks. - **Pagination** — invoices, checks, transfers, withdrawals, exchanges and

    withdrawal links default to offset 0, count 100; the server clamps

    offset to at least 0 and count to 1..1000. Subscriptions clamp count to 1..500. These lists return `{items: [...]}`,

    newest first. getSubscriptionPlans returns all plans without pagination. - **Timestamps** — ISO-8601 strings; nullable timestamps are explicitly null.'
servers:
- url: https://app.tgpaycrypto.com/pay/api
  description: Production
- url: https://testnet.tgpaycrypto.com/pay/api
  description: Testnet — coins with no value, its own bot @tgpaycrypto_testnet_bot and its own apps and tokens
security:
- apiToken: []
- apiTokenLegacy: []
- apiTokenCompat: []
tags:
- name: Transfers
  description: Payouts to Telegram users from the app balance.
paths:
  /transfer:
    post:
      tags:
      - Transfers
      operationId: transfer
      summary: Pay out to a Telegram user
      description: 'Scope: `payouts`. Rate limit: 30/min per app. Shared payout restrictions apply.


        Provide exactly one non-null recipient: user_id or username. A numeric id

        must belong to an existing available user. A known username settles at once;

        an unknown valid username creates a pending payout held in escrow. Forward

        invite_url to the recipient. On claim it becomes completed; expiry processing

        returns unclaimed funds to the app and sets returned. Read expires_at from

        the response and track final status via getTransfers or opt-in terminal

        webhooks. transfer sends to Telegram recipients; on-chain addresses use withdraw.


        spend_id is required. Retrying replays the original response, even if a

        pending payout has since completed. Platform amount limits are expressed

        in USD; handle amount_too_small and amount_too_big. disable_send_notification suppresses only the immediate payout

        notification; a later escrow claim still notifies the recipient.


        Specific errors: `400 unknown_asset`, `400 invalid_request` (missing/both

        recipients, non-positive user_id, invalid field type or length),

        `400 invalid_recipient` (malformed username), `404 user_not_found` (unknown

        numeric id or unavailable/blocked account), `400 invalid_amount`,

        `400 amount_too_small` / `amount_too_big`, `409 insufficient_funds`,

        `409 idempotency_conflict` / `idempotency_in_progress`.'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TransferRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - result
                properties:
                  ok:
                    const: true
                  result:
                    $ref: '#/components/schemas/Transfer'
        default:
          $ref: '#/components/responses/Error'
      parameters:
      - name: user_id
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/user_id'
      - name: asset
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/asset'
      - name: amount
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/amount'
      - name: spend_id
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/spend_id'
      - name: comment
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/comment'
      - name: disable_send_notification
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/disable_send_notification'
      - name: username
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/username'
      - name: payload
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/payload'
      - name: webhook_url
        in: query
        required: false
        description: Alternative to this field in the body; body wins. Required-field rules apply after merging.
        schema:
          $ref: '#/components/schemas/TransferRequest/properties/webhook_url'
  /transferBatch:
    post:
      tags:
      - Transfers
      operationId: transferBatch
      summary: Batch payouts
      description: 'Scope: `payouts`. Rate limit: 10/min per app. Shared payout restrictions apply.


        Submit 1..500 JSON items. The whole batch is parsed first: malformed rows

        return `400 invalid_request`, repeated spend_id returns `400 duplicate_spend_id`.

        The payout mode and daily ceiling can reject the whole batch with 403 before

        any row executes. After those checks, items execute independently in order;

        an application error on one row does not undo earlier rows. Each item uses

        the same spend_id namespace as transfer. HTTP 200 / top-level ok=true may

        include failed items: inspect every item''s ok and error. Pending username

        payouts are successful items even though they have not yet been claimed.

        Per-item application errors match transfer. An unexpected server failure

        can still abort the call after earlier rows committed; retry with the same

        spend_ids and unchanged item parameters.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - items
              properties:
                items:
                  type: array
                  minItems: 1
                  maxItems: 500
                  items:
                    $ref: '#/components/schemas/TransferRequest'
      responses:
        '200':
          description: OK — one entry per input item, in order.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - result
                properties:
                  ok:
                    const: true
                  result:
                    type: object
                    required:
                    - items
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/TransferBatchItemResult'
        default:
          $ref: '#/components/responses/Error'
  /getTransfers:
    get:
      tags:
      - Transfers
      operationId: getTransfers
      summary: List transfers
      description: 'Scope: `read`. Newest first. `spend_id` is an exact-match filter —

        look up a payout by your own idempotency key.


        Non-numeric transfer_ids entries are ignored; if no valid IDs remain, no rows are returned.

        Only Telegram transfers are listed; on-chain payouts are listed by getWithdrawals.'
      parameters:
      - name: asset
        in: query
        schema:
          type: string
        description: Filter by asset code.
      - name: transfer_ids
        in: query
        schema:
          type: string
        description: Comma-separated transfer IDs.
      - name: spend_id
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
          enum:
          - pending
          - completed
          - returned
        description: Case-insensitive transfer state filter.
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
      - name: count
        in: query
        schema:
          type: integer
          default: 100
          minimum: 1
          maximum: 1000
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - result
                properties:
                  ok:
                    const: true
                  result:
                    type: object
                    required:
                    - items
                    properties:
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/Transfer'
        default:
          $ref: '#/components/responses/Error'
components:
  schemas:
    AmountInput:
      type: string
      minLength: 1
      maxLength: 40
      description: Positive amount as a decimal string (not a JSON number). Surrounding whitespace and exponent notation are accepted. Crypto rounds to asset precision, midpoint away from zero, and must remain positive; fiat requires exact positive cents. Values must fit the server decimal parser and scaling arithmetic.
      pattern: ^\s*\+?(?=[0-9.]*[1-9])(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?\s*$
    BooleanInput:
      oneOf:
      - type: boolean
      - type: integer
        enum:
        - 0
        - 1
      - type: string
        pattern: ^\s*(?:[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee]|[01]|[Yy][Ee][Ss]|[Nn][Oo]|[Oo][Nn]|[Oo][Ff][Ff])\s*$
    Transfer:
      type: object
      properties:
        transfer_id:
          type: integer
        hash:
          type: string
        user_id:
          type:
          - integer
          - 'null'
          description: Recipient id; null until a pending username payout is claimed, and on an unclaimed returned payout.
        asset:
          type: string
        amount:
          $ref: '#/components/schemas/Amount'
        amount_minor:
          $ref: '#/components/schemas/AmountMinor'
        spend_id:
          type: string
        comment:
          type:
          - string
          - 'null'
        status:
          type: string
          enum:
          - pending
          - completed
          - returned
        created_at:
          type: string
          format: date-time
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
        recipient_username:
          type:
          - string
          - 'null'
          description: Normalized username for an originally pending payout, retained after claim/return. Null on immediate payouts.
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
          description: Escrow expiry deadline; null on immediate payouts. Retained after claim/return.
        invite_url:
          type:
          - string
          - 'null'
          description: Bot invitation link on pending API results; null on terminal results/webhooks.
        payload:
          type: string
          description: Present only when the transfer was created with payload.
      required:
      - transfer_id
      - hash
      - user_id
      - asset
      - amount
      - amount_minor
      - spend_id
      - comment
      - status
      - created_at
      - completed_at
      - recipient_username
      - expires_at
      - invite_url
    TransferRequest:
      type: object
      required:
      - asset
      - amount
      - spend_id
      properties:
        user_id:
          anyOf:
          - oneOf:
            - type: integer
              maximum: 9223372036854775807
              minimum: 1
            - type: string
              pattern: ^\s*\+?0*(?:[1-9][0-9]{0,17}|[1-8][0-9]{18}|9[0-1][0-9]{17}|92[0-1][0-9]{16}|922[0-2][0-9]{15}|9223[0-2][0-9]{14}|92233[0-6][0-9]{13}|922337[0-1][0-9]{12}|92233720[0-2][0-9]{10}|922337203[0-5][0-9]{9}|9223372036[0-7][0-9]{8}|92233720368[0-4][0-9]{7}|922337203685[0-3][0-9]{6}|9223372036854[0-6][0-9]{5}|92233720368547[0-6][0-9]{4}|922337203685477[0-4][0-9]{3}|9223372036854775[0-7][0-9]{2}|922337203685477580[0-6]|9223372036854775807)\s*$
            description: Recipient's Telegram user ID.
          - type: 'null'
        asset:
          type: string
          minLength: 2
          maxLength: 16
        amount:
          $ref: '#/components/schemas/AmountInput'
          description: Also subject to platform min/max USD bounds.
        spend_id:
          type: string
          minLength: 1
          maxLength: 64
          description: Required idempotency key, unique per app.
        comment:
          anyOf:
          - type: string
            maxLength: 1024
            description: Shown to the recipient.
          - type: 'null'
        disable_send_notification:
          anyOf:
          - $ref: '#/components/schemas/BooleanInput'
            description: Suppresses the immediate recipient notification only. A later escrow claim still sends a notification.
            default: false
          - type: 'null'
        username:
          anyOf:
          - type: string
            maxLength: 64
            description: 'Leading @ optional, case-insensitive. Normalized username: a letter followed by 3..31 letters, digits or underscores. An unknown username creates pending escrow.'
          - type: 'null'
        payload:
          anyOf:
          - $ref: '#/components/schemas/OperationPayload'
          - type: 'null'
        webhook_url:
          anyOf:
          - $ref: '#/components/schemas/OperationWebhookUrl'
          - type: 'null'
      oneOf:
      - allOf:
        - required:
          - user_id
          properties:
            user_id:
              not:
                type: 'null'
        properties:
          username:
            enum:
            - null
            - ''
      - allOf:
        - required:
          - username
          properties:
            username:
              not:
                type: 'null'
        properties:
          user_id:
            type: 'null'
          username:
            type: string
            minLength: 1
    TransferBatchItemResult:
      type: object
      required:
      - ok
      - spend_id
      properties:
        ok:
          type: boolean
        spend_id:
          type: string
        result:
          allOf:
          - $ref: '#/components/schemas/Transfer'
          description: Present when ok is true.
        error:
          type: object
          description: Present when ok is false — same error names as a single transfer.
          properties:
            code:
              type: integer
            name:
              type: string
          required:
          - code
          - name
      oneOf:
      - properties:
          ok:
            const: true
        required:
        - result
        not:
          required:
          - error
      - properties:
          ok:
            const: false
        required:
        - error
        not:
          required:
          - result
    AmountMinor:
      type: string
      description: The integer minor-unit amount as a string (wei-scale values overflow the JS Number type).
      examples:
      - '10500000'
      pattern: ^[0-9]+$
    ErrorEnvelope:
      type: object
      required:
      - ok
      - error
      properties:
        ok:
          const: false
        error:
          type: object
          required:
          - code
          - name
          properties:
            code:
              type: integer
              description: Duplicates the HTTP status (400/401/403/404/409/429/503/500).
            name:
              type: string
              description: Machine-readable error name to branch on, e.g. "insufficient_funds".
    Amount:
      type: string
      description: Non-negative fixed-point decimal string in whole-coin (or fiat) units, including zero balances and fees. Never a JSON number.
      examples:
      - '10.5'
      pattern: ^[0-9]+(?:\.[0-9]+)?$
    OperationWebhookUrl:
      type: string
      maxLength: 256
      description: This operation's own webhook address — an absolute public HTTPS URL, no embedded credentials, surrounding spaces trimmed. Every update of the operation goes here instead of the app's webhook URL, regardless of the app's event selection. An empty string means the app's URL. Not returned in objects. With a spend_id it is part of the compared request.
    OperationPayload:
      type: string
      maxLength: 4096
      description: Your own data, echoed in the object and its webhooks. An empty string means none.
  responses:
    Error:
      description: 'Error — `{"ok": false, "error": {"code": <HTTP status>, "name":

        "<machine_name>"}}` with the same HTTP status on the wire. See the

        operation description for its specific error names and the API

        description for the common ones.

        '
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: TgPayCrypto-API-Token
      description: The canonical token header. The token is shown once, at app creation or rotation.
    apiTokenLegacy:
      type: apiKey
      in: header
      name: TgCryptoPay-API-Token
      description: The canonical header's name before 2026-09-07 — still accepted, so integrations built earlier keep working unchanged.
    apiTokenCompat:
      type: apiKey
      in: header
      name: Crypto-Pay-API-Token
      description: Accepted token header alias. The first non-empty canonical/legacy/compatibility header wins, in that order.
externalDocs:
  description: Merchant API reference (developer docs)
  url: https://docs.tgpaycrypto.com/crypto-pay-api-reference/