Pay from a bot button
Your bot sends the checkout link as a button. The customer opens it, connects a TON wallet and confirms once.
Send customers a payment button from your bot or Mini App. They pay USDT on TON with Telegram Wallet, Tonkeeper or any TON wallet, and your bot is told as soon as the money arrives.
Your bot sends the checkout link as a button. The customer opens it, connects a TON wallet and confirms once.
One confirmation sends your share and the fee together, straight to your TON wallet. There is nothing to withdraw.
A signed webhook tells your server the moment the payment is confirmed, so the bot can deliver right away.
# 1. Create a USDT payment on TON
curl https://api.kokiwa.com/v1/payment_intents \
-H "Authorization: Bearer $KOKIWA_KEY" \
-H "Content-Type: application/json" \
-d '{
"currency": "USDT",
"amount": "25.00",
"chains": ["ton"],
"customer": "tg_123456789"
}'
# 2. Send checkout_url from the response as a bot button
curl https://api.telegram.org/bot$BOT_TOKEN/sendMessage \
-H "Content-Type: application/json" \
-d '{
"chat_id": 123456789,
"text": "Order 10086: 25 USDT",
"reply_markup": { "inline_keyboard": [[
{ "text": "Pay 25 USDT", "url": "https://pay.kokiwa.com/p/pi_7Gm4Rk2Wp9Ls1Qv8Bd3Zt6" }
]] }
}'