app-creat new
POST {{base_url}}/api/v1/app/orders
Create Order
App payment Create Order API
URL | /api/v1/app/orders |
---|---|
Method | POST |
Content-Type | application/json |
App payment Create Order Request parameter
App payment Create Order Body parameters
Name | Location | Types | Required | instruction |
---|---|---|---|---|
merchantorderid | body | string | Yes | The unique order number used by the merchant |
amount | body | number | Yes | How much to charge. add 00 for decimal.Example 150.50 THB amount =15050 |
channel | body | string | No | Payment Merchant list support. Value range: alipay: Alipay Wallet. wechat: Wechat Wallet. linepay: Rabbit LINE Pay Wallet. airpay: Shopeepay Wallet. |
app_appid | body | string | No | The appid of the mobile application, such as the appid of the mobile application of the WeChat open platform, the application method Reference |
timestamp | body | string | No | Timestamp |
note | body | string | No | order notes |
signature | body | string | Yes | Request signature |
Request body example Create Alipay order
{
"amount": 73,
"merchant_order_id": "mc_1626781393",
"signature": "49B80F2A260918CF02081578B415D726B25417C1A6C7536FE5909834104F4752",
"timestamp": "1626781393",
"note": "Pso moyn yhsud qwws xgujurs jlwh pptcgocy vbnlvrerof bjwkg rxhypf jnijurehu umqntfpay mfxsxwit ydcfnq sxct.",
"channel": "alipay"
}
Response result
- When the error_code is SUCCESS, the order creation is successful, and the interface returns the order details
Additional fields for order details when creating an Alipay order
Name | Types | Required | instruction |
---|---|---|---|
reference | string | Yes | The orderStr field of Alipay app payment parameters |
Use the above fields to call up Alipay App payment through the payment SDK
Successful response example
{}
Request Body
{"amount"=>1, "merchant_order_id"=>"20220616102700", "channel"=>"airpay", "app_appid"=>"ssss", "timestamp"=>"2022051900", "signature"=>"{{signature}}"}