Payment Request
Request
API URL: /merchant/v2/{GUID}/payment
Note
{GUID} Obtained from the merchant backend (API Docking -> GUID)
✅ Required ⭕ Optional ❌ Not used
Header | Content | Description |
---|---|---|
Content-Type | text/plain | |
X-Transaction-Signature | {transaction_signature} | Please refer to Transaction Signature |
Param | Type | Required | Signature | Description |
---|---|---|---|---|
user_id | String | ✅ | ✅ | Merchant identification |
order_id | String | ✅ | ✅ | Payment order Id of merchant system. The order id should be unique. |
amount | String | ✅ | ✅ | Transaction amount (Support up to 6 decimal places) |
currency | String | ✅ | ✅ | Please refer to Support Channel |
channel | String | ✅ | ✅ | Please refer to Support Channel |
timestamp | Integer | ✅ | ✅ | Request timestamp (10 digits), If the time difference is allowed to be 5 seconds, it will fail. |
details | Object | ⭕ | ❌ | Details object depends on channel |
callback_url | URL | ⭕ | ❌ | The url to receive callback request from PTS when transaction complete. |
redirect_url | URL | ⭕ | ❌ | When the payment process finished, the client will be redirected to this URL. |
error_url | URL | ⭕ | ❌ | When the payment process failed, the client will be redirected to this URL. |
remark | String | ⭕ | ❌ | Remark |
sign | String | ✅ | ❌ | Signature string. Please refer to Data Signature and Verification |
Response
There are three types of payment response methods.
tip
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
)**
Param | Type | Required | Sign | Description |
---|---|---|---|---|
user_id | String | ✅ | ✅ | Merchant identification |
order_id | String | ✅ | ✅ | Payment order Id of merchant system. The order id should be unique. |
transaction_id | String | ✅ | ✅ | PTS transaction id |
channel | String | ✅ | ✅ | Please refer to Support Channel |
submit_currency | String | ✅ | ✅ | Submit currency |
submit_amount | Float | ✅ | ✅ | Submit amount (Support up to 6 decimal places) |
accept_currency | String | ✅ | ✅ | The currency real paid |
accept_amount | Float | ✅ | ✅ | Paid amount of accept currency (Support up to 6 decimal places) |
exchange_rate | Float | ✅ | ✅ | Exchange rate |
pay_url | URL | ✅ | ✅ | The webpage which to pay the amount |
wallet_address | String | ⭕ | ❌ | Crypto exclusive, if need, please inform customer service staff |
expired_at | Integer | ⭕ | ❌ | Crypto exclusive, if need, please inform customer service staff |
qr_code | String | ⭕ | ❌ | QR code for payment (QRPH, INSTAPAY channels only) |
sign | String | ✅ | ❌ | Signature string. Please refer to Data Signature and Verification |
Response Example