# Develop in the sandbox

> **Note**: Since the sandbox is an emulated environment, all tests in the sandbox do not take effect in the production environment. All returned codes and processing logic need to be consistent with those in the production environment.

## Step 1: Receive sandbox resources

After the application is created, sandbox resources are automatically allocated to you. On the **Sandbox** > **Settings** page, check your sandbox resources, which include the following two parts:

> **Note**: All the values here are applicable to the sandbox only.

-   **Integration Information**: contains key information for sandbox test, such as:

-   **Gateway Endpoint**: indicates the domain name that is assigned by Alipay+ to construct the API request URL. For more information, see the [Request URL](../api_mpp/api_overview#TFGaA) section in _API Reference_.
-   **Client ID**: used to specify the _Client-Id_ parameter in the API request header. For more information, see the [Request header](../api_mpp/api_overview#3mLq0) section in _API Reference._
-   **MPP ID**: indicates the unique ID that is assigned by Alipay+ to identify a Mobile Payment Provider (MPP). The value of this parameter can be used to:

-   Specify the _pspId_ parameter in the API request or response.
-   Recognize the _participantId_ parameter involved in the reconciliation. For more information, see the [Download reports](../reconcile_mpp/download_report) chapter in _Reconcile_.

-   **Test Wallet Name**: indicates the unique name that is assigned by Alipay+ to identify a test wallet. It is displayed as the payment method when you simulate the process of accepting payments from consumers in the [Alipay+ Linker Merchant](amerchant).
-   **Certification Type**: indicates the method that is used by Alipay+ to sign an API request and validate the signature. It is displayed after you set a public key. For more information, see [Set a sandbox public key](#YabQV).

-   **Financial Reports**: contains information that is used to download sandbox clearing and settlement reports in the SFTP server, including the login account, password, and SFTP URL.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1736763945057-88ebc615-4fa6-4651-bb61-1fb8e41b0c6c.png)

## Step 2: Configure the sandbox

To configure the sandbox on the **Settings** page, complete the following tasks.

### 1\. Set a sandbox public key

To make your integration safer, Alipay+ uses asymmetric keys for API signature. Your key pair and the Alipay+ public key are required in your local code. You need to generate your key pair and upload your public key to get the Alipay+ public key.

In the **Public key** panel of the **Sandbox > Settings** page, complete the following steps.

1.  Click **Set Your Public Key**.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1673848250163-285bf279-eace-4c7e-8c1d-99b53a0a6591.png)

2.  On the **Set Your Public Key** page, click the respective link to download the tool that is provided by Alipay+.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1673848434197-5af30559-df89-44eb-ad9c-cdb6838d4682.png)

3.  Open the zipped folder and run the **Run.bat** file.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1680243756336-f03b8927-d285-4658-bea1-3c7b4e18eb8f.png)

4.  Click **New** to generate a key pair. Keep the private key locally.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1644486312592-e97e1be2-1f34-4506-b832-b76220bf7c4e.png)

5.  Copy the public key and enter it on the **Set Your Public Key** page.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1673848519249-3b5af4a8-558b-42af-a266-3d47ca61c265.png)

6.  Click **Submit** to upload your public key.

After submission, the Alipay+ public key is generated automatically. You can click the respective button to view or copy the Alipay+ public key.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1673848594696-709a937a-aa6a-4d51-9f08-65f0a32a8532.png)

Your public key is updatable. Click **Edit Your Public Key** to update it. Please remember to update your key pair in your local code.

> **Note**: Your public key that is used in the sandbox must be different from the one in the production environment. For more information about getting the Alipay+ public key for the production environment, see [Set a production public key](launch_into_production#a7mDb).

### 2\. Set API endpoints

On the **API Endpoint Settings (Alipay+ > MPP)** panel, click **Edit** to specify the endpoints for the APIs so that Alipay+ can call the APIs in the sandbox.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1674036550440-f9f8a47e-2a65-4439-9b24-1cf8c730b01a.png)

### 3\. Conditional: Set common settings

In the **Common Settings** panel, click **Edit** to specify the common settings related to this application.

> **Note**: If a setting that is shown as **Required** is not completed, the sandbox acceptance testing cases involving the setting might fail. Please complete the setting before rerunning the cases.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1674037089696-4e31a162-e18f-41f1-9d39-2eb58f32e293.png)

### 4\. Conditional: Set test parameters

In the **Test Parameter Settings** panel, click **Edit** to specify the parameters to execute test cases in the sandbox.

![image](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1674037400698-3ee4f0f0-ca4b-4057-abed-7fee381a8dd6.png)

## Step 3: Develop and test in the sandbox

When getting the sandbox ready, use development tools and resources to develop and test your application. Alipay+ provides the following tools and resources for developers:

-   **iTest**: used to create API requests. For more information about how to use iTest, see [iTest](itest).
-   **iMock**: used to simulate different API call results that are caused by specific values of key request parameters. For more information about how to use iMock, see [iMock](imock).
-   **iNotify**: used to test whether the asynchronous notifications can be received and are handled correctly. For more information about how to use iNotify, see [iNotify](inotify).
-   **iScan**: used to validate your API requests and responses against Alipay+ standards. For more information about how to use iScan, see [iScan](iscan).
-   **Alipay+ MPP SDKs**: For more information, see [Alipay+ MPP SDKs](sdk).
-   **Alipay+ Linker Merchant**: used to simulate the process of accepting payments on the merchant side. For more information, see [Alipay+ Linker Merchant](amerchant).

You can find these tools and resources under the **Sandbox** > **Tools** tab.