Buy Telegram products for any Telegram user straight from your SwapWallet balance.
Stars and Premium take one call. You pay in USDT at the product’s price from Shop prices, the payment is taken at once, and delivery to the Telegram account follows automatically. The result is a PAYMENT transaction.
Telegram Ads takes two calls:
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.
A bill to be paid from your balance, such as a Telegram Ads top-up. Purchases embed it as payment.invoice.
idintegerRequiredInvoice ID. Pass it to Pay an invoice.
supportCodestringRequiredCode to quote to support.
statusenumRequiredWhere the invoice stands.
Possible values
PENDINGWaiting for payment.PAIDPaid.DELIVEREDPaid and the product delivered.EXPIREDNot paid before expiredAt.CANCELEDCanceled.titlestringRequiredMachine-readable product title, such as TELEGRAM_STARS, TELEGRAM_PREMIUM or TELEGRAM_ADS.
readableTitlestringnullableProduct title in your account’s language.
typeenumRequiredWhat 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.amountMoneyRequiredAmount to pay, fee included.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredamount in Toman (IRT).
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
allowedPaymentTokensarray of stringsRequiredTokens the invoice accepts in the app.
allowedLockedFundsbooleanRequiredWhether the invoice may be paid with crypto still held by the 72-hour rule (see Crypto withdrawals).
feeMoneyRequiredFee included in amount.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
createdAtISO 8601 timestampRequiredWhen the invoice was created.
expiredAtISO 8601 timestampnullablePayment deadline.
paidWithMoneynullableWhat it was paid with. null until paid.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
paidAtISO 8601 timestampnullableWhen it was paid. null until then.
originalAmountMoneynullableAmount before a discount code. null without one.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
discountAmountMoneynullableDiscount applied. null without one.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
discountCodestringnullableDiscount code applied. null without one.
{
"id": 98251,
"supportCode": "NN-7KQ2M4D-XR3T",
"status": "PENDING",
"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": null,
"paidAt": null,
"originalAmount": null,
"discountAmount": null,
"discountCode": null
}A top-up of a Telegram Ads account and the invoice that pays for it.
idintegerRequiredTop-up ID.
accountstringRequiredThe Telegram Ads account ID.
amountMoneyRequiredAmount the ads account receives, in TON, without the fee.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
invoiceobjectRequiredThe invoice to pay: amount plus the fee. Pass its id and amount to Pay an invoice.
idintegerRequiredInvoice ID. Pass it to Pay an invoice.
supportCodestringRequiredCode to quote to support.
statusenumRequiredWhere the invoice stands.
Possible values
PENDINGWaiting for payment.PAIDPaid.DELIVEREDPaid and the product delivered.EXPIREDNot paid before expiredAt.CANCELEDCanceled.titlestringRequiredMachine-readable product title, such as TELEGRAM_STARS, TELEGRAM_PREMIUM or TELEGRAM_ADS.
readableTitlestringnullableProduct title in your account’s language.
typeenumRequiredWhat 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.amountMoneyRequiredAmount to pay, fee included.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredamount in Toman (IRT).
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
allowedPaymentTokensarray of stringsRequiredTokens the invoice accepts in the app.
allowedLockedFundsbooleanRequiredWhether the invoice may be paid with crypto still held by the 72-hour rule (see Crypto withdrawals).
feeMoneyRequiredFee included in amount.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
createdAtISO 8601 timestampRequiredWhen the invoice was created.
expiredAtISO 8601 timestampnullablePayment deadline.
paidWithMoneynullableWhat it was paid with. null until paid.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
paidAtISO 8601 timestampnullableWhen it was paid. null until then.
originalAmountMoneynullableAmount before a discount code. null without one.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
discountAmountMoneynullableDiscount applied. null without one.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
discountCodestringnullableDiscount code applied. null without one.
createdAtISO 8601 timestampRequiredWhen the top-up was created.
{
"id": 214,
"account": "PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7",
"amount": {
"number": "20",
"unit": "TON"
},
"invoice": {
"id": 98251,
"supportCode": "NN-7KQ2M4D-XR3T",
"status": "PENDING",
"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": null,
"paidAt": null,
"originalAmount": null,
"discountAmount": null,
"discountCode": null
},
"createdAt": "2026-11-20T11:20:00.211583Z"
}/v1/shop/telegram/starsBuys 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.
usernamestringRequiredTelegram username of the recipient, without the @.
countintegerRequiredNumber of stars.
Returns the Transaction object of the payment, with type PAYMENT.
PRODUCT_NOT_FOUNDThere is no product for this count.
INSUFFICIENT_USER_BALANCEYour USDT balance doesn’t cover the price.
USER_BALANCE_LOCKEDThe USDT needed is still under the 72-hour rule.
LIMIT_DAILY_WITHDRAW_EXCEEDEDOver your daily crypto withdrawal limit, which payments count toward.
SHOP_CLOSED_FOR_USERThe shop isn’t available for this account. Accounts created in Telegram need an Iranian phone number on them.
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
}'const response = await fetch('https://swapwallet.app/api/v1/shop/telegram/stars', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAPWALLET_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
username: 'maryam_kz',
count: 100,
}),
});
const data = await response.json();
console.log(data.result);import os
import requests
response = requests.post(
"https://swapwallet.app/api/v1/shop/telegram/stars",
headers={"Authorization": f"Bearer {os.environ['SWAPWALLET_API_KEY']}"},
json={
"username": "maryam_kz",
"count": 100,
},
)
print(response.json()["result"])<?php
$ch = curl_init('https://swapwallet.app/api/v1/shop/telegram/stars');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SWAPWALLET_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'username' => 'maryam_kz',
'count' => 100,
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data['result']);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"username": "maryam_kz",
"count": 100
}`)
req, _ := http.NewRequest("POST", "https://swapwallet.app/api/v1/shop/telegram/stars", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SWAPWALLET_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}{
"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"
}
}
}
}/v1/fragment/telegram/ads/rechargeCreates a top-up of a Telegram Ads account and the invoice to pay for it. Nothing is charged yet: pay the invoice within 3 minutes to complete it.
The invoice is the top-up amount plus a fee of 1 TON + 1% of the amount. For 20 TON, that’s 21.2 TON.
accountstringRequiredTelegram Ads account ID, from the Telegram Ads platform.
amountMoneyRequiredTop-up amount, in TON, without the fee.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
Returns a Telegram Ads top-up object in result, with its invoice in PENDING.
VALIDATION_FAILEDaccount isn’t 43 to 64 allowed characters.
TELEGRAM_ADS_MINIMUM_AMOUNT_NOT_MEETamount is below 20 TON.
INVALID_TOKEN_ENUMamount.unit isn’t TON.
SHOP_CLOSED_FOR_USERThe shop isn’t available for this account.
curl -X POST https://swapwallet.app/api/v1/fragment/telegram/ads/recharge \
-H "Authorization: Bearer $SWAPWALLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account": "PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7",
"amount": {
"number": "20",
"unit": "TON"
}
}'const response = await fetch('https://swapwallet.app/api/v1/fragment/telegram/ads/recharge', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAPWALLET_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
account: 'PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7',
amount: {
number: '20',
unit: 'TON',
},
}),
});
const data = await response.json();
console.log(data.result);import os
import requests
response = requests.post(
"https://swapwallet.app/api/v1/fragment/telegram/ads/recharge",
headers={"Authorization": f"Bearer {os.environ['SWAPWALLET_API_KEY']}"},
json={
"account": "PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7",
"amount": {
"number": "20",
"unit": "TON",
},
},
)
print(response.json()["result"])<?php
$ch = curl_init('https://swapwallet.app/api/v1/fragment/telegram/ads/recharge');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SWAPWALLET_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'account' => 'PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7',
'amount' => [
'number' => '20',
'unit' => 'TON',
],
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data['result']);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"account": "PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7",
"amount": {
"number": "20",
"unit": "TON"
}
}`)
req, _ := http.NewRequest("POST", "https://swapwallet.app/api/v1/fragment/telegram/ads/recharge", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SWAPWALLET_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}{
"status": "OK",
"result": {
"id": 214,
"account": "PtYgjmUhBel31iEl2hpChYgCfrL1spNxnyVmihA-2O7",
"amount": {
"number": "20",
"unit": "TON"
},
"invoice": {
"id": 98251,
"supportCode": "NN-7KQ2M4D-XR3T",
"status": "PENDING",
"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": null,
"paidAt": null,
"originalAmount": null,
"discountAmount": null,
"discountCode": null
},
"createdAt": "2026-11-20T11:20:00.211583Z"
}
}/v1/invoice/payPays an invoice made out to you, such as a Telegram Ads top-up, from your balance. Send exactly the invoice’s amount: the same number in the same unit (TON for an Ads top-up). The invoice must still be PENDING and not past expiredAt.
idintegerRequiredInvoice ID.
amountMoneyRequiredThe invoice’s amount, exactly.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
Returns the Invoice object in result, now PAID.
INVOICE_AMOUNT_IS_DIFFERENTamount isn’t exactly the invoice’s amount.
WRONG_INVOICE_PAYMENT_METHODamount.unit isn’t one of the invoice’s allowedPaymentTokens.
INVOICE_STATUS_IS_NOT_PAYABLEThe invoice isn’t PENDING.
INVOICE_EXPIREDThe invoice is past expiredAt. Create a new top-up.
INSUFFICIENT_USER_BALANCEYour balance doesn’t cover the invoice.
USER_BALANCE_LOCKEDThe funds needed are still under the 72-hour rule.
INVOICE_NOT_FOUNDThere is no invoice with this id.
UN_AUTHORIZATIONThe invoice was made out to another account.
curl -X POST https://swapwallet.app/api/v1/invoice/pay \
-H "Authorization: Bearer $SWAPWALLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": 98251,
"amount": {
"number": "21.2",
"unit": "TON"
}
}'const response = await fetch('https://swapwallet.app/api/v1/invoice/pay', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAPWALLET_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
id: 98251,
amount: {
number: '21.2',
unit: 'TON',
},
}),
});
const data = await response.json();
console.log(data.result);import os
import requests
response = requests.post(
"https://swapwallet.app/api/v1/invoice/pay",
headers={"Authorization": f"Bearer {os.environ['SWAPWALLET_API_KEY']}"},
json={
"id": 98251,
"amount": {
"number": "21.2",
"unit": "TON",
},
},
)
print(response.json()["result"])<?php
$ch = curl_init('https://swapwallet.app/api/v1/invoice/pay');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SWAPWALLET_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'id' => 98251,
'amount' => [
'number' => '21.2',
'unit' => 'TON',
],
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data['result']);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"id": 98251,
"amount": {
"number": "21.2",
"unit": "TON"
}
}`)
req, _ := http.NewRequest("POST", "https://swapwallet.app/api/v1/invoice/pay", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SWAPWALLET_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}{
"status": "OK",
"result": {
"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
}
}