Skip to content
SwapWalletDocs
فارسیGet an API key

Telegram services

Buy Telegram products for any Telegram user straight from your SwapWallet balance.

Every purchase is one call: the payment is taken from your balance at once, delivery to the Telegram account follows automatically, and the result is a PAYMENT transaction.

ProductPaid inPrice
StarsUSDTFrom Shop prices
PremiumUSDTFrom Shop prices
Ads top-upTONThe amount plus a fee of 1 TON + 1%

Paying from your balance counts toward your crypto withdrawal limits, and the 72-hour rule applies to it (see Crypto withdrawals). Premium for your own Telegram account is the exception: it can be paid with crypto still under that rule.

The Telegram username isn’t checked before payment. If delivery fails, for example because the username doesn’t exist, contact support; a refund comes back as a CREDIT transaction of type JETTON_REFUND.

The Invoice object

The bill behind each purchase. Every Telegram purchase creates one and pays it at once; the payment transaction carries it as payment.invoice.

Attributes

  • idintegerRequired

    Invoice ID.

  • supportCodestringRequired

    Code to quote to support.

  • statusenumRequired

    Where the invoice stands.

    Possible values

    • PENDINGWaiting for payment.
    • PAIDPaid.
    • DELIVEREDPaid and the product delivered.
    • EXPIREDNot paid before expiredAt.
    • CANCELEDCanceled.
  • titlestringRequired

    Machine-readable product title, such as TELEGRAM_STARS, TELEGRAM_PREMIUM or TELEGRAM_ADS.

  • readableTitlestringnullable

    Product title in your account’s language.

  • typeenumRequired

    What the invoice is for.

    Possible values

    • JETTONTelegram Premium or Stars from the shop.
    • TELEGRAM_ADSA Telegram Ads top-up.
    • SHOP_ORDERAn order from the SwapWallet shop.
    • GIFT_CARDA gift card.
    • EXTERNAL_APPLICATIONA payment to a merchant’s payment gateway.
    • GIVEAWAYA giveaway.
    • AD_CHEQUEAn ad cheque.
    • AD_CHEQUE_TOP_UPAn ad cheque top-up.
    • HONGBAO_PACKETA red-envelope (hongbao) packet.
    • EXTRA_USER_WALLETAn extra wallet for your account.
    • AI_CREDITAI credit.
  • amountMoneyRequired

    Amount to pay, fee included.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • valueMoneyRequired

    amount in Toman (IRT).

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • allowedPaymentTokensarray of stringsRequired

    Tokens the invoice accepts in the app.

  • allowedLockedFundsbooleanRequired

    Whether the invoice may be paid with crypto still held by the 72-hour rule (see Crypto withdrawals).

  • feeMoneyRequired

    Fee included in amount.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • createdAtISO 8601 timestampRequired

    When the invoice was created.

  • expiredAtISO 8601 timestampnullable

    Payment deadline.

  • paidWithMoneynullable

    What it was paid with. null until paid.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • paidAtISO 8601 timestampnullable

    When it was paid. null until then.

  • originalAmountMoneynullable

    Amount before a discount code. null without one.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • discountAmountMoneynullable

    Discount applied. null without one.

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

  • discountCodestringnullable

    Discount code applied. null without one.

The Invoice object
{
  "id": 98251,
  "supportCode": "NN-7KQ2M4D-XR3T",
  "status": "PAID",
  "title": "TELEGRAM_ADS",
  "readableTitle": "شارژ تبلیغات تلگرام",
  "type": "TELEGRAM_ADS",
  "amount": {
    "number": "21.2",
    "unit": "TON"
  },
  "value": {
    "number": "5659340",
    "unit": "IRT"
  },
  "allowedPaymentTokens": [
    "USDT",
    "IRT",
    "TON"
  ],
  "allowedLockedFunds": false,
  "fee": {
    "number": "1.2",
    "unit": "TON"
  },
  "createdAt": "2026-11-20T11:20:00.204517Z",
  "expiredAt": "2026-11-20T11:23:00.204517Z",
  "paidWith": {
    "number": "21.2",
    "unit": "TON"
  },
  "paidAt": "2026-11-20T11:20:41.506930Z",
  "originalAmount": null,
  "discountAmount": null,
  "discountCode": null
}

Buy Telegram Stars

POST/v1/shop/telegram/stars

Buys Telegram Stars for a Telegram user and pays for them from your USDT balance at once. The stars are then delivered to that account automatically.

The counts you can buy are the TG-STARS-{count} products in List shop prices.

