POSTsendPartnerNotification API
Use Case
This API gives the merchant the ability to send templatised Notifications to the user. The notifications are delivered as Paytm App Notifications to the end-user. These notifications are only allowed for post-order related use cases.
Request Attributes
API Content format: JSON
Request Attributes
PARAMETER | DESCRIPTION |
---|---|
clientId mandatory |
Your client Id received from Paytm Example: market-app-staging |
openId mandatory |
Open ID generated by Paytm by calling paytmFetchAuthCode JS API. Example: MjjpptrGTFUN6bm2Is0tEBp6vpQXGxw71hxgbofvXK4 |
orderId mandatory |
Unique reference ID for a transaction which is generated by merchant and sent in the request Example: 0071570611491142 |
templateName mandatory |
Template Name Example: h5-demo-notify |
mid mandatory |
This is a unique identifier provided to every merchant by Paytm Example: cqxpFk55774655560618 |
notificationPayload.text mandatory |
Dynamic text to be sent as a part of notification Example: Your order is out for delivery |
notificationPayload.url mandatory |
Deeplink URL to be sent in Notification Example: paytmmp://mini-app?aId=05f4b836f67219b3b4d4f2ba9fb3631c0fd49988 |
Response Attributes
Success
PARAMETER | DESCRIPTION |
---|---|
code |
Response Code Example: SR_2000 |
status |
Response Status Example: SUCCESS |
message |
Response Message Example: Your request has been processed successfully...!!! |
response |
Notification Response(Notification job id) Example: 183-6843-116387887752-970586694 |
Error
PARAMETER | DESCRIPTION |
---|---|
code |
response code Example: ER_4500 |
status |
response status Example: FAILURE |
message |
response message Example: Invalid Client |
displayMessage |
display message Example: We are unable to process your request. Please try again after some time. |
ERROR CODES
RESPONSE CODE | STATUS |
---|---|
ER_4500 | Invalid Client |
ER_4501 | Invalid Client |
ER_4215 | Notification API failed Too Many Request received |
ER_4212 | Max Notification Limit Reached","displayMessage |
curl -X POST 'https://miniapps.paytm.com/h5/notify/v1/sendPartnerNotification' --header 'Content-Type: application/json' --data-raw '{
"clientId": "market-app-staging",
"openId": "MjjpptrGTFUN6bm2Is0tEBp6vpQXGxw71hxgbofvXK4=",
"orderId": "0071570611491142",
"templateName": "h5-demo-notify",
"mid": "cqxpFk55774655560618",
"notificationPayload": {
"text": "Your order is out fordelivery",
"url": "paytmmp://mini-app?aId=05f4b836f67219b3b4d4f2ba9fb3631c0fd49988"
}
}'