Skip to main content

xRocket Pay REST API

xRocket Pay API allows developers integrating xRocket Pay features in their projects to to manage cheques, transfers, invoices, request withdrawal links, execute withdrawals, mass-transfers, request rates etc.

Authorization required

Most Pay API endpoints are private meaning that they require authorization with the Bearer token. Requests to private endpoints without a valid token will be rejected.

API base URLs

Use REST API on this website or our API Swagger to test and review request/response examples and other details:

Production -
Testnet

Authorization

  • Get your Bearer token (API Key) to use any private endpoints. In Telegram bot go to SettingsExchange settingsAPI token or contact xRocket support for assistance.
  • Add the Bearer token in the requests while using any private endpoints as follows:
"Authorization: Bearer SpjEQPuvEGMae7QLaNzR8I47D3qzUP"
Protect your API token

Your Bearer token grants full access to your xRocket Pay account -- including transfers, withdrawals, and cheque creation. Never share it publicly, commit it to version control, embed it in client-side code, or transmit it over unencrypted connections. If you suspect your token has been compromised, regenerate it immediately in the bot settings.

Testnet integration

Use the testnet bot to get a Bearer token for testnet integration. Testnet tokens work only with the testnet API base URL and do not affect real balances.

Request/response example

Example values only

The tokens, IDs, and amounts shown below are placeholder values for illustration purposes. Replace them with your actual credentials and data when making real requests.

In this example the GET /api/v1/transfer method is used to request info about a specified transfer from one xRocket user to another. The method requests an xRocket account-related data. Such requests require authorization token that can be issued to a user account by xRocket bot.


curl -L 'https://pay.api.pp.xrocket.tg/api/v1/transfer?transferId=123321232&clientTransferId=123456789' \
-H 'Accept: application/json'
-H 'Authorization: Bearer 10Q9DG5BG0ReG3jCdyEQ6C5yQkhHRX'

The request is sent to URL of the API method: https://pay.api.pp.xrocket.tg/api/v1/transfer

Example field and valueDescription
transferId: 123321232Transfer ID.
clientTransferId: 123456789Client transfer ID.
'Authorization: Bearer 10Q9DG5BG0ReG3jCdyEQ6C5yQkhHRX'The GET /api/v1/transfer method requests an xRocket account-related data. Such requests require authorization token that can be issued to a user account by xRocket bot.

Example response:

{
"transferId": "123321232",
"clientTransferId": "123456789",
"target": "87209764",
"targetType": "telegram_user_id",
"asset": "TONCOIN",
"amount": "1.23",
"description": "You are awesome!"
}
Example field and valueDescription
"transferId": "123321232"Transfer unique ID.
"clientTransferId": "123456789"Client transfer unique ID.
"target": "123"Receiver identifier (Telegram user ID, phone number, etc.).
"targetType": "telegram_user_id"Type of the receiver identifier. Available values: telegram_user_id.
"asset": "TONCOIN"The transferred currency.
"amount": "1.23"The transfer amount.
"description": "You are awesome!"Optional description added by the transfer sender.

Methods

Irreversible financial operations

Several Pay API methods execute irreversible financial operations (transfers, withdrawals, mass transfers). Double-check recipient addresses, amounts, and asset types before calling these endpoints. Incorrect transfers and withdrawals to external addresses cannot be reversed.

MethodDescription
ChequesMethods for processing payouts with xRocket personalized cheques.
Create chequeCreate a new personal cheque for a accept-type transfer. The amount of the created cheque is reserved on the wallet balance and can be redeemed by the recipient or cancelled before redemption. Requires authorization
Get list of chequesRequest the list of all personal cheques issued for accept-type transfers. Use this method to review pending, redeemed, or cancelled cheques. Requires authorization
Delete chequeDelete an unredeemed personal cheque. Upon cancellation, the reserved funds are released on the wallet balance. Requires authorization
Get cheque infoGet details of a specified personal cheque used for an accept-type payout, including status and reserved amount. Requires authorization
TransfersMethods for non-acceptance automatic payments to users directly on the platform.
Transfer funds to a userTransfer funds from xRocket wallet to another xRocket user. Requires authorization
Get transfers listGet the list of all the transfers. Requires authorization
Get transfer infoGet info about a transfer by its ID. Requires authorization
Create mass transfers (Telegram users only)Mass transfer assets to xRocket users. Requires authorization
InvoicesMethods for managing one-time invoices that can be paid by xRocket users via link.
Create invoiceCreate one-time invoices that can be paid by xRocket users via link. Requires authorization
Get list of invoicesGet the list of active invoices. Requires authorization
Get invoice infoGet invoice info by ID. Requires authorization
Delete invoiceDelete an invoice by ID. Requires authorization
Pay invoice for test only(Test only) method to pay an invoice. Requires authorization
WithdrawalMethods for withdrawal of assets from xRocket wallet to external addresses.
Create withdrawal linkCreate deep links for withdrawals for simplified integration. User will need to confirm the withdrawal after following the link. Requires authorization
Withdraw funds from application to external walletWithdraw assets from xRocket wallet to an external blockchain address. Requires authorization
Get application withdrawalsGet info about withdrawals from xRocket wallet to an external blockchain address. Requires authorization
Get application withdrawal infoGet info about a withdrawal from xRocket wallet to an external blockchain address by ID. Requires authorization
Get application withdrawal quotasGet info about current withdrawal fees.
Currencies and ratesGet info about currencies and their rates.
Get available currenciesGet the list of available currencies.
Get currencies ratesGet the rates of a specified currency in a specified currencies.
AppMethods for getting info about your app.
Get info about your applicationGet info about your app.
Get balances of your applicationGet balances of your wallet. Requires authorization