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": "65e01f76d03692125f1f355e",
  "event": "purchase.pass",
  "contains": [
    "user",
    "purchase"
  ],
  "payload": {
    "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"
    },
    "purchase": {
      "location": {
        "latitude": 28.5223,
        "longitude": 77.2849,
        "postcode": "110001"
      },
      "gstComponents": {
        "physical": 0,
        "digital": 0
      },
      "inrGstComponents": {
        "physical": 0,
        "digital": 0
      },
      "_id": "65e0239ad03692125f1f35c5",
      "cancelAccess": false,
      "contentType": {
        "digital": true,
        "adFree": false,
        "_id": "65e0239a36cfe5f49666f7ec"
      },
      "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-6",
      "contentId": "65c32600aa9ec1057a23254a",
      "buyingPrice": 2400,
      "price": 3000,
      "country": "IN",
      "city": "new delhi (okhla phase i)",
      "userCountry": "IN",
      "expiryDate": "2024-02-29T13:26:23.617Z",
      "passTitle": "Pass",
      "priceDetails": {
        "price": 3000,
        "currency": "INR",
        "_id": "65e0239a36cfe5f49666f7ed"
      },
      "type": "PASS",
      "operatingSystem": "Mac OS",
      "device": "desktop",
      "transactionId": "65e02390d03692125f1f35c4",
      "bundleSubscriptions": [],
      "createdAt": "2024-02-29T06:26:34.259Z",
      "updatedAt": "2024-02-29T06:26:34.259Z",
      "__v": 0
    }
  },
  "client_info": {
    "deviceType": "desktop"
  },
  "created_at": 1709187994
}

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
}

Last updated