# Overview

The TSP mode is an innovative integration mode that is provided by Alipay+ for its Acquiring Service Provider (ACQPs). In this mode, ACQPs can obtain Alipay+capabilities by authorizing their Technical Service Providers (TSPs) to integrate Alipay+ payment products.

## Basic concepts

The following terms are used in this document:

-   **Acquiring Service Provide (ACQP)**: An institution that processes payments on behalf of merchants by integrating Alipay+ products.
-   **Technical Service Provider (TSP)**: An institution that offers technical services, such as development and testing, to ACQPs.
-   **Alipay+ Developer Center**: An Alipay+ platform that provides one-stop integration experience for developers, with a series of development tools and resources.

## Benefits

The following list shows the major benefits of applying the TSP mode for the integration:

**Lower internal technical inputs**

Technical inputs are required for every integration. Specializing in providing technical skills, resources, and tools, TSPs can help ACQPs who are lacking in technical resources to save their time and costs.

**Diverse integration portfolios**

For ACQPs who operate their businesses in various countries and regions, they may need different integration portfolios. By cooperating with multiple TSPs, diverse integration solutions can be built to meet their commercial needs.

**Broader merchant resources**

Moreover, for integration testing, TSPs are allowed and recommended to invite their own, local merchants. ACQPs thus can leverage TSPs' resources to access and acquire more merchants.

## Features

In TSP mode, ACQPs can obtain two kinds of Alipay+ capabilities: payment capabilities and supporting capabilities.

#### Tab: Payment capabilities

Alipay+ offers the capabilities to invoke and accept payments to ACQPs with the following four payment products:

-   CashierPayment: For more information about how to integrate CashierPayment, see [Cashier Payment](../integration_cashier_acq_tile).
-   AutoDebit: For more information about how to integrate AutoDebit, see [Auto Debit](../integration_auto_debit_acq_tile).
-   User-presented Mode Payment: For more information about how to integrate User-presented Mode Payment, see [User-presented Mode Payment](../integration_user_mode_acq).
-   Merchant-presented Mode Payment: For more information about how to integrate Merchant-presented Mode Payment, see [Merchant-presented Mode Payment](../integration_merchant_mode_acq).

#### Tab: Supporting capabilities

By integrating the payment products, TSPs also help ACQPs to obtain the following supporting capabilities:

-   **Post-payment actions**: After making a payment, further actions might be required, such as inquiry, cancellation, and refund. In light of this, Alipay+ provides APIs for post-payment actions. For more information about how to use these APIs, see [inquiryPayment](../api_acq_tile/inquiry_payment), [cancelPayment](../api_acq_tile/cancel_payment), and [refund](../api_acq_tile/refund).
-   **Merchant registration**: In certain countries or regions, for legal or compliance reasons, the merchant information that is related to a payment must be registered before this payment can be processed. In light of this, Alipay+ provides APIs for merchant registration. For more information about how to register a merchant, see [Registration](../registration_acq).
-   **Dispute handling**: To enable Partners to resolve disputes, Alipay+ provides APIs for initiating and responding to disputes after payments. For more information about how to use these APIs, see [Dispute](../api_acq_tile/initiate_retrieval).
-   **Customs declaration**: For payments that are processed by the AlipayCN wallet, customs declarations are required. In light of this, Alipay+ provides APIs for customs declaration. For more information about how to use these APIs, see [Customs](../api_acq_tile/declare).

## How it works

In TSP mode, the following roles are involved:

-   **Merchant**: A company or individual that trades on goods or services.
-   **Acquirer**: An institution that processes payments on behalf of merchants, also called ACQP.
-   **TSP**: An institution that offers technical services, such as development and testing, to ACQPs.
-   **Alipay+**: Alipay+ solution is a collaborative effort along with all Partners to provide more open, digitalized, and inclusive financial services to worldwide consumers and merchants.
-   **Mobile Payment Provider (MPP)**: In TSP mode, MPP is normally a digital wallet, such as GCash.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1650997510528-1c437417-4273-4202-b9da-d3074770060f.png)

Figure 1. Alipay+ payment workflow in TSP mode

Take **User-presented Mode Payment** as an example, the payment workflow in TSP mode consists of the following steps:

1.  The Merchant scans the payment code that is displayed on an MPP's app to collect payments.
2.  The Merchant sends a payment request to the ACQP, and the ACQP sends a payment request to the TSP.
3.  The TSP sends a payment request to Alipay+ by calling the [**pay**](../api_acq_tile/pay_user_presented_mode) API. When calling the **pay** API, take the following things into consideration:

-   In the request header, the TSP must specify the _Agent-Token_ parameter to inform Alipay+ that the request is initiated by a TSP. For more information about how to customize the request header, see [Request header](../api_acq_tile/api_overview#3mLq0).
-   In the request body, the TSP needs to specify the _splitSettlementId_ parameter if the ACQP needs to split its settlement for transactions in one currency and one region into multiple batches.

> **Important**: When calling other Alipay+ APIs, the TSP must also specify the _Agent-Token_ parameter in the request header. The values of this parameter for the sandbox and the production environment are different. Obtain them by taking different actions:
>
> -   **Sandbox**: Obtain the value from the **Test Token** field on the **Sandbox > Settings** page on the Alipay+ Developer Center. For more information, see [Receive sandbox resources](../developer_center_tsp/develop_in_sandbox#GjxCG).
> -   **Production**: Obtain the value from the **Token** column on the **Launch > Authorization** page on the Alipay+ Developer Center. For more information, see [How to check the authorization status](../developer_center_tsp/invite_acq_for_authorization#zGGEz).

4.  Alipay+ verifies the value of _Agent-Token_, decodes the payment code, and then sends a payment request to the MPP.
5.  The MPP processes the payment request and notifies Alipay+ of the payment result.
6.  Alipay+ sends the payment result to the TSP by calling the [**notifyPayment**](../api_acq_tile/notify_payment) API.
7.  The TSP sends the payment result to the ACQP, and the ACQP sends the payment result to the Merchant.