Sequence
- PhonePe PG Integration
- Woocommerce
PhonePe PG Integration
Q. How can I integrate PhonePe Payment Gateway for my website?
You can integrate PhonePe Payment Gateway for your website using any one of the below links:
PhonePe Standard Checkout and Custom APIs
Predefined Plugins for e-commerce platforms (Woocommerce, Shopify, and Opencart)
Important:
PhonePe Standard Checkout: You don’t need to share the PCI DSS certificate for cards integration.
PhonePe Custom APIs: You should own the checkout system and will need to share the PCI DSS certification.
Q. How can I integrate PhonePe Payment Gateway for my app?
You can integrate PhonePe Payment Gateway for your app depending on the OS and the programming language with which your platform was designed.
- Native Android/iOS application: You can either use the SDK Integration or SDKLess integration.
- Cross-platform integration (React Native, Flutter, etc.): You can use SDKLess integration.
Q. Can I integrate PhonePe Payment Gateway with the WHMCS website?
No, currently, you cannot integrate PhonePe Payment Gateway with any business website that is hosted on WHMCS.
Q. Why am I not receiving the callback request after passing the callback URL in the request body of pay APIs?
You could be facing this issue due to any one of the following reasons:
- Your callback URL has HTTPS in it and not HTTP. We do not post our response on http callback URLs.
- The callback URL that you are passing is not able to receive the responses and capture them at the same time.
- The parameter name for the callback URL doesn’t match the callback URL which is passed in the request body. This is case-sensitive.
Q. How do I fix a generic API error?
This will depend on the error:
401 – Unauthorized error
This error occurs when you use incorrect API keys while making the requests. To fix this, please ensure,
- You are using the correct credentials shared by PhonePe Payment Gateway on your registered email ID
- You are testing using the correct API host and endpoints with the correct credentials corresponding to the environment
- There are typo errors while entering the key and key index
- The logic for the x-verify calculation is correct
400 – Bad Request error
This error occurs when the value sent for a particular field exceeds the specified limit. For example, if you had sent a phone number with more than 10 digits. In order to fix this error please ensure,
- The merchant ID that you’ve passed is the same as the one sent to you on your registered email ID and there are no typographical/case-sensitive errors in the Pay API
- You’ve passed all the request parameters marked as mandatory in the developer document and there are no blank values in the request body
- You are not passing any additional request parameter that is not included in the developer document
- You’ve passed the correct request parameters data type
500 – Internal Server Error
This error occurs when emojis are sent in the API request. To fix this error, please ensure,
- If you are testing your platform integration on a UAT/simulator environment, check if your simulator template is set correctly using the simulator application.
- If you are testing it in the production environment, try any of the following,
- Try after some time
- Make sure you’ve passed the correct payment instrument parameters with the correct instrument type in the request body as mentioned in the developer document
If you’ve followed the above steps and still continue to face issues, please send an email to merchant-pgsupport@phonepe.com or call your business point of contact and share the below details,
- API host used for triggering API
- Request payload used
- Response payload received
- Integration platform (Web/Android/iOS)
- Screenshot or screen recording of the issue
Q. What if I’m still facing the 500 internal server error after setting the simulator template correctly?
The simulator template is valid only for 7 days from the date it’s successfully set. You will need to configure the simulator again if it has been more than 7 days.
If you continue to face this issue, please drop an email to merchant-pgsupport@phonepe.com and we’ll help you with this
Q. How to fix 400 bad request errors and INVALID_TRANSACTION_ID in the response code?
To fix these errors, please check,
- If you are trying to pass the same transaction IDs in the request body more than once.
- If you are trying to pass a transaction ID value that exceeds the specified character limit. It should be less than 35 characters.
Q. How do I fix the FRA error on my API?
You’ll see this error if you are raising a request using an IP/URL/package name that you haven’t shared with us during the onboarding.
Note: If your IP/URL/package name changed after you onboarded with us, please reach out to your business point of contact and get it updated.
Q. How do I fix the key not configured error while hitting an API?
This error occurs when you are using UAT keys with PROD API or vice versa. Please make sure that your set of credentials(MID/app ID or Salt Key) is correctly mapped to the set of API hosts.
Q. Is it mandatory to handle server-to-server (S2S) response/callback/webhook response?
Yes, it’s extremely important to handle Server-to-server (S2S) response/callback/webhook response due to data security reasons and a consistent flow of responses on the server in real time. Please refer to the developer documentation for more details.
Q. Is it mandatory to check the API implementation status?
Yes, it is important to check API status on a cron basis until the status is marked as successful.
Example: You may not receive an S2S response for a payment or there can be some payments that are pending. In such cases, you will need to trigger the check status API. Please refer to the developer documentation to check the recommended time frequency to run this API.
Woocommerce
Q. How do I fix a 404 or 400 bad request error?
If you are getting a 404 error on the API endpoint, it’s because the UAT and the URL are the same (https://api-testing.phonepe.com/apis/hermes/). As your prefix contains api-testing, it points to UAT or stage production. In such cases, the solution is to set the environment to production.
If you continue to face this issue, please drop an email to merchant-pgsupport@phonepe.com and we’ll help you with this.
Q. How do I fix the 401 unauthorized access error?
This error occurs if you’ve entered an incorrect MID or merchant salt key configuration. Please try with the MID and salt key combination we’ve sent on your registered email ID.
If you continue to face this issue, please drop an email to merchant-pgsupport@phonepe.com and we’ll help you with this.
Q. How do I fix the 403 error?
This error occurs when you fail an FRA check. Please connect with your business point of contact and ask them to whitelist your details.
If you continue to face this issue, please drop an email to merchant-pgsupport@phonepe.com and we’ll help you with this.
Q. How do I fix a fatal error/paypage is not loading error?
If you are facing this issue, please download the fatal error logs for the day using this link and send these to merchant-pgsupport@phonepe.com. Our integration team will check this for you.