Skip to content

OpenAPI and SDK

The canonical schema for the integration endpoints is:

GET https://api.tonramp.io/v1/trp/openapi.json

It is a slice of the API OpenAPI: generate, parse, quote, top-up, status, PIX checkout (/v1/c) and the partner ops endpoints (webhook, transactions, ticker, stats). Admin, Mini App and internal queues stay out.

TypeScript:

Terminal window
npx openapi-typescript https://api.tonramp.io/v1/trp/openapi.json -o trp.d.ts

Python:

Terminal window
pip install openapi-python-client
openapi-python-client generate --url https://api.tonramp.io/v1/trp/openapi.json

There is also a minimal TypeScript fetch client at sdk/trp.ts. Copy it into your project.

  • POST /v1/wallet/trp/generate and POST /v1/c use Authorization: Bearer tonr_<prefix>_<secret>.
  • GET /v1/partner/* uses the partner console session JWT.

The demo-trp app shows the USDT flow end to end.