Conscent.ai Developer Documentation
  • Version 2.0
    • Using Conscent.ai
    • Web SDK
    • Login
    • Logout
    • User Details Drawer
    • Google One Tap
    • Mobile SDK
      • iOS(Swift)
        • In-App Purchases with Conscent
      • Android SDK
      • React Native SDK
      • Google In-App Purchases with Conscent
      • Apple In-App Purchases with Conscent
    • Facebook SSO Integration Guide
    • Landing Page API v 2.0
    • AMP Integration
    • Integrating APIs(v2)
      • Purchase Details
      • User Registered Or Not
      • User Registrations
      • Subscription Plans Details
      • Get User Details
      • Add Subscription If User Registered
      • Update UserDetails
      • Update SubscriptionDetails
      • Get All Transaction Details
    • IAM System API Documentation
  • Version 1.0
    • Getting Started
    • On Board
    • Using Conscent.ai
    • Authentication
    • Web SDK
    • Login
    • Logout
    • Amp Documentation
    • Mobile SDK
      • Android
      • Flutter
      • iOS(Swift)
      • React Native SDK
    • Auto Login
    • Creating External Purchases
    • Landing Page API
  • Login Screen Customization
  • Integrating Client Payment Gateway
  • Integrating with APIs
    • User Details and Subscriptions Information
    • Purchased Subscriptions
    • User and Purchase Details
    • Client Purchases
    • Client Micropayments
    • Client Passes
    • Cancel Active Subscriptions
    • Delete User
  • Events API Docs
    • Different Types of Events
    • SSO Login Flow
  • Discount Coupon
    • Dynamic Coupon API Generation:
  • New Webhooks
    • Meter Banner Webhook
    • Paywall Webhook
    • SignUp Webhook
    • Refund Webhook
    • Purchase Webhook
    • Subscription Landing Page Webhook
    • Popup Webhook
    • User Update Webhook
    • Payment Gateway Webhook
    • Review Page Webhook
    • Transaction Webhook
    • Login Webhook
    • Cancel Subscription Webhook
  • Old Webhooks
    • Sign Up Webhook
    • Login Webhook
    • Subscription Payment Webhook
    • Subscription Cancelled Webhook
    • Pass Payment Webhook
    • Subscription Bundle Payment Webhook
    • Review Subscription Webhook
    • Micro Payment Webhook
    • How to validate Webhooks?
  • Registering The Content
    • Create Content
    • Edit Content
    • View Content
  • Country Code List
  • Supported Currencies and Payment Gateways
    • Stripe Supported Country with Currency
    • Razorpay Supported Country with Currency
    • Paypal Supported Country with Currency
  • Errors
  • Loyalty System
    • Web SDK
    • iOS SDK
    • Android SDK
    • Flutter SDK
    • API from server
Powered by GitBook
On this page
  1. New Webhooks

Purchase Webhook

A Purchase Webhook is used in payment processing systems to notify or trigger actions in response to purchase transactions.

Purchase.pass: This event is triggered when a purchase is created after a successful transaction of a Pass

{
  "entity": "event",
  "user_id": "67a33080b06ceb81ad1a0962",
  "event": "purchase.subscription",
  "contains": [
    "purchase",
    "user"
  ],
  "payload": {
    "purchase": {
      "_id": "67a33168b06ceb81ad1a0dbf",
      "location": {
        "latitude": 28.4112,
        "longitude": 77.3132
      },
      "gstComponents": {
        "physical": 0,
        "digital": 0
      },
      "inrGstComponents": {
        "physical": 0,
        "digital": 0
      },
      "cancelAccess": false,
      "contentType": {
        "digital": true,
        "adFree": false,
        "_id": "67a33168b06ceb81ad1a0dbe"
      },
      "migrated": false,
      "partialAccess": false,
      "sectionsInclude": [],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [],
      "tagsExclude": [],
      "userAccount": "67a33080b06ceb81ad1a0962",
      "clientId": "661907c2487ae1aba956dcc4",
      "clientReferenceId": "undefined",
      "buyingPrice": 108,
      "price": 120,
      "country": "IN",
      "city": "faridabad",
      "priceDetails": {
        "price": 120,
        "currency": "INR"
      },
      "type": "SUBSCRIPTION",
      "subscriptionType": {
        "physical": false,
        "digital": true,
        "adFree": false,
        "epaper": false
      },
      "subscriptionTitle": "kuchbhi",
      "subscriptionDetails": {
        "inrPrice": 120,
        "duration": 1
      },
      "transactionId": "67a33168b06ceb81ad1a0dbd",
      "expiryDate": "2025-03-05T09:37:44.468Z",
      "createdAt": "2025-02-05T09:37:44.508Z",
      "updatedAt": "2025-02-05T09:37:44.508Z"
    },
    "user": {
      "email": "asgcdv@gyhh.com",
      "freeTrial": 0,
      "userId": "67a3307bb06ceb81ad1a0945",
      "externalUserId": "67a3307bb06ceb81ad1a0945",
      "address": {
        "apartment": "",
        "landmark": "",
        "city": "",
        "name": "asdf",
        "area": "asdf",
        "pincode": "1234",
        "state": "adsf",
        "country": "AX"
      },
      "name": "ayush",
      "billingAddress": [
        {
          "name": "asdf",
          "apartment": "",
          "area": "asdf",
          "pincode": "1234",
          "landmark": "",
          "city": "",
          "state": "adsf",
          "country": "AX",
          "_id": "67a3313db06ceb81ad1a0b35"
        }
      ],
      "shippingAddress": [
        {
          "name": "adsf",
          "apartment": "",
          "area": "sadf",
          "pincode": "5346576",
          "landmark": "",
          "city": "",
          "state": "asdd",
          "country": "HT",
          "_id": "67a3313db06ceb81ad1a0b36"
        }
      ],
      "dateOfBirth": null,
      "location": {},
      "clientTierId": "673c315bb2deb6e310fbd8f3"
    }
  },
  "client_info": {
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36",
    "country": "India",
    "countryCode": "IN",
    "deviceType": "desktop",
    "deviceModel": "Macintosh"
  },
  "created_at": 1738748267
}

