Skip to content

REST API

https://api.tonramp.io

Generates a TRP payload and returns the links.

Request:

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"
}'

Response (200):

{
"success": true,
"payload": "trp010148UQBJ6gU8...",
"deep_link": "https://trp.tonramp.io/trp01...",
"telegram_link": "https://t.me/TonRmpBot/tonramp?startapp=trp01...",
}

Parameters:

FieldTypeRequiredDescription
walletstringYesDestination TON address (10-48 chars)
merchantstringYesMerchant ID (max 32 chars)
amountstringYesAmount in the currency (e.g., “100.00”)
currencystringNoCurrency: BRL, USD, EUR, TON (default: BRL)
tx_idstringNoTransaction ID (generated if omitted)

Checks the status of a TRP transaction.

Request:

Terminal window
curl https://api.tonramp.io/api/v1/trp/status/tx123456

Response (200):

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

Response (404):

{
"detail": "Transaction not found"
}

Possible Statuses:

StatusDescription
pendingAwaiting payment
paidPayment received
completedTransaction completed
expiredTransaction expired

Saves the user’s platform preference in a cookie.

Request:

Terminal window
curl -X POST https://api.tonramp.io/api/v1/trp/preference \
-H "Content-Type: application/json" \
-d '{"platform": "telegram"}'

Response (200):

{
"success": true,
"platform": "telegram"
}

Accepted platforms: telegram, google (web)

The tonramp_platform cookie is set with SameSite=None to work cross-origin.

EndpointLimit
POST /api/v1/wallet/trp/generate30/minute
GET /api/v1/trp/status/\{tx_id\}60/minute
POST /api/v1/trp/preference10/minute

Responses exceeding the rate limit return HTTP 429 Too Many Requests.