Skip to content

Usage Examples

FieldValue
WalletUQBJ6gU8gh_jRrzYDlfw9cpCwHaSn2mrK4O-1h8CDENehGYJ
Merchantstore123
AmountR$ 100.00 (= 10000 cents)
CurrencyBRL
TX IDtx123456
1. Prefix: trp01
2. Field 01 (48): 0148UQBJ6gU8gh_jRrzYDlfw9cpCwHaSn2mrK4O-1h8CDENehGYJ
3. Field 02 (08): 0208store123
4. Field 03 (05): 030510000
5. Field 04 (03): 0403BRL
6. Field 05 (08): 0508tx123456
7. CRC input: trp010148UQBJ6gU8...0508tx1234569904
8. Calculated CRC: A3F2
9. Field 99 (04): 9904A3F2
trp010148UQBJ6gU8gh_jRrzYDlfw9cpCwHaSn2mrK4O-1h8CDENehGYJ0208store123030510000040​3BRL0508tx1234569904A3F2

From the payload, three types of links can be generated:

https://trp.tonramp.io/{payload}

Automatically detects the platform and redirects to Telegram or Web.

https://t.me/TonRmpBot/tonramp?startapp={payload}

Opens the TonRmpBot directly in Telegram.

https://miniapp.tonramp.io?startapp={payload}

Opens the checkout in a web browser.

from app.utils.trp import parse_trp_payload
payload = "trp010148UQBJ6gU8...9904A3F2"
data = parse_trp_payload(payload)
if data["crc_valid"]:
print(f"Merchant: {data['merchant']}")
print(f"Amount: {data['amount']} cents")
print(f"Currency: {data['currency']}")
else:
print("Invalid CRC!")
import { parseTrpPayload } from '@/lib/trp'
const data = parseTrpPayload(payload)
if (data.crc_valid) {
console.log(`Merchant: ${data.merchant}`)
console.log(`Amount: ${data.amount} cents`)
console.log(`Currency: ${data.currency}`)
} else {
console.log('Invalid CRC!')
}
QR Code data = https://trp.tonramp.io/{payload}

Recommendations:

  • Error correction level: M (15%)
  • Minimum size: 200x200px
  • White background, black code