Paga desde un botón
Tu bot envía el enlace de pago como botón. El cliente lo abre, conecta una billetera TON y confirma una vez.
Envía a tus clientes un botón de pago desde tu bot o Mini App. Pagan USDT en TON con Telegram Wallet, Tonkeeper o cualquier billetera TON, y tu bot recibe el aviso en cuanto llega el dinero.
Tu bot envía el enlace de pago como botón. El cliente lo abre, conecta una billetera TON y confirma una vez.
Una sola confirmación envía tu parte y la comisión juntas, directo a tu billetera TON. No hay nada que retirar.
Un webhook firmado avisa a tu servidor en cuanto se confirma el pago, para que el bot entregue al instante.
# 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" }
]] }
}'