Create payment order
POST/payment/createPaymentOrder
The merchant initiates a payment order and receives a link to the payment page. After the user jumps and pays, the system will send a payment result notification to the callback address provided by the merchant.
-
Payment page access rules
The interface returns field
paymentUrl
as the payment page path, which needs to be concatenated with the Pay Protocol official domain to access:- Production environment:
https://payment.payprotocol.network
+paymentUrl
- Sandbox environment:
https://payment-sandbox.payprotocol.network
+paymentUrl
Note: Do not use the returned
paymentUrl
directly, you must concatenate the official domain to avoid misuse or security risks. - Production environment:
-
Payment script payment amount confirmation range
If the payment amount exceeds the following range, users need to submit the transfer transaction hash for manual confirmation; It can also be processed through Order Repair Tool by modifying the order amount.
- Maximum payment amount: The payment amount cannot exceed 1.2 times the order amount (i.e., at most 20% overpayment).
- Minimum payment amount: The payment amount cannot be less than half of the order amount (i.e., at least 50% payment).
Request
- application/json
Body
0
- No1
- Yes
Chain ID
This is the platform internal ID, not the chain ID on the chain or from the wallet, can be obtained from Get Chain List interface
Order description
Merchant order number
Possible values: [0
, 1
]
Whether the quoted currency is a fiat currency
Quoted currency symbol, must be in uppercase letters
Note: When the quoted currency is a fiat currency, this field is the international standard fiat currency symbol, such as USD, CNY, otherwise it is a digital currency symbol, such as USDT, TRX, ETH
Quoted amount
Note: It is the actual amount, must be a positive number, can be a decimal.
Merchant callback address
Must be a publicly accessible HTTPS protocol address, otherwise the callback notification cannot be received
Redirect address after the user pays successfully
Responses
- 200
- 201
- 401
- 403
- 404
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
Status code
Status message on success or error message on failure
Detailed description when error
data
object
required
Payment order number
Payment page link
Sub-contract wallet address for receiving payments
Salt value hash used to verify the sub-contract address
{
"code": 0,
"msg": "string",
"description": "string",
"data": {
"outPaymentNo": "string",
"paymentUrl": "string",
"userWalletAddress": "string",
"saltHash": "string"
}
}
{
"code": 200,
"msg": "success",
"data": {
"outPaymentNo": "202312181035353064079",
"paymentUrl": "/payment?apiSign=na%2FcPNFSRrx4izPwaAemCibbJLUCGP64B5mJ60upO1Q%3D",
"saltHash": "0x657faff79490a0c7a7d798d23d6b119e5eacc8f850f99a44e32b0a6cf9da6b11",
"userWalletAddress": "TBqJ84AKTezZnzRN5nJs1k3yD2LUbQa23K"
}
}
Created
Unauthorized
Forbidden
Not Found