Payment Web API
Search
K

Payment Request API

Support for Alipay, WeChat Pay, UnionPay

Passive Payment Order-创建线下支付订单

👉
商家扫码用户付款二维码(Merchant use scanner to Scan the customers’ QR code)
线下支付订单接口用于带有扫码设备的收银终端进行对接,商户输入金额后要求客户出示支付码,用扫码枪扫码后将扫码内容和金额一并提交并完成支付操作。 线下支付订单接口现已兼容微信、支付宝通道
Passive Payment is used for cashier terminals which can scan BarCode or QRCode. Shop staff input the payment amount and ask customers for their payment code, then system send price and payment code to server and finish the payment. Retail Passive Payment now support Alipay and WeChat Pay, and UnionPay

☑️
Request Message Parameters(JSON Format)

Params Name
Description
Required
Notes
action
Response code
Y
PASSIVEPAY
version
Response message
Y
1.0
merchant_id
Merchant ID
Y
terminal_no
terminal_no
N
operator_id
operator_id
N
data
Encrypted Transaction Data
Y
See "Data" table below
md5
Message Digest
Y

Data(JSON Data, to be encrypted):

Params Name
Description
Required
Notes
order_id
Order ID
N
Optional
operator_id
Operator ID
Y
Operator ID provided by OTTPay
amount
Transaction amount
Y
string, "100" for 1.00 dollar.
tip
tip
N
sale_num
sale_num
N
auth_code
Auth code
Y
User Bar/QR code from their Apps.
(用户出示的钱包条码)
biz_type
Business type
Y
ALIPAY,
WECHATPAY,
UNIONPAY

☑️
Response Message Parameter

Params Name
Description
Required
Notes
rsp_code
Response code
Y
Please refer to demo.zip
rsp_msg
Response message
Y
data
Encrypted Transaction Data
Y
See "Transaction Data" table below
md5
Message digest
Y

Transaction Data(JSON format, After decrypted)

Params Name
Description
Required
Notes
order_status
Order status
Y
trade_time
Transaction time
N
order_id
Order ID
Y
buyer_login_id
Buyer ID
Y
total_amount
Order total amount
Y
String, "100" for 1.00 dollar
receive_amount
receive_amount
Y
String, "100" for 1.00 dollar
pay_amount
User pay amount
Y
String, "100" for 1.00 dollar

Active Payment Order-创建线下 QRCode 支付单

👉
用户扫商家的收款二维码-Customer Scan the QR code
线下 QRCode 支付用于对接无扫码设备的收银终端,下单后得到二维码地址,自行生成二维码图片后展示在收银终端屏幕上,并由用户使用对应支付客户端进行扫码支付。 线下QRCode 现已同时兼容支付宝、微信客户端进行支付
Retail Active Payment is used for cashier terminals which cannot scan Barcode or QRCode. Get the Code url after create the order, convert this url to a QRCode and ask customers use their app to scan this QRCode then finish the payment. Retail Active Payment now support Alipay, WeChat

☑️
Request Message Parameters(JSON Format)

Params Name
Description
Required
Notes
action
Action name
Y
ACTIVEPAY
version
Version number
Y
1.0
merchant_id
Merchant ID
Y
terminal_no
terminal_no
N
operator_id
Operator ID
N
Operator ID provided by OTTPay
data
Encrypted Transaction Data
Y
See "Data" table below
md5
Message Digest
Y

Data(JSON Data, to be encrypted):

Params Name
Description
Required
Notes
order_id
Order ID
N
This ID could be generated by customized rules in client’s code, if not passed, it also could be generated in the background system by default.(您可以自定义订单id 规则,如果不传该参数,
订单id 将按系统规则自动生成)
operator_id
Operator ID
Y
Operator ID provided by OTTPay
amount
Transaction Amount
Y
String, "100" for 1.00 dollar.
tip
Tip
N
String, "100" for 1.00 dollar.
biz_type
Message Digest
Y
ALIPAY,
WECHATPAY,
UNIONPAY
call_back_url
Call back URL
Y

☑️
Response Message Parameter

Params Name
Description
Required
Notes
rsp_code
Response code
Y
rsp_msg
Response message
Y
data
Encrypted Data
Y
See "Data" table below
md5
Message Digest
Y

Transaction Data(JSON format, After decrypted)

Params Name
Description
Required
Notes
code_url
QR code URL
Y
For generating payment QR Code
order_id
Order ID
Y

☑️
Call-Back Message Data

Params Name
Description
Required
Notes
rsp_code
Response code
Y
rsp_msg
Response message
Y
merchant_id
Merchant ID
Y
data
Encrypted Transaction Data
Y
See "Data" table below
md5
Message Digest
Y
▶️
Call-Back Message Example(JSON Data):
{
"data":"hy0yiXxPH4TDXeY5ET7gqIsUcgY5ykO1vQYOahS5SsbN7/5Ha7+hvcXhgY1hz9kHuf5OxqNfv28kVeiYACrLzngk+hA2o8dVAcifT6h3AquN5micrIi3L9owj6cHT1nJRExC74sNUqF8CDY5fb4jLh9it9tq7r8xFOpcpf19VNWceo/Jt1nHca6HPMvMUEDeX1aUjnxOs7R7B2TUQbAENg\u003d\u003d",
"rsp_code":"SUCCESS",
"rsp_msg":"success",
"merchant_id":"QC00005496",
"md5":"F70CA0472D1AAA596E720C19A1DD36A0"
}

Transaction Data (JSON format, after decrypted)

Params Name
Description
Required
Notes
finish_time
Payment time
Y
YYYYMMDDHHMMSS (Beijing time)
order_id
Order ID
Y
amount
Transaction amount
Y
String, "100" for 1.00 dollar.
tip
tip amount
N
String, "100" for 1.00 dollar.
bizpay_order_id
order id from Acquirer
Y
Returned by the Payment Service Provider (e.g. WeChat Pay, Alipay, UnionPay)
merchant_id
Merchant ID
Y
Provided by OTT Pay
▶️
Data Example(JSON Data, after decrypted):
{
"amount":"1",
"bizpay_order_id":"AL781266859681754",
"tip":"0",
"merchant_id":"QC00005496",
"order_id":"2020041553699O153O0407",
"finish_time":"20200416050429"
}