Test APIs locally with Postman script
Read this chapter to learn about how to use the Postman script to test Alipay+ APIs.
Follow these steps:
- Download the Postman script file on the iTest page of Alipay+ Developer Center.
- Import the Alipay+ environment into Postman.
Download the following file and import it to the Postman environment:
📎Alipay+ Postman Environment.json
- 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.
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.
- Import the Alipay+ collection.
Download the following file and import it into Postman:
📎Alipay+ Postman Collection.json
- 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.
If you need to view or modify the algorithm, right-click the API and click Edit to edit the script.
Note: The script is based on this open-source library: https://joolfe.github.io/postman-util-lib/.