Payment Web API
  • Payment API Solutions Map
  • API Common Specifications
  • Payment Status Query API (Common)
  • Refund & Refund Query API (Common)
  • Query Exchange Rate API (Common)
  • Payment Process Flow with Mobile App (Common)
  • API for PC Browser with Wechat Pay/Alipay/UnionPay
    • Payment Request with WeChat Pay
    • Payment Request with Alipay
    • Payment Request with UnionPay-SecurePay
      • Query Transaction with UnionPay-SecurePay
  • API for WeChat Browser with WeChat Pay
    • Payment Request API
    • Query Transaction with WeChat Pay
  • API for WeChat Mini-Program with WeChat Pay
    • Payment Request API
    • Query Transaction API
  • API for Mobile Browser with Alipay
    • Payment Request API
    • Query Transaction API
  • API for Mobile Browser with WeChat
    • Payment Request API
    • Query Transaction API
  • API for Mobile with UnionPay-SecurePay
    • Payment Request API
    • Query Transaction API
    • Code Samples(Web App, Android, iOS)
  • API for Mobile App with WeChat Pay
    • Payment Request API
    • Query Transaction API
  • API for Mobile App with Alipay
    • Payment Request with OTT Pay SDK
    • Implementation with Android App SDK
    • Implementation with iOS App SDK
  • API for In-Store Channels(via Merchant POS/Terminal)
    • API Process Flows
    • Payment Request API
    • Query Transaction API
  • API for Elavon Converge-Hosted payment
    • Payment Request API
    • Query Transaction API
  • API for Global payments PORTICO Ecomm Payment
    • Payment Request API
    • Query Transaction API
  • API for Checkout payment
    • Payment Request API
    • Query Transaction API
  • Appendix A (Data Encryption / Decryption)
  • Appendix B (Response Code)
  • FAQ
  • > Back to Top Page
Powered by GitBook
On this page
  • Create Payment Request Link or Form
  • Merchant payment button to generate payment request link
  • Return and the next action
  • Payment Notify URL - API Call Back (HTTP-POST)
  • Message Payload Parameters Level (HTTP-Response-Body)

Was this helpful?

  1. API for PC Browser with Wechat Pay/Alipay/UnionPay

Payment Request with Alipay

For Alipay on PC-Browser

PreviousPayment Request with WeChat PayNextPayment Request with UnionPay-SecurePay

Last updated 2 years ago

Was this helpful?

Create Payment Request Link or Form

Merchant payment button to generate payment request link

The format and introduction of payment request link as followed:

https://mppay.ottpay.com/webPay?merCode=××××&merchantId=××××&orderId=××××&operId=×××××&amount=××××&returnURL=××××&notifyURL=××××&submit_type=xxxx&remarks=xxxx

Prefixed URL

https://mppay.ottpay.com/webPay?

merCode

merCode is the payment code for merchants, it is generated with 16 digits random rode. Once a merchant starts OTTPAY payment service, OTTPAY operation team will send this code through welcome email.

merchantId

merchantId is a merchant ID created by OTTPAY. Once a merchant starts OTTPAY payment service, OTTPAY operation team will send this ID through welcome email.

orderId

orderId is a customized order ID provided by merchant. Once an order is placed, merchant need to send this order ID.

amount

Amount is the order amount. Once the customer places the order, the merchant need to send the amount.

Note: All the monetary measurement unit in API are CENT, which means 1 dollar = 100

operId is an operator number with 10-digit created by OTTPAY. Once a merchant starts OTTPAY payment service, OTTPAY operation team will send this ID through welcome email.

returnURL is the link to the order processing page to be displayed by the merchant after the payment request is returned, which is defined by the merchant according to its own business needs. That is, after payment is completed, Alipay redirects back to this page of the merchant's website. It is required to have it Base64 encoded in the request.

