TronPay

VALTIS PAY · API

API Integration Documentation

Collection, payout, dedicated address, balance, and exchange-rate APIs for merchant integrations.

Overview

METHODPOST
REQUESTFORM
RESPONSEJSON / STRING
SIGNATUREHMAC-SHA256
Transport rules

Use POST and submit application/x-www-form-urlencoded or multipart/form-data. JSON response fields are strings. Callbacks are form data; return the exact text success after valid processing.

01 · HMAC-SHA256

Request signing

All requests, responses, and callbacks use HMAC-SHA256 signatures with the API key shown in the merchant console.

  1. Exclude sign, x-sign, signature, signType, and sign_type. Remove empty values, sort the remaining keys in ASCII order, then join them as key=value with &.
  2. Use the API key as the HMAC key. Do not append it to the canonical string. Sign the original values before URL encoding.
Fixed test vector
API key
test-api-key
Parameters
amount=100.00, appId=10001, orderNo=M202607120001
Canonical string
amount=100.00&appId=10001&orderNo=M202607120001
Signature
65acc273378e66376f8e9d3cbe2999af60bd130c8c11b3360cc77ca09abe7ce2

Code examples

Java
String data = "amount=100.00&appId=10001&orderNo=M202607120001";
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec("test-api-key".getBytes(UTF_8), "HmacSHA256"));
String sign = HexFormat.of().formatHex(mac.doFinal(data.getBytes(UTF_8)));
Node.js
const crypto = require('crypto');
const data = 'amount=100.00&appId=10001&orderNo=M202607120001';
const sign = crypto.createHmac('sha256', 'test-api-key')
  .update(data, 'utf8').digest('hex');
PHP
$data = 'amount=100.00&appId=10001&orderNo=M202607120001';
$sign = hash_hmac('sha256', $data, 'test-api-key');

02 · Payment API

Create payment order

POST/api/payment/create

Create a collection order and receive the hosted payment URL that the customer should open to complete payment.

Send amount for digital-asset-denominated orders, or exchangeAmount for fiat-denominated orders. Do not send both.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
orderNoYesMerchant order number
notifyUrlYesAsynchronous notification URL
returnUrlNoRedirect URL after successful payment
currencyYesDigital asset symbol
networkNoNetwork, such as TRC20, ERC20, BEP20, or SPL
memberIdYesUnique customer ID in the merchant system
amountOne documented alternativeAmount denominated in the selected digital asset
exchangeAmountOne documented alternativeOriginal fiat or settlement amount to be converted
exchangePrecisionNoConversion precision; defaults to 2
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageYesResult message
tradeNoYesPlatform order number
urlYesHosted payment URL
signYes64-character lowercase HMAC-SHA256 signature

03 · Payment API

Query payment order

POST/api/payment/query

Query a collection order by merchant order number or platform order number and inspect its payment result.

A successful query only means the query completed. Check paid or the payout status to determine the order result.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
orderNoOne documented alternativeMerchant order number
tradeNoOne documented alternativePlatform order number
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageNoResult message
tradeNoOn successPlatform order number
orderNoOn successMerchant order number
currencyYesDigital asset symbol
chainTypeNoChain type, such as tron, bsc, solana, or ton
networkNoNetwork, such as TRC20, ERC20, BEP20, or SPL
paidOn successWhether payment succeeded: true or false
amountOn successAmount denominated in the selected digital asset
realAmountOn successActual received digital asset amount
exchangeAmountNoOriginal fiat or settlement amount to be converted
realExchangeAmountNoActual received amount after conversion
payAddressNoSender wallet address
receiveAddressNoReceiving wallet address
tradeHashNoOn-chain transaction hash
signOn success64-character lowercase HMAC-SHA256 signature

04 · Payment API

Payment callback

POSTMERCHANT CALLBACK URL

The platform calls this merchant endpoint when a collection order result is available or changes.

Verify the signature with every non-empty field received. New callback fields may be added later.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
tradeNoYesPlatform order number
orderNoYesMerchant order number
currencyYesDigital asset symbol
chainTypeNoChain type, such as tron, bsc, solana, or ton
networkNoNetwork, such as TRC20, ERC20, BEP20, or SPL
paidYesWhether payment succeeded: true or false
amountYesAmount denominated in the selected digital asset
realAmountYesActual received digital asset amount
exchangeAmountNoOriginal fiat or settlement amount to be converted
realExchangeAmountNoActual received amount after conversion
payAddressNoSender wallet address
receiveAddressNoReceiving wallet address
tradeHashNoOn-chain transaction hash
payTimeYesPayment time as a 13-digit UTC timestamp
signYes64-character lowercase HMAC-SHA256 signature

HTTP 200success

05 · Dedicated address

Dedicated-address order callback

POSTMERCHANT CALLBACK URL

The platform asks the merchant to create an order after detecting a transfer to a customer dedicated address.

