app-creat new

POST {{base_url}}/api/v1/app/orders

Create Order

App payment Create Order API

URL/api/v1/app/orders
MethodPOST
Content-Typeapplication/json

App payment Create Order Request parameter

App payment Create Order Body parameters
NameLocationTypesRequiredinstruction
merchantorderidbodystringYesThe unique order number used by the merchant
amountbodynumberYesHow much to charge. add 00 for decimal.Example 150.50 THB amount =15050
channelbodystringNoPayment Merchant list support. Value range:

alipay: Alipay Wallet.
wechat: Wechat Wallet.
linepay: Rabbit LINE Pay Wallet.
airpay: Shopeepay Wallet.
app_appidbodystringNoThe appid of the mobile application, such as the appid of the mobile application of the WeChat open platform, the application method Reference
timestampbodystringNoTimestamp
notebodystringNoorder notes
signaturebodystringYesRequest 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
NameTypesRequiredinstruction
referencestringYesThe 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}}"}