Purchase.subscription: This event is triggered when a purchase is created after a successful transaction of a Subscription.

{
  "entity": "event",
  "user_id": "6745980ff34e079c0a53f4ae",
  "event": "purchase.subscription",
  "contains": [
    "user",
    "purchase"
  ],
  "payload": {
    "user": {
      "email": "k21@k.com",
      "freeTrial": 0,
      "userId": "6745980ff34e079c0a53f4ae",
      "externalUserId": "61259",
      "address": {
        "name": "",
        "apartment": "",
        "area": "",
        "pincode": "",
        "landmark": "",
        "city": "",
        "state": "",
        "country": ""
      },
      "name": "",
      "location": {},
      "clientTierId": "6719de840ff43042667339a7"
    },
    "purchase": {
      "_id": "674598340ce37e76f7fc3f66",
      "location": {
        "latitude": 28.6031,
        "longitude": 77.1399
      },
      "gstComponents": {
        "physical": 0,
        "digital": 0
      },
      "inrGstComponents": {
        "physical": 0,
        "digital": 0
      },
      "cancelAccess": false,
      "contentType": {
        "digital": true,
        "adFree": false,
        "_id": "674598340ce37e76f7fc3f65"
      },
      "migrated": false,
      "partialAccess": false,
      "sectionsInclude": [],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [],
      "tagsExclude": [],
      "userAccount": "6745980ff34e079c0a53f4ae",
      "clientId": "641b0e856e306e46f88e29c6",
      "buyingPrice": 3780,
      "price": 3780,
      "country": "IN",
      "city": "shahdara",
      "priceDetails": {
        "price": 2520,
        "currency": "INR"
      },
      "type": "SUBSCRIPTION",
      "subscriptionType": {
        "physical": false,
        "digital": false,
        "adFree": false,
        "epaper": true
      },
      "subscriptionTitle": "E-Magazine Access",
      "subscriptionDetails": {
        "inrPrice": 3780,
        "duration": 12
      },
      "transactionId": "67459825b1c5a68745431e13",
      "expiryDate": "2025-11-26T09:43:01.800Z",
      "createdAt": "2024-11-26T09:43:16.937Z",
      "updatedAt": "2024-11-26T09:43:16.984Z"
    }
  },
  "client_info": {
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
    "country": "India",
    "countryCode": "IN",
    "deviceType": "desktop"
  },
  "created_at": 1732614198
}

Purchase.pay_per_use: This event is triggered when a purchase is created after a successful transaction of a Pay-per-use.

