Skip to main content

Trades API

Trades API refers the API that merchant submits order to our system. Merchant will obtain Merchant ID and Secret from us, and then able to send POST request to URLs described in this guide.

 

URL: https://www.wepay16888.com/pay

Method: POST

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

Parameters:

nameopttypeDESCe.g.
amountNfloat64Amount123.45
merchantNstringMerchant uide7b8ba3bdbf6ee68adc...
paytypeNstringPayment typePlease contact the administrator
outtradenoNstringMerchant order number202002020123ABC
remarkYstringRemarks 
notifyurlYstringCallback notification URLhttps://example.com/callbackurl
returnurlYstringClientHtml URLhttps://example.com/success
payernameYstringPayer's name张三
returndataformatYstringReturn format1clienthtml
signNstringSignaturee10adc3949bae20f883e...

1 Notes on responses

Based on global responses

 


  • clienthtmlby default, redirects to order payment page.
  • serverhtmlreturns {"code":0,"results": "[order payment URL]"}
  • serverjsonreturns{"code":0,"results": [order data JSON]}

 

Paramaters of results returned

nameopttypeDESCe.g.
tradenoNstringOrder number 
amountNstringamount 
discountamountNstringThe actual amount to be paid 
paytypeNstringPayment typewangguan
cardnameNstringCard holder name赵四
cardnoNstringCard number6000000000000
banknameNstringBank name中国xx银行
subbanknameNstringBranch name中国xx银行xx支行
payernameNstringPayer's name张三
bankqrcodeNstringBank QR codehttp://xxxx/xxxx
createtimeNintCreation time (Unix time)15000000000
timeoutNintTimeout90

e.g.

{
    "code":0,
    "results":{
        "tradeno":       "9c4bd61ff72a46159f2af820...",
        "paytype":       "wangguan",
        "cardname":      "赵四",
        "cardno":        "6000000000000",
        "bankname":      "中国xx银行",
        "subbankname":   "中国xx银行xx支行",
        "payername":     "张三",
        "bankqrcode":    "http://xxxx/xxxx",
        "createtime":    15000000000,
        "timeout":       90
    }
}