Body parameters

  • usernamestringRequired

    Telegram username of the recipient, without the @.

  • countintegerRequired

    Number of stars.

    A count with a TG-STARS-{count} product, such as 100, 250, 500, 1000 or 5000

Returns

Returns the Transaction object of the payment, with type PAYMENT.

Errors

  • 404PRODUCT_NOT_FOUND

    There is no product for this count.

  • 400INSUFFICIENT_USER_BALANCE

    Your USDT balance doesn’t cover the price.

  • 400USER_BALANCE_LOCKED

    The USDT needed is still under the 72-hour rule.

  • 400LIMIT_DAILY_WITHDRAW_EXCEEDED

    Over your daily crypto withdrawal limit, which payments count toward.

  • 403SHOP_CLOSED_FOR_USER

    The shop isn’t available for this account. Accounts created in Telegram need an Iranian phone number on them.

POST/v1/shop/telegram/stars
curl -X POST https://swapwallet.app/api/v1/shop/telegram/stars \
  -H "Authorization: Bearer $SWAPWALLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "username": "maryam_kz",
  "count": 100
}'
Response
{
  "status": "OK",
  "result": {
    "id": 3053015,
    "supportCode": "SW-HCPDS6V-PWAN",
    "timestamp": 1795172709000,
    "type": "PAYMENT",
    "status": "SUCCEED",
    "network": "INTERNAL",
    "exchangeFee": {
      "number": "0",
      "unit": "USDT"
    },
    "payment": {
      "invoice": {
        "id": 98214,
        "supportCode": "NN-2HFN9B9-NK8R",
        "status": "PAID",
        "title": "TELEGRAM_STARS",
        "readableTitle": "تلگرام استارز",
        "type": "JETTON",
        "amount": {
          "number": "1.65",
          "unit": "USDT"
        },
        "value": {
          "number": "449460",
          "unit": "IRT"
        },
        "allowedPaymentTokens": [
          "USDT",
          "IRT",
          "TON"
        ],
        "allowedLockedFunds": false,
        "fee": {
          "number": "0",
          "unit": "USDT"
        },
        "createdAt": "2026-11-20T11:05:08.912344Z",
        "expiredAt": "2026-11-20T11:08:08.912344Z",
        "paidWith": {
          "number": "1.65",
          "unit": "USDT"
        },
        "paidAt": "2026-11-20T11:05:09.130557Z",
        "originalAmount": null,
        "discountAmount": null,
        "discountCode": null
      },
      "amount": {
        "number": "1.65",
        "unit": "USDT"
      },
      "value": {
        "number": "1.65",
        "unit": "USD"
      },
      "userCurrencyValue": {
        "number": "449460",
        "unit": "IRT"
      }
    }
  }
}

Buy Telegram Premium

POST/v1/shop/telegram/premium

Buys a Telegram Premium subscription for a Telegram user and pays for it from your USDT balance at once. The subscription is then activated on that account automatically.

Body parameters

  • usernamestringRequired

    Telegram username of the recipient, without the @.

  • monthsintegerRequired

    Length of the subscription, in months.

    Possible values

    • 3
    • 6
    • 12

Returns

Returns the Transaction object of the payment, with type PAYMENT.

Errors

  • 404PRODUCT_NOT_FOUND

    months isn’t 3, 6 or 12.

  • 400INSUFFICIENT_USER_BALANCE

    Your USDT balance doesn’t cover the price.

  • 400USER_BALANCE_LOCKED

    The USDT needed is still under the 72-hour rule, and the subscription isn’t for your own Telegram account.

  • 403SHOP_CLOSED_FOR_USER

    The shop isn’t available for this account.

