The BenefitGrantLicenseKeysWebhook is a data structure used in webhooks to notify systems when license keys are granted or revoked as a benefit. It contains details about the grant status, the associated customer, the member involved, and the specific benefit being provided.
Key properties include:
isGranted and isRevoked: Boolean flags indicating the current state of the benefit.subscriptionId and orderId: Identifiers for the transaction that triggered the grant.benefit: Details about the license key benefit being issued.customer and member: Information about the entities receiving the benefit.
import { BenefitGrantLicenseKeysWebhook } from "@polar-sh/sdk/models/components/benefitgrantlicensekeyswebhook.js";
let value: BenefitGrantLicenseKeysWebhook = {
createdAt: new Date("2024-03-27T04:10:14.057Z"),
modifiedAt: new Date("2026-11-09T06:34:32.498Z"),
id: "<value>",
isGranted: true,
isRevoked: false,
subscriptionId: null,
orderId: "<value>",
customerId: "<value>",
benefitId: "<value>",
customer: {
id: "992fae2a-2a17-4b7a-8d9e-e287cf90131b",
// ... other customer fields
},
member: {
id: "<value>",
// ... other member fields
},
benefit: {
id: "<value>",
type: "license_keys",
// ... other benefit fields
},
properties: {},
};