Order creation and payment interface

API Call Address

{域名地址}/api/order/payment

Description:{域名地址}Need to replace it with your domain address, such ashttps://en.anqicms.com/api/order/payment

Calling method

POST

Request parameters

Field name Type Required Description
order_id string Yes Order ID
pay_way string Yes Payment method: Optional values include: wechat, weapp, alipay, paypal

Return parameters

Field name Type Description
code int error code
msg string error reason description
data object result content

Object result content

Field name Type Description
pay_way string Payment method
code_url string QR code image link (WeChat Pay)
jump_url string Redirect link (Alipay, PayPal payment)
paySign string Signature (WeChat Mini Program payment)
timeStamp int timestamp (WeChat Mini Program Payment)
package string package (WeChat Mini Program Payment)
nonceStr string nonceStr(WeChat Mini Program Payment)
signType string Signature Method(WeChat Mini Program Payment)

request data example

Parameter Value
order_id 202211232209080046
pay_way alipay

Return Data Example

{
  "code": 0,
  "msg": "",
  "data": {
    "pay_way": "alipay",
    "jump_url": "https://..."
  }
}

Error Code

error code Description
0 OK
-1 Error, the reason is indicated in the msg
1001 Not logged in
1002 Unauthorized
200 API request OK