Payment Link Integration


To integrate PhonePe Payment Links, use the API to generate a payment link with fixed amount details and customer info. Share the link via your preferred channel and track payment status through API.

Before you can create a payment link or check its status, you need to authenticate your system by generating an Authorization token. This token acts as a secure key that confirms your system is allowed to interact with the PhonePe Payment Gateway.

Use this token in the Authorization header for all subsequent API calls.

For complete details, refer to the Generate Authorization Token Reference.

Start by generating a unique payment link using the Create Payment Link API. This link directs your customer to a secure checkout page where they can complete the transaction using UPI, cards, or NetBanking.

You’ll need to provide basic details like the payment amount, a unique merchantOrderId, and optional metadata. Once generated, share the link with your customer through SMS, email, or any preferred channel.

For complete details, refer to the Create Payment Link Reference.

Once the payment link is generated, share it with your customer through SMS, email, WhatsApp, or any preferred communication channel. When the customer clicks the link, they’ll be redirected to a secure checkout page where they can complete the payment using UPI, cards, or net banking. You can track the payment status either through Webhook notifications or by checking the Payment Status APIs.

For complete details, refer to the Notify Customers Reference.

Once a payment is initiated, it’s important to confirm whether it was successful, failed, or still pending. This helps your system take the right next steps—like confirming an order or retrying a payment.

How to verify the response?

There are two ways to verify the payment response:

  1. Webhook (Server-to-Server Callback) – Recommended
    This is an automated notification sent by PhonePe Payment Gateway directly to your server when the status of the payment changes (e.g., success or failure). It ensures real-time updates. 
  2. Check Payment Link Status:
    If you don’t receive the webhook callback, you can use the API to manually check the payment status.

You’ve now understood the key steps involved in integrating PhonePe Payment Gateway into your website. It’s time to begin the actual integration process by generating an authorization token.

Head over to the next section to learn how to securely authenticate your API requests using our Authorization API.

Is this article helpful?