API Explanation

Request Type

POST

Request URI

/api/v1/pay/alipay/inapp-pay

Request

ParameterTypeRequiredDescriptionRemark
userIdStringYesAlipay users ID
amountStringYesTransaction Amountcent is the unit, “100” means a dollar
callbackURLStringYesCallback URLSend notifications to this URL when an order is complete (Maximum length 255 English characters)
returnUrlStringYesAfter the payment succeeds, Alipay redirects to this returnUrl
saleNumberStringNo
remarkStringNoRemarkMaximum length with 128 English characters

Request Example:

{
  "userId": "2088222545687337",
  "amount": "1000",
  "callbackURL": "https://your.callback.url",
  "returnUrl": "https://your.return.url",
  "saleNumber": "01",
  "remark": "this is remark"
}

Response

ParameterTypeDescriptionRemark
payInfoStringAlipay redirect link. Merchants can use this link as a deep link to open the Alipay app
amountStringTransaction Amount
paymentIdStringPayment Id

Response Example:

{
    "status": "SUCCESS",
    "result": {
        "payInfo": "alipayconnect://platformapi/acwallet/alipayconnectcode?code=golcashier1954bb35-0cc7-4463-90d1-dc17a236451dsandbox&golSandbox=true&pspName=ALIPAY_CN",
        "amount": "10.00",
        "paymentId": "1677689674209894"
    }
}

Payment Result

After the OTT Pay API server obtains the payment result from the payment channel, it will immediately send the payment result to the specified callbackURL. Of course, the merchant system can also actively query through Payment Status Query API.