# 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/e1d600e9-87f9-4959-bc12-838b1429ad58.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/12884741/1667369632746-7027af7f-44af-4772-9ed6-55c3452a63d2.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.

![image](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 [Configure the sandbox](develop_in_sandbox.md#VThJm).

4.  Import the Alipay+ collection.

Download the following file and import it into Postman:

[📎Alipay+ Postman Collection.json](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/attachments/yuque/0/2022/json/12884741/1667369643424-15a9d9ea-17b4-4bbb-bd2e-702c8011fd4d.json)

5.  Edit the API request body.

Click the API and you can edit its request body. Note that 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).

![image](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.

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

![image](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/).