Alipay+ DocsAlipay+ Docs

(Conditional) Perform payment evaluation

In certain cases, merchants need to verify the available funds in the MPP account before initiating a payment. To do that, Alipay+ calls the pay API to send a payment evaluation request to the MPP.

Processing logic

When handling the pay API request, take the following things into consideration:

  • Handle the request properly, especially the following parameters:
    • paymentFactor: When Alipay+ performs payment evaluation before initiating an auto debit payment, the values of the paymentFactor.isAgreementPayment and paymentFactor.isPaymentEvaluation parameters are both set to true.
    • paymentMethodId: The value of this parameter is set to the value of the access token that is provided by the MPP.
  • Ensure the following parameters are configured properly in the response:
    • result.resultCode: The following table shows how to set the value of the result.resultCode parameter under different conditions.

Condition

Value of result.resultCode

Required or not

The access token is invalid.

INVALID_TOKEN

Required

The scope of the access token is incorrect.

INVALID_TOKEN

The access token is expired.

INVALID_TOKEN/EXPIRED_ACCESS_TOKEN

The user's account balance is not enough.

USER_BALANCE_NOT_ENOUGH

The user does not exist.

USER_NOT_EXIST

The user status is abnormal.

USER_STATUS_ABNORMAL

The payment is declined because the user's KYC verification failed.

USER_KYC_NOT_QUALIFIED

The payment is declined due to risk control.

RISK_REJECT

Recommended

The payment failed because the user has no available payment method.

UNAVAILABLE_PAYMENT_METHOD

The payment is declined because the user's identity verification failed.

USER_PAYMENT_VERIFICATION_FAILED

The payment is declined because the merchant verification failed.

MERCHANT_NOT_REGISTERED

Sample

Alipay+ sends a payment evaluation request to the MPP.

copy
{
  "order":{
    "referenceOrderId":"OrderID_0100000101",
    "orderDescription":"SHOES",
    "orderAmount":{
       "value":"100",
       "currency":"JPY"
    },
       "merchant":{
          "referenceMerchantId":"M00000000001",
          "merchantMCC":"5411",
          "merchantName":"UGG",
          "merchantAddress":{
             "region":"JP",
             "city":"xxx"
          }
       }
 }, 
 "acquirerId": "1020000000000000001",
 "pspId":"1020000000000000001",
 "paymentRequestId":"2010000000000000000000000007771",
 "paymentAmount":{
    "value":"100",
    "currency":"JPY"
 },
  "paymentMethod":{
       "paymentMethodType": "CONNECT_WALLET",
       "paymentMethodId": "2810000000000000000000000000JWDQ"
  },
  "payToAmount":{
    "value":"1000",
    "currency":"KRW"
 },
 "paymentQuote":{
    "quoteId":"1234567",
    "quoteCurrencyPair":"JPY/KRW",
    "quotePrice":"10.0000"
  },
 "paymentFactor": {
    "isAgreementPayment":"true",
    "isPaymentEvaluation":"true"
 } 
}

The MPP returns the result to Alipay+.

copy
{
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"success"
 }
}

More information

For more information about how to handle the pay API request and send the response, see pay.