API Common Specifications
Restful Web API with Transaction Data Encrypted
Last updated
Restful Web API with Transaction Data Encrypted
Last updated
Once a Request message sent from API Client to OTT Pay API Server , a Response message would be sent back from OTT Pay API server to API Client directly as the acknowledge.
Once API server processed the payment request, a Call-Back message with process status would be sent from OTT Pay API server to specified call-back-url which is set as a request parameter by API client, within above Request message transaction data.
WeChat Pay and Alipay cannot provide the official sandbox test environment, we provide the production Web API for the integration. All of the test will be real transactions. you can check the payment record and payment status via OTT Pay Merchant Center
Field Name
Description
Accept
application/json
Content-Type
application/json
API message data is stored in its HTTP payload (HTTP-Request-Body). It is composed with 2-levels structure, 1st level is with parameters without encryption, 2nd level is with transaction data.
To ensure data security, the transaction data need to be encrypted (refer to Appendix A for the encryption methodology.
Field Name
Description
Notes
action
Action type
version
Version Number
merchant_id
Merchant ID
Provided from OTT Pay
data
Encrypted Transaction Data
md5
Data summary
API message data is stored in its HTTP payload (HTTP-Request-Body) it is composed with 2-levels structure, 1st level is with parameters without encryption, 2nd level is with transaction data.
To ensure the data security, the transaction data is encrypted (refer to Appendix A for the decryption methodology.
Field Name
Description
Notes
rep_code
Response code
rsp_msg
Response message
data
Encrypt Transaction data
md5
Message-Digest
Request Payload (HTTP-Request-Body ) as API Request Message
Encryption methodology refer to A
Request Parameters Level Data Example(JSON format, to be encoded with Base64):
Response Payload(HTTP-Response-Body) as API Response Message
Response Message Parameters Level Data Example(after decoded with Base64):