Alipay+ DocsAlipay+ Docs

Auto Debit APIs

When enabling the Transport Code service, the user agrees to and signs the Auto Debit agreement to enable the service. After that, Alipay+ can automatically deduct the fare after the user finishes the ride.

The following APIs are used in Transport Code Auto Debit:

Note: In the Transport Code scenario, the MPP must support Auto Debit for in-store payments.

API

Description

prepare

Enables the MPP to provide an authorization URL for the Auto Debit payment.

applyToken

Enables the MPP to provide an access token to Alipay+.

pay

Enables Alipay+ to send a request to the MPP to deduct funds from the user's MPP account using the authorized access token.

Note: The store information is not specified in the request in the Transport Code scenario. Do not validate this information.

cancelToken

Enables Alipay+ to revoke an access token if the user wants to cancel the authorization to the public transport operator.

authNotify

Enables the MPP to inform Alipay+ of status updates of the authorization code or the access token.

inquiryPayment

Enables Alipay+ to query the payment result.

refund

Enables Alipay+ to initiate a refund of a successful payment.

consultUnbinding

(Optional)

Enables the MPP to consult whether the public transport operator allows an access token to be canceled from the MPP side.

For detailed instructions on how to utilize the APIs, see Auto Debit integration.