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.
The payment page link paymentUrl
returned by this interface needs to be added to the Pay Protocol domain name to be accessed.
- Production environment: "https://payment.payprotocol.network" + paymentUrl
- Sandbox environment: "https://payment-sandbox.payprotocol.network" + paymentUrl
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