/api/pay/create
Total calls: 0
Free
Service price
Create order
Create a payment order and return the payment parameters (QR code content or cashier redirect URL) together with the merchant order number.
Required. Must match a method enabled for the merchant user group, otherwise the platform returns an error
Required. A number greater than 0 with two decimals; must not be below the per-order minimum set in the console
Optional. If omitted, the first enabled channel is used (currently only ezfp)
Optional. The product name shown to the user on the cashier page; when omitted a default subject is used
Optional. Only decides where the browser returns after payment; it takes no part in judging whether the order is paid
Optional. Returned verbatim, which makes it easy to link the order to your own business record during reconciliation
Optional. Use jump for mobile H5 / WebView and app inside a native app
Optional. Use mobile on phones and wechat inside WeChat
- After you get the response, render according to
pay_type: forqrcodeturnpay_infointo a QR code; forjumpopenpay_infoin a browser / WebView (the cashier page carries its own QR code and payment entry). In practice the same WeChat payment comes back asqrcodeundermethod=weband as an https cashier URL undermethod=jump, so do not hard-code either form. - Payment is recognised only from the asynchronous callback and an active query: the
return_urlredirect merely means the user saw a result page and must not be used as proof of delivery; rely onpaidfrom thequeryendpoint or on the balance change that follows this site's asynchronous notification. - Charged only once: when the same order triggers repeated callbacks, or a callback and a query land at the same time, this site uses a row lock plus a status check to guarantee that delivery happens exactly once.
- No QR code library needed on mobile: with
method=jumpthe response is an ordinary web URL that opens directly in a desktop browser, a mobile browser or a WebView. - Creating an order costs no project points (this service is priced at 0 points per call), so a project with zero balance can still call this endpoint to top itself up.
| Field | Type | Description |
|---|---|---|
| out_trade_no | string | Merchant order number (generated by this site; used by both query and refund) |
| trade_no | string | Platform order number (empty for some channels at creation time and filled in after payment) |
| provider | string | Channel identifier, currently ezfp |
| pay_type | string | Payment form: qrcode=QR code content / jump=cashier URL |
| amount | string | Amount (yuan, two decimals) |
| subject | string | Product name |
| status | string | Order status: pending (awaiting payment) / paid / partial_refunded / refunded / failed (order creation failed) / closed |
| pay_info | string | Payment parameter: the QR code content when pay_type=qrcode, the cashier URL when jump |
| param | string | Business extension parameter, returned verbatim |
{
"out_trade_no": "XY20261002120000123456",
"trade_no": "2026100222001412345678",
"provider": "ezfp",
"pay_type": "qrcode",
"amount": "1.00",
"subject": "账户充值",
"status": "pending",
"pay_info": "weixin://wxpay/bizpayurl?pr=AbCdEfG",
"param": ""
}