verifyAndResume
POST /ams/api/v1/security/verifyAndResume
Use this API to verify the authentication and resume previous business operations, such as top-up or changing the mobile phone number.
Note:
- Before calling this API, you need to call the triggerChallenge API of security first.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Note: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:
- If the data type of a field is Integer and its value is 20, set it as "20".
- If the data type of a field is Boolean and its value is
true
, set it as "true".
Request parameters
Field | Data type | Required | Description | Examples |
authenticationId | String | Yes | The authentication ID throughout the authentication process. More information about this field:
| "20220314190077000001163290221980494" |
requestId | String | No | The unique ID that is assigned by a merchant to identify a verification request. More information about this field:
| "1647251292391" |
challengeData | ChallengeData | Yes | The challenge data.
| challengeData = ChallengeData [ challengeType = SMS_OTP, otpValue = 472556, cardToken = <null>, passwordValue = <null> ], |
Response parameters
Field | Data type | Required | Description |
result | Yes | The | |
verifyRequestId | String | No | The unique ID that is assigned by a merchant to identify a verification request. More information about this field:
|
authenticationId | String | No | The authentication ID throughout the authentication process. More information about this field:
|
challengeInfo | No | The challenge render data. |
Result processing logic
In the response, the result.resultStatus field indicates the result of the verifyAndResume request. The following table describes each result status:
Result status | Description |
S | The verifyAndResume request is accepted successfully. The corresponding result.resultCode is |
U | The status of the verifyAndResume request is unknown. The corresponding result.resultCode is |
F | The verifyAndResume request failed. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the following Error codes section. |
Result codes
Result code | Result status | Result message | Further action |
SUCCESS | S | Success. | / |
AML_REJECT | F | AML_REJECT | Prompt the user that the request is rejected because of the high risk. |
AML_REVIEW | F | AML_REVIEW | Prompt the user that the request needs to be reviewed because of the high risk. |
AMOUNT_EXCEED_LIMIT | F | AMOUNT_EXCEED_LIMIT | Consult Alipay Technical Support about the maximum payment amount. |
CHANNEL_ACCOUNT_FROZEN | F | CHANNEL_ACCOUNT_FROZEN | Contact Alipay Technical Support to know the specific reasons. |
CHANNEL_OTP_RESPONSE_TIMEOUT | F | Channel OTP response received too late. | Call the interface again to resolve the issue. If the issue persists, contact Alipay Technical Support. |
CHANNEL_TOKEN_EXPIRED | F | Access Token expired. | Re-request the access token from the channel. |
CONTACT_ISSUER | F | Refer to the card issuer. | Prompt the user to contact the issuer. |
COUNT_EXCEED_LIMIT | F | COUNT_EXCEED_LIMIT | Too many requests in a short time. Try again later. |
CURRENCY_NOT_SUPPORT | F | The currency is not supported. | Ensure that the currency code is correct and supported. |
DUPLICATE_TRANSACTION | F | Duplicate Transaction. | Wait until the previous transaction completes. |
EXPIRED_CARD | F | Expired card. | Renew the validity period of the card or replace it with a new one. |
INVALID_ACCOUNT_NUMBER | F | Invalid account number (no such number). | Check whether accountNo is correct or contact Alipay Technical Support to know the specific reasons. |
INVALID_CHANNEL_MID | F | Partner is not active/create. | Check whether the partner is correct or contact Alipay Technical Support to know the specific reasons. |
INVALID_CVV | F | INVALID_CVV | Check whether cvv is correct and retry again. |
OTP_EXCEED_LIMIT | F | The token has been blocked for requesting OTP for certain time intervals. | Too many requests in a short time. Try again later. |
OTP_EXPIRED | F | OTP has expired. | Call the interface again to get a new OTP. |
OTP_VERIFY_TIMES_EXCEED_LIMIT | F | Verify code failed too many times, the user must get a new code. | Too many requests in a short time. Try again later. |
OTP_VERIFY_UNMATCHED | F | Verify code invalid. | Check whether OTP is correct. |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
PAYMENT_IN_PROCESS | U | Payment is in process | Human intervention is usually needed. It is recommended that you contact the technical support team to troubleshoot the issue. |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Prompt the user that the request is rejected because of the high risk. |
REQUEST_NOT_FOUND | F | Request not found. | Prompt the user to go through the user information verification. |
RISK_BAD_BUYER | F | RISK_BAD_BUYER | Check whether the user information is correct and retry again. |
RISK_CHALLENGE | F | RISK_CHALLENGE | Prompt the user that the request is rejected because of the fraud risk. |
RISK_CHALLENGE_FAIL | F | RISK_CHALLENGE_FAIL | Prompt the user that the request is rejected because of the risk control. |
RISK_FRAUD_RISK | F | RISK_FRAUD_RISK | Contact Alipay Technical Support to know the specific reasons. |
RISK_REJECT | F | Reject by risk control. | Top up the account or choose other payment methods. |
SYSTEM_MAINTENANCE | F | System maintenance. | Contact Alipay Technical Support to know the specific reasons. |
USER_BALANCE_NOT_ENOUGH | F | User balance is not enough for this transfer. | Contact Alipay Technical Support to know the specific reasons. |
USER_NOT_EXIST | F | The user does not exist. | Check whether the user information is correct and retry again. |
USER_STATUS_ABNORMAL | F | The user status is abnormal. | Contact Alipay Technical Support to know the specific reasons. |
VERIFICATION_FAIL | F | The verification is failed. | / |
Request
The merchant sends a request to DWS.
{
"authenticationId":"20190608114010800100188820200355883",
"requestId":"20190608114010800100188820200355885",
"challengeData":{
"challengeType":"CARD_PLAIN_TEXT",
"cardToken":"40240232434345454246"
}
}
Response
DWS returns the request result.
{
"result":{
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"success"
},
"authenticationId":"pay_1089760038715669_102775745075669",
"challengeInfo": {
"canReValidate": false,
"challengeLeftTimes": 0
}
}