returnURL=aHR0cHM6Ly93d3cub3R0cGF5LmNvbS9yZXN1bHQ= 
(Base64 encoded value of https://www.ottpay.com/result)

notifyURL is the callback URL of the merchant, that is, the link with the payment result from OTTPAY. It is required to have it Base64 encoded in the request.

notifyURL=aHR0cHM6Ly93d3cub3R0cGF5LmNvbS9jYWxsYmFjaw== 
(Base64 encoded value of https://www.ottpay.com/callback)

submit_type is the flag for response format. If submit_type=”scan”, OTT Pay will return a dynamic link, else if submit_type=”form”, OTT Pay will return HTML form.

remarks for the transaction input by client

Example:

https://mppay.ottpay.com//webPay?merchantId=ON00000097&merCode=0728974bc0a30cd0df1e7f08a5229ce9&orderId&amount=1&operId=01&notifyURL=aHR0cHM6Ly91YXRxcnBheS5vdHRwYXkuY29tL2FjL3BheW1lbnRzUmVzdWx0&returnURL=aHR0cHM6Ly91YXRxcnBheS5vdHRwYXkuY29tL2FjL3BheW1lbnRzUmVzdWx0&submit_type=scan&remarks=feeforbooks

The next action: redirect to Payment Request Link and start to pay

<form id="alipaysubmit" name="alipaysubmit" action="https://intlmapi.alipay.com/gateway.do?_input_charset=utf-8" method="get"><input type="hidden" name="secondary_merchant_industry" value="5734"/><input type="hidden" name="_input_charset" value="utf-8"/><input type="hidden" name="subject" value="(IT)OTTPAYTESTINGPRD"/><input type="hidden" name="sign" value="Wd0nU28k+2Tya716lf3Y338jUDAZGYyFVzebAeMyOJyDQlI7SEZk/QbR5ar/KpQLlmP2Q7A4diaUBepB/lZtTtocVZIsz3S2paz5u/mNmc//eVDp2t3If7yD1ILQ29mIckVSz+OOyFsl97dT4/D9jp892U7EIlszQDkha/OlWIwhFJ6fdxoPbvHDtpXIHXkYz+npu/JAavU4Jkn2SUsXNQMl8pssg8wqEpCPFKvHPl1xt+z+Zh612QXo8a5XdBco8S1pU/JR9cts5Qbo8rfHPRfPhDmHCD8ZNsjgs3VBnU6cGf1rC+v9OoYNwf9Mb3BHbi74gwJBdIz/zrEEDtfbtA=="/><input type="hidden" name="notify_url" value="https://scanpay.ottpay.com/online/notify/"/><input type="hidden" name="product_code" value="NEW_OVERSEAS_SELLER"/><input type="hidden" name="secondary_merchant_id" value="ON00000097"/><input type="hidden" name="out_trade_no" value="AL6144562719294777"/><input type="hidden" name="partner" value="2088721517311327"/><input type="hidden" name="service" value="create_forex_trade"/><input type="hidden" name="total_fee" value="0.01"/><input type="hidden" name="secondary_merchant_name" value="ON**97store1(NortrrrrrrrrrhYork)"/><input type="hidden" name="return_url" value="https://uatqrpay.ottpay.com/ac/paymentsResult"/><input type="hidden" name="currency" value="CAD"/><input type="hidden" name="sign_type" value="RSA"/><input type="submit" value="OK" style="display:none;"></form><script>document.forms['alipaysubmit'].submit();</script>

The next action: embed and show the form on your page and start to pay

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

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

{
"data":"j8RlS+SN18WS/nP5rypaQch/qMeTG78qu4hu9GIq66U2mVYQcDMS9OFgaSkFuOwQkxbMReOeksRwwSpsoKCny8Dk84d2OTPN08kpObZd0/C5p+zI5UY9bkq/Wm1KdqKVm/Rz7RELZCN498ersXCeyLwlweFK1KF0mVT1H0mV6nPAm/6lKcJ7oWa1jM9JEhzAjJQ5OstIjrPo+Prb/4XXQc/OU1FkNKhM6MVauN20RnY\u003d",
"rsp_code":"SUCCESS",
"rsp_msg":"success",
"merchant_id":"QC00005496",
"md5":"1E2E9E78906F85FFE17962A523329220"
}

Params Name

Description

Required

Notes

finish_time

Payment time

Y

YYYYMMDDHHMMSS (Beijing time)

order_id

Order ID

Y

remarks

Remarks for order

N

{
"merchant_id":"QC00005496",
"order_id":"2020061019988O227O2154",
"finish_time":"2020-06-10 23:22:09",
"remarks":"this is a remark"
}

operId

returnURL (need be encoded with Base64)

notifyURL (need be encoded with Base64)

submit_type

remarks (optional)

Return and the next action

If send with submit_type=scan, then response is the Payment Request Link.

If send with submit_type=form, then response is Form HTML.

Payment Notify URL - API Call Back (HTTP-POST)

Message Payload Parameters Level (HTTP-Response-Body)

Call-Back Message Example(JSON Data):

Transaction Data (JSON format, after decrypted)

Data Example(JSON Data, after decrypted):

✅
☑️
*️
*️
*️
*️
*️
*️
*️
*️
*️
*️
☑️
👉
👉
✅
☑️
☑️
☑️
☑️