# Test APIs locally with Postman script

> Read this chapter to learn about how to use the Postman script to test Alipay+ APIs.

Read this chapter to learn about how to use the Postman script to test Alipay+ APIs.

Follow these steps:

1.  Download the Postman script file on the **iTest** page of Alipay+ Developer Center.

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/idocs/2025/png/1e69d60f-7b1d-4cbe-890d-0a38bc638623.png)

2.  Import the Alipay+ environment into Postman.

Download the following file and import it to the Postman environment:

[📎Alipay+ Postman Environment.json](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/attachments/yuque/0/2022/json/561635/1659083851367-40739301-213c-49ae-93c5-bf865755c741.json)

3.  Set values in Postman.

Enter "A+ APS" for the **Environment Name** field and provide values for the _pk_, which stands for _privateKey_, and _clientId_ parameters.

![1.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1656483615108-0a7041c9-9b66-42c3-8e9a-d680c7f3c04c.png)

If you don't have a private key, use Alipay+ Developer Center to generate the key pairs associated with your own client ID. For more information about how to get your client ID and generate key pairs, see steps 1 and 2 in the [Configure the sandbox](develop_in_sandbox.md#j1bJb) chapter.

4.  Import the Alipay+ collection.

Download the following file and import it into Postman:

[📎Alipay+ Postaman Collection.json](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/attachments/yuque/0/2022/json/561635/1659083851813-f224959b-7d48-4406-a8e2-1f199608c6c7.json)

5.  Edit the API request body.

Click the API and you can edit its request body.

> **Note**: For the _**pay**_ APIs in different scenarios, values for one parameter might be different. For more information about how to specify parameter values in Alipay+ APIs, see [API Reference](../api_acq.md).

![3.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1656483670625-35d292f3-f430-4132-bb79-6f577602b52c.png)

If you need to view or modify the algorithm, right-click the API and click **Edit** to edit the script.

![2.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1656483642354-1a7dec89-4fb2-4c47-be92-5ec663297ff7.png)

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1624253680836-a7f9f04a-6c7c-4ed5-98eb-e84c89c61393.png)

> **Note**: The script is based on this open-source library: [https://joolfe.github.io/postman-util-lib/](https://joolfe.github.io/postman-util-lib/).