This endpoint is implemented by the merchant and called by the platform when funds arrive at a dedicated address.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
memberIdYesUnique customer ID in the merchant system
tradeNoYesPlatform order number
currencyYesDigital asset symbol
chainTypeNoChain type, such as tron, bsc, solana, or ton
networkNoNetwork, such as TRC20, ERC20, BEP20, or SPL
amountYesAmount denominated in the selected digital asset
domainNoOpaque merchant data returned unchanged
payAddressYesSender wallet address
tradeHashYesOn-chain transaction hash
payTimeYesPayment time as a 13-digit UTC timestamp
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
memberIdYesUnique customer ID in the merchant system
orderNoYesMerchant order number
notifyUrlNoAsynchronous notification URL
signYes64-character lowercase HMAC-SHA256 signature

06 · Dedicated address

Get customer wallet address

POST/api/gateway/get_address

Query or allocate a dedicated wallet address for a customer under the merchant application.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
memberIdYesUnique customer ID in the merchant system
chainTypeOne documented alternativeChain type, such as tron, bsc, solana, or ton
currencyOne documented alternativeDigital asset symbol
networkOne documented alternativeNetwork, such as TRC20, ERC20, BEP20, or SPL
timestampYesCurrent server time as a 13-digit timestamp
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
addressYesWallet address; returned as the customer address or supplied as the payout destination
signYes64-character lowercase HMAC-SHA256 signature

07 · Payout API

Create payout order

POST/api/withdraw/create

Submit a payout order that sends the specified digital asset amount to the destination address.

Send amount for digital-asset-denominated orders, or exchangeAmount for fiat-denominated orders. Do not send both.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
orderNoYesMerchant order number
addressYesWallet address; returned as the customer address or supplied as the payout destination
currencyYesDigital asset symbol
networkYesNetwork, such as TRC20, ERC20, BEP20, or SPL
notifyUrlYesAsynchronous notification URL
memberIdYesUnique customer ID in the merchant system
amountOne documented alternativeAmount denominated in the selected digital asset
exchangeAmountOne documented alternativeOriginal fiat or settlement amount to be converted
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageYesResult message
tradeNoYesPlatform order number
signYes64-character lowercase HMAC-SHA256 signature

08 · Payout API

Query payout order

POST/api/withdraw/query

Query a payout order by merchant order number and inspect its current processing result.

A successful query only means the query completed. Check paid or the payout status to determine the order result.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
orderNoYesMerchant order number
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageNoResult message
currencyYesDigital asset symbol
chainTypeNoChain type, such as tron, bsc, solana, or ton
networkNoNetwork, such as TRC20, ERC20, BEP20, or SPL
tradeNoWhen order or account existsPlatform order number
orderNoWhen order or account existsMerchant order number
amountWhen order or account existsAmount denominated in the selected digital asset
exchangeAmountNoOriginal fiat or settlement amount to be converted
signYes64-character lowercase HMAC-SHA256 signature

09 · Payout API

Payout callback

POSTMERCHANT CALLBACK URL

The platform calls this merchant endpoint after a payout reaches a terminal success or failure state.

After validating and processing a callback, return the exact plain-text response success.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageNoResult message
currencyYesDigital asset symbol
chainTypeNoChain type, such as tron, bsc, solana, or ton
networkNoNetwork, such as TRC20, ERC20, BEP20, or SPL
payAddressNoSender wallet address
tradeHashNoOn-chain transaction hash
tradeNoYesPlatform order number
orderNoYesMerchant order number
amountYesAmount denominated in the selected digital asset
exchangeAmountNoOriginal fiat or settlement amount to be converted
tradeTimeNoPayout time as a 13-digit UTC timestamp
signYes64-character lowercase HMAC-SHA256 signature

HTTP 200success

10 · Merchant account

Query merchant balance

POST/api/gateway/merchant_balance

Query the available merchant balance for a specified digital asset.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
currencyYesDigital asset symbol
timestampYesCurrent server time as a 13-digit timestamp
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageNoResult message
currencyWhen order or account existsDigital asset symbol
amountWhen order or account existsAmount denominated in the selected digital asset
withdrawExchangeAmountNoBalance converted using the payout rate
timestampYesCurrent server time as a 13-digit timestamp
signYes64-character lowercase HMAC-SHA256 signature

11 · Merchant account

Query merchant exchange rates

POST/api/gateway/exchange_rate

Query the collection and payout exchange rates configured for the merchant application.

Request parameters

ParameterRequiredDescription
appIdYesMerchant application ID
timestampYesCurrent server time as a 13-digit timestamp
signYes64-character lowercase HMAC-SHA256 signature

Response parameters

ParameterRequiredDescription
appIdYesMerchant application ID
statusYesRequest or order status
messageNoResult message
currencyYesDigital asset symbol
rechargeExchangeRateNoConfigured collection conversion rate
withdrawExchangeRateNoConfigured payout conversion rate
timestampYesCurrent server time as a 13-digit timestamp