Alipay+ DocsAlipay+ Docs

Integration overview

This topic introduces the functions that Alipay+ Auto Debit provides and guides you through how to use the APIs and SDKs to build an integration for these functions.

Before you begin

Before you learn more about how to integrate with Alipay+ Auto Debit, ensure that you are familiar with the following things:

  • The user experience that Alipay+ Auto Debit can provide to consumers.
  • General steps you need to take to go through the whole integration process.

Build an integration

Use the APIs and SDKs that are provided by Alipay+ to integrate the following Auto Debit functions as required:

Obtain the user authorization

To set up auto debit payments, the MPP needs to allow the merchant to obtain prior authorization from users to deduct funds from their MPP accounts. To do this, you need to take the following steps:

  1. Handle the prepare API request from Alipay+ and provide the authorization URL.
  2. Render the authorization page where the user confirms the authorization.
  3. Generate the authorization code and redirect the user back to the merchant. You can also integrate the authNotify API to notify Alipay+ of the authorization code.
  4. Handle the applyToken API from Alipay+ and provide the access token. You can also integrate the authNotify API to notify Alipay+ of the access code.

For more information about how to integrate the related APIs or SDKs to allow the merchant to obtain the user authorization, see Obtain the user authorization.

Make a payment

After the user authorization is obtained, the merchant can initiate payments with the access token to deduct funds from the user's MPP account and theMPP can make payments without involving further user interactions. For more information about how to integrate related APIs to make a payment, see Make a payment.

Return payment results

You can synchronously return the payment result to Alipay+ in the response to the pay API request. However, to ensure that Alipay+ can receive the payment result, you need to integrate the inquirePayment API, and is recommended to integrate the notifyPayment API. For more information about how to integrate the APIs, see Notify payment result and Respond to payment inquiry.

Cancel and refund

To support the users in refunding and canceling payments, you need to integrate the refund and cancelPayment APIs. For more information about how to integrate the APIs, see Cancel a payment and Refund.

More operations

Apart from the payment-oriented functions that are mentioned above, Alipay+ provides more services and APIs for you to manage your business.

Alipay+ provides multiple types of transaction reports to help the MPP perform the clearing and settlement of transactions. For more information, see Reconcile.

More information

  • When using APIs to integrate, you need to take the following things into consideration:
    • Make a POST request to the corresponding address with the identity information, signature, and business parameters in the HTTP request. For more information about the structure of a request and response, see API overview.
    • To ensure the message transmission security, the MPP must sign the request and validate the signature properly. When calling an Alipay+ API, the MPP must sign the API request and validate the response signature accordingly; when receiving an API call from Alipay+, the MPP must validate the request signature and sign the API response accordingly.
  • For the full list of APIs and SDKs that are provided for Auto Debit, see APIs and SDKs.