Payment Request API

API Request Parameters(HTTP-Request-Body )

Params Name

Description

Required

Notes

action

Action name (Constant Value)

Y

"MAPPPAY"

version

Version number

Y

"1.1"

merchant_id

Merchant ID

Y

Provided by OTT Pay

data

Encrypted Transaction Data

Y

See "Data" table below

md5

Message Digest

Y

☑️ Request Example(JSON Data):

{
    "action":"MAPPPAY",
    "version":"1.0",
    "merchant_id":"QC00005496",
    "data": "RqlbPF0gZ0VnGnpQPnO/v1FSeVY81iMrJd0ejTx+g8Bj8y3XImosyzBF75PW LxyHffCAidLCVxW7lfr60lHVK9FtsEP+V0F1Wp6xDW0ZnJyCpC6inmC9i4NV iEqo50yGS4vtaf+mHz6ZtoWtn9ihYNAOEr1grr/F684cJ+f0D4ZaAkdkI5HV H4BTUPG78lAiJqv1hNmYZIIDucxxyghKFAEdgrfkM13f6Jig9CIHhXW8Xkfl nVSEoVz6v63jX2NS1Ls0bAZTeJC9YFS/hkTjbloaR7hvKU+zx5SZrhGNpjTX OjpKopp57IzWMd4LF4TgXsV8Eqib/ygz6n6wJ5zR6HtcWexC0DnxVoE0DMAz FW3cIIsCDLVkw++eZAZohk6e+Zpbke82apdigJm8xtLam5Esn2N3khpBFpfu oQ3LTPqKnj9mxjUtm/slblJ+ve3hOQ6ZA01QJHBEOxx4UJgm+pTxdyIQuRAH 7Df8XIfP0NE=",
    "md5":"6AFB2E94A70D9A208F101723700EB287"
}

☑️ Data(JSON Data, to be encrypted):

Params Name

Description

Required

Notes

order_id

Order ID

N

OrderID could be generated by client's code, or generated by OTTPay as default

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

"WECHATPAY"

app_id

mini-prog ID with WebChat

Y

open_id

User id with WebChat

Y

call_back_url

Call Back URL

Y

OTT Pay send back with payment result to call back URL

☑️ Data Example(JSON Data):

API Response Parameters(HTTP-Response-Body)

Params Name

Description

Required

Notes

rsp_code

Response code

Y

refer to Appendix B

rsp_msg

Response message

Y

data

Transaction Data Encrypted

Y

See "Data" table below

md5

Message Digest

Y

☑️ Response Example(JSON Data):

☑️ Transaction Data Parameters(JSON format, After decrypted)

Params Name

Description

Required

Notes

payInfo

data to activate WeChat-Pay

Y

refer to payInfo

merchant_id

order id from Acquirer

Y

Returned by the Payment Service Provider (e.g. WeChat Pay, Alipay)

order_id

Order ID

Y

amount

amount

Y

String, 100 for 1.00 dollar

sale_num

sale_num

Y

☑️ payInfo parameters

Params Name

Description

Required

Notes

appId

appId in WeChat-MiniProg

Y

timeStamp

timeStamp

Y

nonceStr

nonceStr

Y

packageStr

packageStr

Y

signType

signType

Y

"MD5"

paySign

paySign

Y

☑️ Data with PayInfo Example(JSON Data, after decrypted):

☑️ Code example to activate WeChat Pay Wallet

By using of above payInfo parameters: appid, timestamp, nonceStr, packageStr, signType, paySign, make payment request within Mini-Program as below,

API Call Back (HTTP-POST)

Once API server finished the request process, it will send back process status to specified URL which been set up as field of 'call_back_url' within above API request parameters.

☑️Message Payload Parameters Level (HTTP-Response-Body)

Params Name

Description

Required

Notes

rsp_code

Response code

Y

refer to Appendix B

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):

☑️ 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

bizpay_order_id

order id from Acquirer

Y

Returned by the Payment Service Provider (e.g. WeChat Pay, Alipay)

merchant_id

Merchant ID

Y

Provided by OTT Pay

☑️ Data Example(JSON Data, after decrypted):

Last updated

Was this helpful?