POST/v1/shop/telegram/premium
curl -X POST https://swapwallet.app/api/v1/shop/telegram/premium \
  -H "Authorization: Bearer $SWAPWALLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "username": "ali_rezaei",
  "months": 3
}'
Response
{
  "status": "OK",
  "result": {
    "id": 3053094,
    "supportCode": "SW-R6BZ1KX-DE8F",
    "timestamp": 1795173012000,
    "type": "PAYMENT",
    "status": "SUCCEED",
    "network": "INTERNAL",
    "exchangeFee": {
      "number": "0",
      "unit": "USDT"
    },
    "payment": {
      "invoice": {
        "id": 98230,
        "supportCode": "NN-5TQW8VA-LM2C",
        "status": "PAID",
        "title": "TELEGRAM_PREMIUM",
        "readableTitle": "تلگرام پریمیوم",
        "type": "JETTON",
        "amount": {
          "number": "12.99",
          "unit": "USDT"
        },
        "value": {
          "number": "3538476",
          "unit": "IRT"
        },
        "allowedPaymentTokens": [
          "USDT",
          "IRT",
          "TON"
        ],
        "allowedLockedFunds": false,
        "fee": {
          "number": "0",
          "unit": "USDT"
        },
        "createdAt": "2026-11-20T11:10:11.774102Z",
        "expiredAt": "2026-11-20T11:13:11.774102Z",
        "paidWith": {
          "number": "12.99",
          "unit": "USDT"
        },
        "paidAt": "2026-11-20T11:10:12.018863Z",
        "originalAmount": null,
        "discountAmount": null,
        "discountCode": null
      },
      "amount": {
        "number": "12.99",
        "unit": "USDT"
      },
      "value": {
        "number": "12.99",
        "unit": "USD"
      },
      "userCurrencyValue": {
        "number": "3538476",
        "unit": "IRT"
      }
    }
  }
}

Top up Telegram Ads

POST/v1/shop/telegram/ads

Tops up a Telegram Ads account and pays for it from your TON balance at once. The account is then credited with the amount you asked for.

You pay the amount plus a fee of 1 TON + 1% of the amount: for 20 TON, that’s 21.2 TON.

Body parameters

  • accountstringRequired

    Telegram Ads account ID, from the Telegram Ads platform.

    43 to 64 characters: letters, digits, _ and -

  • amountMoneyRequired

    Top-up amount, in TON, without the fee.

    At least 20 TON

    Show child attributesHide child attributes
    • numberdecimal stringRequired

      The amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.

    • unitstringRequired

      The token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.

Returns

Returns the Transaction object of the payment, with type PAYMENT. Its payment.invoice shows the amount and the fee.

Errors

  • 400VALIDATION_FAILED

    account isn’t 43 to 64 allowed characters.

  • 400TELEGRAM_ADS_MINIMUM_AMOUNT_NOT_MEET

    amount is below 20 TON.

  • 404INVALID_TOKEN_ENUM

    amount.unit isn’t TON.

  • 400INSUFFICIENT_USER_BALANCE

    Your TON balance doesn’t cover the amount plus the fee.

  • 400USER_BALANCE_LOCKED

    The TON needed is still under the 72-hour rule.

  • 400LIMIT_DAILY_WITHDRAW_EXCEEDED

    Over your daily crypto withdrawal limit, which payments count toward.

  • 403SHOP_CLOSED_FOR_USER

    The shop isn’t available for this account.

POST/v1/shop/telegram/ads
curl -X POST https://swapwallet.app/api/v1/shop/telegram/ads \
  -H "Authorization: Bearer $SWAPWALLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "account": "PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7",
  "amount": {
    "number": "20",
    "unit": "TON"
  }
}'
Response
{
  "status": "OK",
  "result": {
    "id": 3053311,
    "supportCode": "SW-T4ADS9Q-KW7N",
    "timestamp": 1795173641000,
    "type": "PAYMENT",
    "status": "SUCCEED",
    "network": "INTERNAL",
    "exchangeFee": {
      "number": "0",
      "unit": "TON"
    },
    "payment": {
      "invoice": {
        "id": 98251,
        "supportCode": "NN-7KQ2M4D-XR3T",
        "status": "PAID",
        "title": "TELEGRAM_ADS",
        "readableTitle": "شارژ تبلیغات تلگرام",
        "type": "TELEGRAM_ADS",
        "amount": {
          "number": "21.2",
          "unit": "TON"
        },
        "value": {
          "number": "5659340",
          "unit": "IRT"
        },
        "allowedPaymentTokens": [
          "USDT",
          "IRT",
          "TON"
        ],
        "allowedLockedFunds": false,
        "fee": {
          "number": "1.2",
          "unit": "TON"
        },
        "createdAt": "2026-11-20T11:20:00.204517Z",
        "expiredAt": "2026-11-20T11:23:00.204517Z",
        "paidWith": {
          "number": "21.2",
          "unit": "TON"
        },
        "paidAt": "2026-11-20T11:20:41.506930Z",
        "originalAmount": null,
        "discountAmount": null,
        "discountCode": null
      },
      "amount": {
        "number": "21.2",
        "unit": "TON"
      },
      "value": {
        "number": "20.776",
        "unit": "USD"
      },
      "userCurrencyValue": {
        "number": "5659340",
        "unit": "IRT"
      }
    }
  }
}