Skip to content

Checkout

  1. Your backend generates a TRP payload with the payment details
  2. The payload is sent to the frontend as a universal link
  3. The buyer scans the QR code or clicks the link
  4. The checkout page detects the platform:
    • Telegram User-Agent → redirects to the bot
    • Preference cookie → redirects as saved
    • No preference → displays page with buttons (Telegram / Web)
  5. The buyer completes the payment
  6. Your system checks the status via API

Go to trp.tonramp.io and fill in the form with:

  • Destination TON wallet
  • Merchant ID
  • Payment amount
  • Currency
  • Transaction ID (optional, generated automatically)
Terminal window
curl -X POST https://api.tonramp.io/api/v1/wallet/trp/generate \
-H "Content-Type: application/json" \
-d '{
"wallet": "UQBJ6gU8gh_jRrzYDlfw9cpCwHaSn2mrK4O-1h8CDENehGYJ",
"merchant": "store123",
"amount": "100.00",
"currency": "BRL",
"tx_id": "tx123456"
}'
import { generateTrpPayload } from '@/lib/trp'
const payload = generateTrpPayload(
'UQBJ6gU8gh_jRrzYDlfw9cpCwHaSn2mrK4O-1h8CDENehGYJ',
'store123',
'100.00',
'BRL',
'tx123456'
)
const checkoutUrl = `https://trp.tonramp.io/${payload}`

The checkout page at trp.tonramp.io/\{payload\} displays:

  • TonRamp logo
  • Merchant name
  • Formatted amount in the currency
  • QR code with the universal link
  • “Pay via Telegram” button
  • “Pay via Browser” button
  • Payment status (polling every 5 seconds)

After the buyer accesses the link, you can check the status:

Terminal window
curl https://api.tonramp.io/api/v1/trp/status/{tx_id}

Response:

{
"status": "pending",
"amount": "10000",
"currency": "BRL",
"updated_at": "2025-03-05T12:00:00Z"
}

Possible statuses: pending, paid, completed, expired.