Alipay+ DocsAlipay+ Docs

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.

Show child parameters

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.

Show child parameters

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.

Show child parameters

extendInfo String  

Return the number of outstanding debts or a redirect link to related information in case of unreimbursed advance payment.

API Explorer

Request

Request Body

Response

Response Body

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 S and the value of result.resultCode to SUCCESS.
  • If the verification result is failed, set the value of result.resultStatus to F and the value of result.resultCode according to the fail reason.
  • If the verification result is unknown, set the value of result.resultStatus to U and the value of result.resultCode to UNKNOWN_EXCEPTION.

For more information about how to define your result codes, see the Result codes section below.

Result/Error codes

CodeValueMessage
SUCCESSSVerification passed.
BALANCE_NOT_ENOUGHFInsufficient balance.
UNPAID_ADVANCE_PAYMENT_FOUNDFUnreimbursed advance payment exists.
USER_STATUS_ABNORMALFUser status is abnormal.
USER_KYC_NOT_QUALIFIEDFThe eKYC verification failed.
RISK_REJECTFRisk control verification failed.
OTHER_REASONSFVerification failed for other reasons.
ACCESS_DENIEDFAccess is denied.
INVALID_CLIENTFThe client is invalid.
INVALID_SIGNATUREFThe signature is invalid.
KEY_NOT_FOUNDFThe key is not found.
MEDIA_TYPE_NOT_ACCEPTABLEFThe server does not implement the media type that is acceptable to the client.
METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTPS method.
NO_INTERFACE_DEFFAPI is not defined.
PARAM_ILLEGALFIllegal parameters. For example, non-numeric input, invalid date.
UNKNOWN_EXCEPTIONUUnknown exception.