Introduction to PhonePe PHP SDK
The PhonePe PHP SDK offers a simple and secure way to connect your PHP backend with the PhonePe Payment Gateway. It provides all the essential tools to initiate and manage payments, track transaction and refund statuses, and handle callback events directly from your server.
By integrating with the PHP SDK, you can streamline your payment flow and ensure a smooth experience for both your system and your customers. The following sections will guide you through the end-to-end integration journey using this SDK.
📘 Environment & Integration Support!
- This feature is supported and can be tested only in the Production environment.
User Journey
The following user journey illustrates the complete payment lifecycle to help you understand the integration flow clearly.

Prerequisites
Before you start the integration process, ensure you have:
- Access to PhonePe PG’s UAT (User Acceptance Testing) and production environments
- API credentials, including the Merchant ID, Client ID, Client Secret and Client Version.
- A basic understanding of HTTP methods (GET, POST) and JSON
- PHP 8.2 or higher installed on your system.
- Dependencies are managed via Composer, which must be installed in the project environment.
What’s Next?
Now that you know about the PHP Backend SDK, you can start to integrate the PhonePe Payment Gateway into your website. The next section will guide you step by step on how to set it up.
Head over to the next section to learn the key steps involved in integrating PhonePe Payment Gateway into your website.