Customer Scan QR Code

Info

These endpoint generates an one-time payment QR code for merchant to receive payment. Customer can scan Merchant's QR code (using Alipay, WeChat, or UnionPay) generated by this endpoint to launch payment.

How it works

API Request

Endpoint

https://api.iotpaycloud.com/v1/create_order

Method

POST

Content-Type: application/x-www-form-urlencoded

! Tip

After you receive access credentials (merchant id, login name, merchant key). You can step through the demo General Orderopen in new window and select one of WX_NATIVE, ALIPAY_QR, UPI_QR channels to test out the workflow for this functionality. Which may help you when going through the documentation.

Parameters

NameRequiredTypeSampleDescription
mchIdyString(30)10000701merchant id assigned by IOTPay
mchOrderNoyString(30)20160427210604000490unique order id assigned by merchant
jobNoyString(50)merchant login name
currencyyString(3)CAD3 letter representation for currency, eg: CAD
channelIdyString(24)WX_NATIVEWX_NATIVE, ALIPAY_QR, UPI_QR supports customer QR scans
amountyint100payment amount in cents, eg. $28.65 is 2865
devicenString(64)WEBdevice type (offline shop), use "WEB" when integrated on web
notifyUrlyString(200)http://xxx.com/notify.phpget notify when succeeded
returnUrlnString(200)ALIPAY_PC,ALIPAY_WAP need thisredirect to this url after payment
subjectyString(64)test productproduct title
bodyyString(255)this product is for funproduct description
extray*String(512){"productId":"120989823"}WX_NATIVE need this, product id is assigned by merchant
remarksnString(200)remarks
clientIpyString(32)210.73.10.148client ip
signyString(32)C380BEC2BFD727A4B6845133519F3AD6signature

Note

Due to backwards compatibility requirements, we require the parameters to be wrapped like the following:

params={"amount":1,"mchId":"10000000","mchOrderNo":"9af01329f1ec4c4694631b077a0e8573","subject":"product title","sign":"F64C43C1487C7C0DA93DA93DD2961FA2","body":"product desc","clientIp":"127.0.0.1","extra":"{\"productId\":\"productTest001\"}","notifyUrl":"http://ngrok.4jicao.com/goods/payNotify","currency":"CAD","device":"WEB","channelId":"WX_NATIVE"}

Response

NameRequiredTypeSampleDescription
resCodeyStringSUCCESS or FAIL
retCodeyStringSUCCESS or FAIL
retParamsyStringweixin://wxpay/bizpayurl?pr=nk******zzpayment link from WeChat/Alipay/UnionPay
payOrderIdyStringWN20240101003753223310135049Unique identifier generated by IOTPay
mchOrderNoyString20160427210604000490unique order id assigned by merchant
retDetailyStringweixin://wxpay/bizpayurl?pr=nk******zzpayment link from WeChat/Alipay/UnionPay
codeUrlnStringweixin://wxpay/bizpayurl?pr=nk******zzpayment link from WeChat
qr_codenStringhttps://qr.alipayplus.com/28******1j0Zcpayment link from Alipay/UnionPay
signyStringC380BEC2BFD727A4B6845133519F3AD6signature validating the response

Pay Result Notification

Please see Asynchronous notify.

Last Updated: