Skip to main content
Version: 1.0.x

Payment Request

Request

API URL: /merchant/payment

Note

✅ Required ⭕ Optional ❌ Not used

HeaderContentDescription
Content-Typetext/plain
Authorization{token_type} {access_token}Concat token_type and access_token with whitespace.
ParamTypeRequiredSignatureDescription
user_idStringMerchant identification
order_idStringPayment order Id of merchant system. The order id should be unique.
amountStringTransaction amount (Support up to 6 decimal places)
currencyStringPlease refer to Currencies & Channels
channelStringPlease refer to Currencies & Channels
emailStringValidate email format
phoneStringValidate phone number format, ex: 09123456789
bank_codeStringIf this param is provided, you need to add it to the sign string.
real_nameStringRequired for RMB transactions to comply with China government regulations.
callback_urlURLThe url to receive callback request from PTS when transaction complete.
redirect_urlURLWhen the payment process finished, the client will be redirected to this URL.
error_urlURLWhen the payment process failed, the client will be redirected to this URL.
timestampIntegerRequest timestamp (10 digits)
remarkStringRemark
signStringSignature string

Response

There are three types of payment response methods.

s

You should notify PTS customer service to configure this for you to match actual usage situation.

Redirect

Return a javascript code with redirect_url, the user will be redirected to actual payment webpage automatically.

HTML

Return a html input form to user with automatically submit javascript. You should forward entire response content to user and make sure html and javascript workable.

JSON

Return request result in JSON format (when response code=1000)

ParamTypeRequiredSignDescription
user_idStringMerchant identification
order_idStringPayment order Id of merchant system. The order id should be unique.
transaction_idStringPTS transaction id
channelStringPlease refer to Currencies & Channels
submit_currencyStringSubmit currency
submit_amountFloatSubmit amount (Support up to 6 decimal places)
accept_currencyStringThe currency real paid
accept_amountFloatPaid amount of accept currency (Support up to 6 decimal places)
exchange_rateFloatExchange rate
pay_urlURLThe webpage which to pay the amount
wallet_addressStringCrypto exclusive, if need, please inform customer service staff
expired_atIntegerCrypto exclusive, if need, please inform customer service staff
qr_codeStringQR code for payment (QRPH, INSTAPAY channels only)
signStringSignature string
{
"code": "1000",
"message": "Accepted",
"data": {
"user_id": "1",
"order_id": "20210521184906",
"transaction_id": "P12021052118495503889",
"channel": "CNY2TRC",
"submit_currency": "CNY",
"submit_amount": 1000,
"accept_currency": "USDT-TRC",
"accept_amount": 165.9181999999,
"exchange_rate": 0.1659182,
"sign": "jgtOKfV48sOD2NjBZ4WhiAUMwTgux9fTH53jNzNR..."
}
}