# Webhook

# Subscription Notification

Following notification params are common to all notification sent from Nagorik Payment platform:

Parameter Type Details
notificationId STRING Unique ID of the notification
type STRING 2 types of notifications available now:
1. SUBSCRIPTION - 2. SUBSCRIPTION_PAYMENT
status STRING For type: SUBSCRIPTION, status can be:
1. CANCELLED 2. SUCCEEDED
For type: SUBSCRIPTION_PAYMENT, status can be types:
1. SUCCEEDED_PAYMENT 2. FAILED_PAYMENT
subscriptionId STRING It is the ID of the subscription for which the notification is generated.
Notification will always have the value of this parameter.
paymentId STRING Contains value only for type: SUBSCRIPTION_PAYMENT.
It is the ID of the payment for which the notification is generated.
timestamp STRING The UNIX timestamp of the notification.

# Response

{
  "notificationId": "25",
  "type": "SUBSCRIPTION",
  "status": "CANCELED",
  "subscriptionId": "19",
  "paymentId": "",
  "timestamp": "1586207871"
}
{
  "notificationId": "26",
  "type": "SUBSCRIPTION_PAYMENT",
  "status": "SUCCEEDED_PAYMENT",
  "subscriptionId": "23",
  "paymentId": "42",
  "timestamp": "1586207191"
}
curl -X POST http://api.example.com/auth/login \
  --data '{
    "username": "my-username",
    "password": "my-password"
  }'