{
  "entity": "event",
  "user_id": "65e01f76d03692125f1f355e",
  "event": "purchase.pay_per_use",
  "contains": [
    "purchase",
    "user"
  ],
  "payload": {
    "purchase": {
      "location": {
        "latitude": 28.5223,
        "longitude": 77.2849,
        "postcode": "110001"
      },
      "gstComponents": {
        "physical": 0,
        "digital": 0
      },
      "inrGstComponents": {
        "physical": 0,
        "digital": 0
      },
      "_id": "65e0235ed03692125f1f35c2",
      "cancelAccess": false,
      "contentType": {
        "digital": true,
        "adFree": false,
        "_id": "65e0235e36cfe5f49666f7b2"
      },
      "categories": [],
      "bundle": false,
      "bundleContentIds": [],
      "paymentType": [
        "NEW"
      ],
      "migrated": false,
      "partialAccess": false,
      "sectionsInclude": [],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [],
      "tagsExclude": [],
      "proRataAppliedPurchases": [],
      "userAccount": "65e01f76d03692125f1f355e",
      "clientId": "65015ff10070846629fb981e",
      "paywallId": "65cb7057e57605058015b407",
      "clientContentId": "Client-Story-Id-2",
      "contentId": "65115336f1a61f0a58d4ae4e",
      "buyingPrice": 8,
      "price": 10,
      "country": "IN",
      "city": "new delhi (okhla phase i)",
      "userCountry": "IN",
      "expiryDate": "2024-03-07T06:25:24.493Z",
      "priceDetails": {
        "price": 10,
        "currency": "INR",
        "_id": "65e0235e36cfe5f49666f7b3"
      },
      "type": "CONTENT",
      "operatingSystem": "Mac OS",
      "device": "desktop",
      "transactionId": "65e02354d03692125f1f35c0",
      "bundleSubscriptions": [],
      "createdAt": "2024-02-29T06:25:34.333Z",
      "updatedAt": "2024-02-29T06:25:34.333Z",
      "__v": 0
    },
    "user": {
      "phoneNumber": "8838239889",
      "userId": "65e01f76d03692125f1f355e",
      "country": "IN",
      "address": {
        "apartment": "",
        "area": "",
        "pincode": "",
        "landmark": "",
        "city": "",
        "state": "",
        "country": ""
      },
      "name": "",
      "city": "new delhi (okhla phase i)",
      "location": {
        "latitude": 28.5223,
        "longitude": 77.2849,
        "postcode": "110001"
      },
      "username": "8838239889"
    }
  },
  "client_info": {
    "deviceType": "desktop"
  },
  "created_at": 1709187934
}

Purchase.bundle:

{
  "entity": "event",
  "user_id": "65e59ddb6efe72055d89ec87",
  "event": "purchase.bundle",
  "contains": [
    "purchase",
    "user"
  ],
  "payload": {
    "purchase": {
      "location": {
        "latitude": 28.5246,
        "longitude": 77.2793,
        "postcode": "110001"
      },
      "gstComponents": {
        "physical": 0,
        "digital": 899
      },
      "inrGstComponents": {
        "physical": 0,
        "digital": 899
      },
      "_id": "65e5a2576efe72055d89ed11",
      "cancelAccess": false,
      "contentType": {
        "digital": true,
        "adFree": false,
        "_id": "65e5a26036cfe5f496673315"
      },
      "categories": [],
      "bundle": true,
      "bundleContentIds": [],
      "paymentType": [
        "NEW"
      ],
      "migrated": false,
      "partialAccess": false,
      "sectionsInclude": [],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [],
      "tagsExclude": [],
      "proRataAppliedPurchases": [],
      "userAccount": "65e59ddb6efe72055d89ec87",
      "clientId": "65015ff10070846629fb981e",
      "buyingPrice": 854.05,
      "price": 899,
      "clientName": "Black Panther",
      "country": "IN",
      "city": "new delhi (pocket c)",
      "userCountry": "IN",
      "priceDetails": {
        "price": 899,
        "currency": "INR",
        "_id": "65e5a26036cfe5f496673316"
      },
      "type": "SUBSCRIPTION",
      "subscriptionType": {
        "physical": false,
        "digital": true,
        "adFree": false,
        "_id": "65e5a26036cfe5f496673317"
      },
      "subscriptionTitle": "Bundled Subscription",
      "utmParameters": {
        "utm_source": "KJK"
      },
      "operatingSystem": "Mac OS",
      "device": "desktop",
      "bundleSubscriptions": [
        {
          "_id": "650166680070846629fb9866",
          "clientId": "601a8ea4f2149f089782814f",
          "tierId": "650166680070846629fb9868"
        }
      ],
      "subscriptionDetails": {
        "inrPrice": 899,
        "duration": 0,
        "_id": "65e5a26036cfe5f496673318"
      },
      "transactionId": "65e5a2576efe72055d89ed13",
      "expiryDate": "2024-03-04T10:28:47.967Z",
      "createdAt": "2024-03-04T10:28:47.967Z",
      "updatedAt": "2024-03-04T10:28:47.967Z",
      "__v": 0
    },
    "user": {
      "phoneNumber": "9821828889",
      "userId": "65e59ddb6efe72055d89ec87",
      "country": "IN",
      "address": {
        "apartment": "1212",
        "pincode": "12",
        "city": "1212",
        "country": "India",
        "state": "1212",
        "area": "",
        "landmark": ""
      },
      "name": "ajdkllasd",
      "dateOfBirth": "0222-03-12T00:00:00.000Z",
      "city": "new delhi (pocket c)",
      "location": {
        "latitude": 28.5246,
        "longitude": 77.2793,
        "postcode": "110001"
      },
      "username": "9821828889"
    }
  },
  "client_info": {
    "deviceType": "desktop"
  },
  "created_at": 1709548128
}

PreviousRefund WebhookNextSubscription Landing Page Webhook

Last updated 3 months ago