This document is intended for developers preparing to integrate the PhotonPay API. PhotonPay provides a UAT (User Acceptance Testing) environment for developers to test the PhotonPay API, enabling them to conduct integration in this environment.
1. Configure Whitelist
Before starting the integration, developers are required to provide the IP address of their network environment to the technical support team of PhotonPay (no configuration is needed for the production environment). This IP address will be used to set up the access whitelist for the UAT environment merchant platform. Only after the whitelist configuration is completed can developers access the UAT environment merchant platform. Developers can check the IP address of their current environment through the following method:
- Visit Baidu (https://www.baidu.com), search for "IP address query", and copy the displayed IP address (e.g., Local IP: 180.169.210.19, Telecom, Shanghai).
UAT Environment Merchant Platform URL: https://vip1.uat.photontech.cc/account/login
2. Apply for a Test Account
Prior to API integration, developers must apply for a test account from the technical support team of PhotonPay. Developers only need to specify the business functions they require to activate when applying to the technical support team. Once the account activation is completed, the technical support team of PhotonPay will provide the account details to the developers.
3. Read the API Documentation
API Documentation URL:
We encourage all developers to read the API document firstly. Should any questions arise, please don’t hesitate to reach out to the PhotonPay technical support team in the dedicated integration group.
4. Configure server IP address
For security purposes, before calling the API, developers must configure the server IP address used for API calls in the merchant backend. Failure to do so will result in the rejection of all API requests. The specific configuration path is as follows:

5. Configure Public Key for Request Signature Verification
Developers are required to generate an RSA key pair independently. The key format must be PKCS#8, and the key length must be 1024 bits. After generating the public key, developers need to configure it in the merchant backend. The specific configuration path is as follows:

Important Note: When configuring the public key, the header "-----BEGIN PUBLIC KEY-----" and the footer "-----END PUBLIC KEY-----" must be removed.

6. Obtain interface parameters
The values of the appId and appSecret parameters required for API calls can be obtained from the merchant backend. The specific retrieval path is as follows

After completing the above steps, developers can start integrating the PhotonPay API. Before accessing the relevant business APIs, it is recommended that developers first read the "Authorization and Signature" section in the API documentation. This is because, before calling any business API, developers must first obtain a token (used as the access token in the X-PD-TOKEN header) via the authorization API. Additionally, some APIs require signature generation, which serves as the basis for signature verification (included in the X-PD-SIGN header).
7. Configure Webhook
PhotonPay supports asynchronous notifications for different event types. For detailed information, please refer to the "Notifications" section in the API documentation. For customers with specific needs, they must integrate in accordance with the specifications outlined in the API documentation.
Critical Reminder: Ensure that responses to Webhook notifications are standardized. If 12 consecutive non-standard responses occur, the notification service will be automatically interrupted and must be manually reactivated.

Developers need to develop a Webhook receiver and configure the receiver URL in the Webhook input field of the PhotonPay merchant backend. Configure the Webhook based on the required notification types (Note: Currently, the merchant backend does not support configuration for all webhook notification types. For the types that are available, they must be manually selected to be activated. For types not yet supported, no notifications will be sent by default.).




