alipay.aps.transportation.checkTransitScenario
This API is an SPI that enables Alipay+ to request the wallet to verify if the fare can be normally deducted after the user finishes the ride. Alipay+ can call this API when enabling the Transport Code service, applying for a Transport Code, and suspending the Transport Code service.
- API version: 1.0
- API type: SPI
- Direction: Alipay+ to wallet
Note:
In the following sections, Mobile Payment Provider (MPP) is also known as Payment Service Provider (PSP). For example, the pspId parameter specifies the ID that identifies an MPP.
Request parameters
acquirerId String REQUIRED
The unique ID that is assigned by Alipay+ to identify an ACQP.
In the Transport Code scenario, this parameter is set to 022088000000000001.
More information:
- Maximum length: 64 characters
pspId String REQUIRED
The unique ID that is assigned by Alipay+ to identify an MPP.
More information:
- Maximum length: 64 characters
customerId String REQUIRED
The unique ID that is assigned by the MPP to identify a user.
More information:
- Maximum length: 64 characters
minPayableAmount Amount
The minimum payable amount of the Transport Code.
This parameter is specified by Alipay+ if the value of transitScenario is GENERATE_CODE, which means that the scenario is code application verification.
transitScenario String REQUIRED
The verification scenario of the transport service. Valid values are:
ISSUE_CARD: indicates the service enabling verification.GENERATE_CODE: indicates the code generation verification.REVOKE_CARD: indicates the service suspension verification.
More information:
- Maximum length: 64 characters
merchant Merchant REQUIRED
The merchant. The wallet can verify whether the user can enable the service, apply for codes, and so on, based on the specific merchant.
Response parameters
result Result REQUIRED
The result of the business processing, including the result status, result code, and result message. For more information about how to return the result, see How to return the result.
extendInfo String
Return the number of outstanding debts or a redirect link to related information in case of unreimbursed advance payment.
Request
Response
How to return the result
The MPP needs to return the result (specified in the result parameter) according to the verification result.
- If the verification result is passed, set the value of result.resultStatus to
Sand the value of result.resultCode toSUCCESS. - If the verification result is failed, set the value of result.resultStatus to
Fand the value of result.resultCode according to the fail reason. - If the verification result is unknown, set the value of result.resultStatus to
Uand the value of result.resultCode toUNKNOWN_EXCEPTION.
For more information about how to define your result codes, see the Result codes section below.
Result/Error codes
| Code | Value | Message |
|---|---|---|
| SUCCESS | S | Verification passed. |
| BALANCE_NOT_ENOUGH | F | Insufficient balance. |
| UNPAID_ADVANCE_PAYMENT_FOUND | F | Unreimbursed advance payment exists. |
| USER_STATUS_ABNORMAL | F | User status is abnormal. |
| USER_KYC_NOT_QUALIFIED | F | The eKYC verification failed. |
| RISK_REJECT | F | Risk control verification failed. |
| OTHER_REASONS | F | Verification failed for other reasons. |
| ACCESS_DENIED | F | Access is denied. |
| INVALID_CLIENT | F | The client is invalid. |
| INVALID_SIGNATURE | F | The signature is invalid. |
| KEY_NOT_FOUND | F | The key is not found. |
| MEDIA_TYPE_NOT_ACCEPTABLE | F | The server does not implement the media type that is acceptable to the client. |
| METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTPS method. |
| NO_INTERFACE_DEF | F | API is not defined. |
| PARAM_ILLEGAL | F | Illegal parameters. For example, non-numeric input, invalid date. |
| UNKNOWN_EXCEPTION | U | Unknown exception. |