{
"type": "feature.created",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
}
{
"type": "feature.updated",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
}
{
"type": "feature.deleted",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
}
{
"type": "plan.created",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"productId": "product-test-id",
"status": "PUBLISHED",
"isLatest": true,
"version": 7,
"packageEntitlements": [
{
"feature": {
"id": "feature-analytics",
"name": "feature-test",
"description": "feature description here",
"featureType": "BOOLEAN",
"meterType": "INCREMENTAL",
"unit": "seat",
"units": "seats",
"status": "ACTIVE"
},
"hasUnlimitedUsage": false,
"usageLimit": 100
}
],
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"amount": 50,
"currency": "ils",
"billingCountryCode": "il"
}
],
"metadata": {
"testKey": "example value"
}
}
{
"type": "plan.updated",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"productId": "product-test-id",
"status": "PUBLISHED",
"isLatest": true,
"version": 7,
"packageEntitlements": [
{
"feature": {
"id": "feature-analytics",
"name": "feature-test",
"description": "feature description here",
"featureType": "BOOLEAN",
"meterType": "INCREMENTAL",
"unit": "seat",
"units": "seats",
"status": "ACTIVE"
},
"hasUnlimitedUsage": false,
"usageLimit": 100
}
],
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"amount": 50,
"currency": "ils",
"billingCountryCode": "il"
}
],
"metadata": {
"testKey": "example value"
}
}
{
"type": "plan.deleted",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"productId": "product-test-id",
"status": "PUBLISHED",
"isLatest": true,
"version": 7,
"packageEntitlements": [
{
"feature": {
"id": "feature-analytics",
"name": "feature-test",
"description": "feature description here",
"featureType": "BOOLEAN",
"meterType": "INCREMENTAL",
"unit": "seat",
"units": "seats",
"status": "ACTIVE"
},
"hasUnlimitedUsage": false,
"usageLimit": 100
}
],
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"amount": 50,
"currency": "ils",
"billingCountryCode": "il"
}
],
"metadata": {
"testKey": "example value"
}
}
{
"type": "addon.created",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "Test addon",
"name": "Test",
"description": "Adding more",
"status": "PUBLISHED",
"packageEntitlements": [
{
"feature": {
"id": "feature-analytics",
"name": "feature-test",
"description": "feature description here",
"unit": "seat",
"units": "seats",
"featureType": "BOOLEAN",
"status": "ACTIVE"
},
"hasUnlimitedUsage": false,
"usageLimit": 100
}
],
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"amount": 40,
"currency": "ils",
"billingCountryCode": "il"
}
],
"metadata": {
"testKey": "example value"
}
}
{
"type": "addon.deleted",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "Test addon",
"name": "Test",
"description": "Adding more",
"status": "PUBLISHED",
"packageEntitlements": [
{
"feature": {
"id": "feature-analytics",
"name": "feature-test",
"description": "feature description here",
"unit": "seat",
"units": "seats",
"featureType": "BOOLEAN",
"status": "ACTIVE"
},
"hasUnlimitedUsage": false,
"usageLimit": 100
}
],
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"amount": 40,
"currency": "ils",
"billingCountryCode": "il"
}
],
"metadata": {
"testKey": "example value"
}
}
{
"type": "addon.deleted",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "Test addon",
"name": "Test",
"description": "Adding more",
"status": "PUBLISHED",
"packageEntitlements": [
{
"feature": {
"id": "feature-analytics",
"name": "feature-test",
"description": "feature description here",
"unit": "seat",
"units": "seats",
"featureType": "BOOLEAN",
"status": "ACTIVE"
},
"hasUnlimitedUsage": false,
"usageLimit": 100
}
],
"prices": [
{
"billingModel": "FLAT_FEE",
"billingPeriod": "MONTHLY",
"amount": 40,
"currency": "ils",
"billingCountryCode": "il"
}
],
"metadata": {
"testKey": "example value"
}
}
{
"type": "customer.created",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "1111-1234-4223",
"metadata": {
"testKey": "example value"
},
"excludeFromExperiment": false,
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"billingCurrency": "ils"
}
{
"type": "customer.updated",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "1111-1234-4223",
"metadata": {
"testKey": "example value"
},
"excludeFromExperiment": false,
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"billingCurrency": "ils"
}
{
"type": "customer.payment_failed",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"timestamp": "2022-08-24T14:11:54.525Z",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "1111-1234-4223",
"metadata": {
"testKey": "example value"
},
"excludeFromExperiment": false,
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"billingCurrency": "ils"
},
"originatingEventId": "evt_3LaJOIE1gVT2zwZV1wzHom21",
"subscription": {
"entityId": "59f78766-8eae-463e-8315-9f5da46e1535",
"id": "subscription-plan-revvenu-essentials-0ecc92",
"billingId": "sub_1LaJOIE1gVT2zwZVwTszmcKG",
"status": "PAYMENT_PENDING",
"startDate": "2022-08-24T13:13:06.000Z",
"currentBillingPeriodStart": "2022-08-24T13:13:06.000Z",
"currentBillingPeriodEnd": "2023-08-24T13:13:06.000Z",
"isTrialSubscription": false,
"metadata": null,
"plan": {
"id": "plan-revvenu-essentials",
"name": "Essentials",
"description": null,
"metadata": null
},
"addons": []
},
"error": {
"message": "Your card has insufficient funds.",
"code": "card_declined",
"details": "insufficient_funds"
}
}
{
"type": "customer.deleted",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "1111-1234-4223",
"metadata": {
"testKey": "example value"
},
"excludeFromExperiment": false,
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"billingCurrency": "ils"
}
{
"type": "subscription.created",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "subscription-id",
"status": "ACTIVE",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"cancellationDate": "2022-05-10T00:00:00.001Z",
"trialEndDate": "2022-05-10T00:00:00.001Z",
"billingPeriod": "MONTHLY",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"isDowngrade": true,
"isUpgrade": false
}
{
"type": "subscription.updated",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "subscription-id",
"status": "ACTIVE",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"cancellationDate": "2022-05-10T00:00:00.001Z",
"trialEndDate": "2022-05-10T00:00:00.001Z",
"billingPeriod": "MONTHLY",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
}
{
"type": "subscription.canceled",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "subscription-uuid",
"id": "subscription-id",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"billingPeriod": "MONTHLY",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"status": "CANCELED",
"cancelReason": "CANCELLED_BY_BILLING",
"cancellationDate": "2022-05-10T00:00:00.001Z"
}
cancelReason
can get the following values:
{
"UpgradeOrDowngrade": "UPGRADE_OR_DOWNGRADE",
"CancelledByBilling": "CANCELLED_BY_BILLING",
"Expired": "EXPIRED",
"DetachBilling": "DETACH_BILLING",
"TrialEnded": "TRIAL_ENDED",
"Immediate": "Immediate",
"TrialConverted": "TRIAL_CONVERTED",
"PendingPaymentExpired": "PENDING_PAYMENT_EXPIRED",
"ScheduledCancellation": "ScheduledCancellation",
"CustomerArchived": "CustomerArchived"
}
{
"type": "subscription.expired",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "subscription-id",
"status": "ACTIVE",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"cancellationDate": "2022-05-10T00:00:00.001Z",
"trialEndDate": "2022-05-10T00:00:00.001Z",
"billingPeriod": "MONTHLY",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
}
{
"type": "subscription.billing_month.ends_soon",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "subscription-uuid",
"id": "subscription-id",
"status": "ACTIVE",
"paymentCollection": "NOT_REQUIRED",
"startDate": "2023-06-10T11:22:33.001Z",
"currentBillingMonthStart": "2024-10-10T11:22:33.001Z",
"currentBillingMonthEnd": "2024-11-10T11:22:33.001Z",
"currentBillingPeriodStart": "2024-06-10T11:22:33.001Z",
"currentBillingPeriodEnd": "2025-06-10T11:22:33.001Z",
"billingPeriod": "ANNUALLY",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "1111-1234-4223",
"metadata": {
"testKey": "example value"
},
"excludeFromExperiment": false,
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"billingCurrency": "ils"
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"entitlements": [
{
"feature": {
"id": "feature-01-stores",
"name": "Stores",
"description": "",
"unit": "Store",
"units": "Stores"
},
"usageLimit": 5,
"currentUsage": 3,
"usagePeriodAnchor": null,
"usagePeriodStart": null,
"usagePeriodEnd": null,
"resetPeriod": null
}
]
}
{
"entityId": "subscription-uuid",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "subscription-id",
"status": "ACTIVE",
"paymentCollection": "NOT_REQUIRED",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"currentBillingPeriodStart": "2022-06-10T00:00:00.001Z",
"currentBillingPeriodEnd": "2022-07-10T00:00:00.001Z",
"billingPeriod": "MONTHLY",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"type": "subscription.spent_limit.exceeded",
"spendLimit": 100,
"currentSpend": 80,
"currentSpendPercentage": 80,
"thresholdPercentage": 80,
"isSoftLimit": false
}
{
"type": "subscription.create_failed",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"input": {
"customerId": "customer-id",
"planId": "plan-id",
"billingPeriod": "MONTHLY",
"startDate": "2022-08-21T21:45:29.617Z",
"environmentId": "bf154237-4b89-4221-821e-dab51fe8c231",
"cancelUrl": "https://your-cancel-url.com",
"successUrl": "https://your-success-url.com"
},
"error": "Customer not found",
"accountId": "ae3500ba-85da-4499-990c-1b9d24c13ccc",
"environmentId": "bf154237-4b89-4221-821e-dab51fe8c231"
}
{
"type": "subscription.trial_started",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "subscription-id",
"status": "IN_TRIAL",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-05-10T00:00:00.001Z",
"trialEndDate": "2022-05-10T00:00:00.001Z",
"billingPeriod": "MONTHLY",
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id"
},
"resource": null,
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"isDowngrade": true,
"isUpgrade": false
}
{
"type": "subscription.trial.ends_soon",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "subscription-id",
"status": "IN_TRIAL",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-05-10T00:00:00.001Z",
"isTrialSubscription": true,
"billingPeriod": "MONTHLY",
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"metadata": {
"testKey": "example value"
}
}
{
"type": "subscription.trial_converted",
"entityId": "subscription-uuid",
"id": "subscription-id",
"status": "ACTIVE",
"paymentCollection": "NOT_REQUIRED",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"currentBillingPeriodStart": "2022-06-10T00:00:00.001Z",
"currentBillingPeriodEnd": "2022-07-10T00:00:00.001Z",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"payingCustomer": null,
"billingPeriod": "MONTHLY",
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
},
"isTrialSubscription": false,
"trialEndDate": "2022-05-10T00:00:00.001Z",
"reason": "TRIAL_ENDED"
}
reason
can get the following values:
{
"TrialEnded": "TRIAL_ENDED",
"PaidSubscriptionProvisioned": "PAID_SUBSCRIPTION_PROVISIONED",
}
{
"type": "subscription.trial_expired",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "customer-uuid",
"id": "subscription-id",
"status": "ACTIVE",
"startDate": "2022-04-10T00:00:00.001Z",
"endDate": "2022-07-10T00:00:00.001Z",
"cancellationDate": "2022-05-10T00:00:00.001Z",
"trialEndDate": "2022-05-10T00:00:00.001Z",
"billingCurrency": "ils",
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "customer-test-email",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id",
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
},
"resource": null,
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan test description",
"pricingType": "PAID"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"quantity": 10
}
],
"metadata": {
"testKey": "example value"
},
"experimentInfo": {
"id": "free-vs-paid-trial",
"name": "Free vs Paid trial",
"groupName": "Control group",
"groupType": "CONTROL"
}
}
{
"type": "measurement.reported",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"currentChange": 1,
"usageUsedPercentage": 75,
"currentUsage": 75,
"hasUnlimitedUsage": false,
"usageLimit": 100,
"usagePeriodAnchor": "2022-02-21T00:00:00.000Z",
"usagePeriodStart": "2022-08-21T00:00:00.000Z",
"usagePeriodEnd": "2022-09-21T00:00:00.000Z",
"resetPeriod": "MONTH",
"resetPeriodConfiguration": {
"accordingTo": "SubscriptionStart"
},
"feature": {
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
},
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test-name",
"email": "john@example.com"
},
"resource": null,
"activeSubscriptions": [
{
"id": "subscription-test-id",
"startDate": "2022-03-10T00:00:00.001Z",
"plan": {
"id": "plan-test-id",
"name": "plan-test-name",
"description": "plan description test",
"status": "PUBLISHED"
},
"addons": [
{
"id": "addon-test-id",
"name": "addon-test-name",
"description": "addon test description",
"status": "PUBLISHED",
"quantity": 5
}
],
"metadata": {
"testKey": "example value"
}
}
]
}
resourceId
field to indicate the specific resource the entitlement applies to.
Example payload
{
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"type": "entitlements.updated",
"trigger": "subscription_updated",
"customer": {
"id": "customer-demo-01",
"name": "John Doe",
"email": "john@example.com",
"billingId": "cus_Lh48hfXd3j3PmN"
},
"entitlements": [
{
"feature": {
"id": "feature-01-stores",
"name": "Stores",
"description": "",
"featureType": "NUMBER",
"meterType": "FLUCTUATING",
"unit": "Store",
"units": "Stores",
"status": "NEW"
},
"usageLimit": 5,
"hasUnlimitedUsage": false,
"usagePeriodAnchor": null,
"usagePeriodStart": null,
"usagePeriodEnd": null,
"resetPeriod": null,
"resetPeriodConfiguration": null,
"resourceId": "store-456"
}
],
"environmentId": "4de6a488-3f10-4666-b61a-ab814bd85ec4",
"entitlementsUpdatedAt": "2024-07-02T08:06:16.569Z"
}
{
"type": "entitlement.usage_exceeded",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"timestamp": "2024-03-06T14:59:16.399Z",
"thresholdPercentage": 80,
"usageUsedPercentage": 83,
"currentUsage": 10,
"hasUnlimitedUsage": false,
"hasSoftLimit": false,
"usageLimit": 12,
"usagePeriodAnchor": "2024-01-06T00:00:00.000Z",
"usagePeriodStart": "2024-03-06T00:00:00.000Z",
"usagePeriodEnd": "2024-04-06T00:00:00.000Z",
"resetPeriod": "MONTH",
"resetPeriodConfiguration": {
"accordingTo": "SubscriptionStart"
},
"feature": {
"id": "feature-02-campaigns",
"name": "Campaigns",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"unit": "campaign",
"units": "campaigns"
},
"customer": {
"entityId": "e8f61d50-58f1-42e9-9385-c6e97c62a710",
"id": "customer-166d74",
"name": "",
"email": null
},
"resource": null,
"activeSubscriptions": [
{
"id": "subscription-plan-revvenu-essentials-0e736e",
"startDate": "2024-03-06T10:13:37.000Z",
"plan": {
"id": "plan-revvenu-essentials",
"name": "Essentials"
}
}
],
}
{
"type": "promotionalEntitlement.granted",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"status": "Active",
"feature": {
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
},
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id"
},
"hasUnlimitedUsage": false,
"usageLimit": 100,
"resetPeriod": "MONTH",
"resetPeriodConfiguration": {
"accordingTo": "SubscriptionStart"
},
"isVisible": true,
"period": "1 month",
"endDate": "2022-04-10T00:00:00.001Z"
}
{
"type": "promotionalEntitlement.updated",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"status": "Active",
"feature": {
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
},
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id"
},
"hasUnlimitedUsage": false,
"usageLimit": 100,
"resetPeriod": "MONTH",
"resetPeriodConfiguration": {
"accordingTo": "SubscriptionStart"
},
"isVisible": true,
"period": "1 month",
"endDate": "2022-04-10T00:00:00.001Z"
}
{
"type": "promotionalEntitlement.revoked",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"status": "Active",
"feature": {
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
},
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id"
},
"hasUnlimitedUsage": false,
"usageLimit": 100,
"resetPeriod": "MONTH",
"resetPeriodConfiguration": {
"accordingTo": "SubscriptionStart"
},
"isVisible": true,
"period": "1 month",
"endDate": "2022-04-10T00:00:00.001Z"
}
{
"type": "promotionalEntitlement.expired",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"id": "plan-test-id",
"status": "Active",
"feature": {
"id": "feature-test-id",
"name": "feature-test-name",
"unit": "seat",
"units": "seats",
"description": "feature test description",
"featureType": "NUMBER",
"meterType": "INCREMENTAL",
"status": "ACTIVE"
},
"customer": {
"entityId": "customer-uuid",
"id": "customer-test-id",
"name": "customer-test",
"email": "john@example.com",
"billingId": "customer-test-billing-id",
"crmId": "customer-test-crm-id"
},
"hasUnlimitedUsage": false,
"usageLimit": 100,
"resetPeriod": "MONTH",
"resetPeriodConfiguration": {
"accordingTo": "SubscriptionStart"
},
"isVisible": true,
"period": "1 month",
"endDate": "2022-04-10T00:00:00.001Z"
}
{
"type": "coupon.created",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "coupon-id",
"name": "best-coupon",
"description": "best coupon ever",
"couponType": "PERCENTAGE",
"status": "ACTIVE",
"discountValue": 20,
"createdAt": "2022-04-10T00:00:00.001Z",
"updatedAt": "2022-04-10T00:00:00.001Z"
}
{
"type": "coupon.updated",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "coupon-id",
"name": "best-coupon",
"description": "best coupon ever",
"couponType": "PERCENTAGE",
"status": "ACTIVE",
"discountValue": 20,
"createdAt": "2022-04-10T00:00:00.001Z",
"updatedAt": "2022-04-10T00:00:00.001Z"
}
{
"type": "coupon.archived",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"entityId": "coupon-id",
"name": "best-coupon",
"description": "best coupon ever",
"couponType": "PERCENTAGE",
"status": "ACTIVE",
"discountValue": 20,
"createdAt": "2022-04-10T00:00:00.001Z",
"updatedAt": "2022-04-10T00:00:00.001Z"
}
{
"type": "sync.failed",
"messageId": "a6ce0647-e7d2-4072-a207-4c81a134cdb3",
"traceId": "549abcd8-f117-4156-a7b9-b8d89e6649a8",
"error": "Customer already exists",
"id": "customer-id",
"entityType": "CUSTOMER",
"vendorIdentifier": "stripe"