Subscription Payment Webhook

This event occurs whenever the user buys any subscription.

You can register your webhook endpoint for receiving ConsCent purchased subscription data by logging in to your ConsCent Client Dashboard and navigating to the Webhook Page. You will be able to enable/disable and edit your webhook URL from this section. Once the webhook URL is registered and the webhook is enabled - the endpoint will receive the user's purchased subscription data anytime the user purchases a subscription on the client's platform or application via ConsCent. Moreover, the webhook is secured by basic auth using the Client's API Key and API Secret provided by ConsCent on the SDK Integration section of the client dashboard - ConsCent Client Integration. You can optionally choose to keep the endpoint protected and authenticate using the provided credentials which are passed in the headers of the POST request to the configured webhook endpoint.

SUBSCRIPTION PAYMENT JSON
{
  "gstComponents": {
    "physical": 0,
    "digital": 0
  },
  "inrGstComponents": {
    "physical": 0,
    "digital": 0
  },
  "cancelAccess": false,
  "contentType": {
    "digital": true,
    "adFree": false
  },
  "manuallyRenewed": false,
  "renewSubscription": false,
  "availedOffers": [],
  "promotional": false,
  "categories": [],
  "bundle": false,
  "bundleContentIds": [],
  "paymentType": [
    "NEW"
  ],
  "freeTrial": false,
  "migrated": false,
  "partialAccess": true,
  "sectionsInclude": [
    "batting"
  ],
  "authorsInclude": [],
  "sectionsExclude": [],
  "authorsExclude": [],
  "tagsInclude": [
    "cricket"
  ],
  "tagsExclude": [],
  "proRataAppliedPurchases": [],
  "_id": "65d43ad7cc6cfa43c284a06f",
  "userAccount": "65d43ac1cc6cfa43c284a040",
  "clientId": "65015ff10070846629fb981e",
  "paywallId": "65cb7057e57605058015b407",
  "landingPageId": "652e3c6ce7354805632dc7ce",
  "clientContentId": "Client-Story-Id-1",
  "contentId": "650187290070846629fb99d2",
  "buyingPrice": 1900,
  "price": 2000,
  "country": "IN",
  "discountCouponUserId": null,
  "discountCouponTemplateId": null,
  "originalPriceDetails": {
    "currency": "INR"
  },
  "originalInrPrice": 2000,
  "city": "new delhi (okhla phase i)",
  "location": {
    "latitude": 28.5223,
    "longitude": 77.2849,
    "postcode": "110001"
  },
  "userCountry": "IN",
  "expiryDate": "2024-03-20T05:38:21.954Z",
  "priceDetails": {
    "price": 2000,
    "currency": "INR"
  },
  "type": "SUBSCRIPTION",
  "subscriptionTitle": "cricket",
  "operatingSystem": "Mac OS",
  "device": "desktop",
  "subscriptionType": {
    "physical": false,
    "digital": true,
    "adFree": false
  },
  "previouslyPurchasedSubscriptionId": null,
  "subscriptionId": "65c4e2f1f296fa057f3efa9a",
  "tierId": "65c4e2f2f296fa057f3efa9c",
  "subscriptionDetails": {
    "inrPrice": 2000,
    "duration": 1
  },
  "transactionId": "65d43acecc6cfa43c284a06d",
  "bundleSubscriptions": [],
  "createdAt": "2024-02-20T05:38:31.810Z",
  "updatedAt": "2024-02-20T05:38:31.810Z",
  "__v": 0,
  "purchaseId": "65d43ad7cc6cfa43c284a06f",
  "orderId": "order_Nd1NLKC3yN9ERw",
  "renewed": false,
  "chosenTier": {
    "priceOverrides": {
      "country": []
    },
    "currency": "INR",
    "basePrice": 0,
    "offers": [],
    "_id": "65c4e2f2f296fa057f3efa9c",
    "price": 2000,
    "duration": 1,
    "rzpPlanId": "plan_JDJjFwwOG1V8a3"
  },
  "userId": "65d43ac1cc6cfa43c284a040",
  "userEmail": "aksdjl@jkajdlk.com",
  "userPhoneNumber": "9989283898",
  "userName": "kadjlk",
  "userAddress": {
    "apartment": "",
    "area": "",
    "pincode": "",
    "landmark": "",
    "city": "",
    "state": "",
    "country": ""
  },
  "renewedSubscriptionDetails": null
}

Last updated