Notify Customer for Payment Link
Once a payment link is generated, it can be shared with customers through various communication channels such as SMS, email services. This allows you to notify customers quickly and guide them to complete their payments with ease.
Environment
| Environment | HTTP Method | API |
| Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/paylinks/v1/notify |
| Production | POST | https://api.phonepe.com/apis/pg/paylinks/v1/notify |
Request
Request Headers
| Header Name | Header Value |
Content-Type | application/json |
Authorization | O-Bearer <merchant-auth-token> |
⚠️ For Partner Integrations!
It is mandatory to include the X-MERCHANT-ID header with the MerchantID of the end merchant.
Request Parameters
| Parameter Name | Data Type | Description |
| String | The unique ID of the order for which the notification needs to be sent. |
| Boolean | Set to true to send the notification to the customer’s mobile number. |
notificationChannels.email | Boolean | Set to true to send the notification to the customer’s email address. |
Sample Request
{
"merchantOrderId": "merchant-order-id",
"notificationChannels": {
"sms": true,
"email": false
}
}Response
Case 1: Response for Notification Sent Successfully
{
"paylinkUrl": "https://phon.pe/some-key",
"orderId": "OMOxxxx"
}Case 2: Response for Exceeded the allowed number of notification attempts.
{
"code": "NOTIFICATION_ATTEMPTS_BREACHED",
"message": "You have exceeded the max number of paylink attempts"
}Response Parameters
| Parameter Name | Data Type | Description |
| String | Payment Gateway generated internal order ID |
| String | The URL where the customer can visit and complete the payment. |
Error Response Parameters
| Parameter Name | Data Type | Description |
code | String | Error Code |
message | String | Error Description |
Try it yourself!
headers
body params
What’s Next?
Now that you’ve learned how to notify your customers through different methods, it’s time to move to the next step, processing refunds.