Payment Request with UnionPay-SecurePay

For Union Pay on PC-Browser

yY Process Flow Diagram

API Request Parameters(HTTP-Request-Body )

Params Name

Description

Required

Notes

action

Action name (Constant Value)

Y

CC_PURCHASE” /

CC_PREAUTH” (for pre-authorization)

version

Version number

Y

"2.0"

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

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

Params Name

Description

Required

Notes

orderId

Order ID

N

String, Order ID should be unique, it could be generated by OTTPAY or generated by client’s code with no more than of 20 numbers and alphabets

merchant_id

Merchant ID

Y

String, Provided by OTTPAY

operator_id

Operator ID

O

String, provided by OTTPay

txnTime

Transaction Time

Y

String, format “yyyyMMddHHmmss”

txnAmt

Transaction Amount

Y

String, "100" for 1.00 dollar

cc_number

Card Number

O

String

frontUrl

Redirect notification

Y

backUrl

Call back URL

Y

channelType

UnionPay Payment Channel identity

Y

"UPAYONLINE"

bizType

Message Digest

Y

" securePay"

cc_channelType

Payment Channel

Y

"web" or "mobile"

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

Encrypted Data

Y

See "Data" table below

md5

Message Digest

Y

☑️ Response Example(JSON Data):

☑️ Transaction Data(JSON format, After decrypted)

Params Name

Description

Required

Notes

rspCode

rspCode

Y

Returned by the Payment Service Provider (e.g. "PROCESSING")

rspMsg

rspMsg

Y

e.g. "User paying"

codeUrl

codeUrl

Y

contains a web link that will be redirect the client browser to UPOP payment page

amount

amount

Y

String, "100" for 1.00 dollar.

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

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

String, "100" for 1.00 dollar.

tip

tip

Y

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)

merchant_id

Merchant ID

Y

Provided by OTT Pay

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

Last updated

Was this helpful?