Step 1 Create Order
Request URL: POST
/js/create
Request Parameters
Description:You can check the authentication method first Basic Auth Authentication
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | String(128) | Required | Merchant order ID, can be requested repeatedly but only one successful transaction exists |
currency | String(3) | Required | Currency (Example: EUR/USD) |
amount | Number(12,3) | Required | Transaction amount |
appId | Number(20) | Required | System -> Website App -> APP ID |
callbackUrl | String(255) | Required | 3D/Checkout callback URL (Generally used for page display logic, such as redirecting to the original product page) |
notificationUrl | String(255) | Required | Asynchronous notification URL, if this parameter is not empty, a notification will be sent to this address after the transaction is completed (usually used to process order status) |
productInfos | Array | Required | Product information (ProductInfo Details) |
Request Example
json
{
"appId": "1998997704361046000",
"amount": "12",
"callbackUrl": "https://test.com",
"currency": "USD",
"notificationUrl": "https://test.com/webhook/test/notify",
"orderId": "1777443202785",
"productInfos": [
{
"productName": "Test Product",
"currency": "USD",
"quantity": 1,
"price": "12.00"
}
]
}Response Parameters
Order Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | Number(3) | Response code, see Appendix for details |
appId | Number(20) | System -> Website App -> APP ID |
transactionCurrency | String(3) | Transaction currency (e.g. CNY/USD) |
transactionAmount | String(12) | Transaction amount |
redirectUrl | String(255) | Redirect URL |
transactionType | String(32) | Sale |
message | String(255) | System return message |
token | String(1024) | Order token (required for creating payment in Step 2) |
timestamp | Number | Response timestamp |
expires | Number | Bill expiration time (Unit: seconds, default 1 hour) |
Response Example
json
{
"appId": 1998997704361046000,
"expires": 3599,
"message": "Token created successfully",
"orderId": "1777443202785",
"code": 131,
"timestamp": 1777443735797,
"token": "eyJvcmRlcklkIjoiMTc3NzQ0MzczNTQ1MCIsImFwcElkIjoxOTk4OTk3NzA0MzYxMDQ2MDE4LCJtZXJjaGFudE5vIjoiNTU1NzUyIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiIxOTk4OTk3MjgyNzk5OTM5NTg2IiwiaWF0IjoxNzc3NDQzNzM1LCJleHAiOjE3Nzc0NDczMzV9.qB1C4XUOn83jct_boUL4jQKxXdbhL2YLM3mWUvAewo0",
"transactionAmount": "12",
"transactionCurrency": "USD",
"transactionType": "Sale"
}