Klaviyo Event Payload Structure

Klaviyo event data types

On this page

This guide explains the structure of event data sent to Klaviyo when subscription events occur. Understanding this structure will help you create more effective email templates and automation flows.

Overview

All subscription events sent to Klaviyo include a comprehensive payload containing information about the subscription contract, customer, line items, pricing, delivery, and payment details. The event data structure is consistent across all event types.

Event Types

The following subscription events send data to Klaviyo:

  • Subscription Contract Create - When a new subscription is created
  • Subscription Contract Pause - When a subscription is paused
  • Subscription Contract Activate - When a subscription is activated/resumed
  • Subscription Contract Cancel - When a subscription is cancelled
  • Billing Attempt Success - When a billing attempt succeeds
  • Billing Attempt Failure - When a billing attempt fails
  • Order Skipped - When a subscription order is skipped
  • Order Unskipped - When a previously skipped order is unskipped

Complete Payload Structure

Top-Level Fields

FieldTypeDescriptionExample
contractIdstringUnique identifier for the subscription contract"44017680677"
currencyCodestringThree-letter currency code"USD"
linesCountnumberTotal number of line items in the subscription2
isPrepaidbooleanWhether this is a prepaid subscriptionfalse
manageSubscriptionUrlstringURL where customers can manage their subscription"https://shopify.com/..."
merchantSupportEmailstring or nullMerchant's support email address"support@example.com"

Customer Object

Contains detailed information about the subscriber:

FieldTypeDescriptionExample
customer.idstringUnique customer identifier"1000000000000"
customer.emailstringCustomer's email address"example@gmail.com"
customer.firstNamestring or nullCustomer's first name"John"
customer.lastNamestring or nullCustomer's last name"Doe"
customer.displayNamestring or nullCustomer's full display name"John Doe"
customer.lifetimeDurationstring or nullHow long the customer has been active"about 2 months"
customer.localestring or nullCustomer's locale/language"en-US"
customer.numberOfOrdersnumber or nullTotal orders placed by customer5
customer.tagsarray of stringsCustomer tags["kaching-subscriber"]
customer.isEmailVerifiedboolean or nullWhether email is verifiedtrue

Common Customer Tags:

  • kaching-subscriber - Customer has at least one subscription
  • kaching-has-active-subscription - Has an active subscription
  • kaching-has-paused-subscription - Has a paused subscription
  • kaching-has-cancelled-subscription - Has a cancelled subscription
  • kaching-has-payment-failure - Has experienced payment failures

Line Items Array

Each subscription can have multiple line items. Access via lines array:

FieldTypeDescriptionExample
lines[].titlestringProduct title"Premium Coffee"
lines[].variantTitlestring or nullVariant title (e.g., size, color)"Medium Roast"
lines[].productIdstring or nullUnique product identifier"10000000000001"
lines[].variantIdstring or nullUnique variant identifier"10000000000002"
lines[].quantitynumberQuantity of this line item2
lines[].variantImageUrlstring or nullURL to variant image"https://..."
lines[].variantImageAltTextstring or nullAlt text for image"Coffee bag"
lines[].lineDiscountedPricenumberLine total after discounts (numeric)10.00
lines[].lineDiscountedPriceFormattedstringFormatted price with currency symbol"$10.00"

Pricing Information

All monetary values are provided in both raw and formatted versions:

Subtotal:

  • subtotalPrice.amount (number): Raw subtotal amount
  • subtotalPrice.currencyCode (string): Currency code
  • subtotalPriceFormatted (string): Formatted subtotal (e.g., "$20.00")

Shipping:

  • totalShippingPrice.amount (number): Raw shipping amount
  • totalShippingPrice.currencyCode (string): Currency code
  • totalShippingPriceFormatted (string): Formatted shipping (e.g., "$10.00")

Total:

  • totalPrice.amount (number): Raw total amount
  • totalPrice.currencyCode (string): Currency code
  • totalPriceFormatted (string): Formatted total (e.g., "$30.00")

Next Order Information

Details about the upcoming order:

FieldTypeDescriptionExample
nextOrderDatestring or nullISO 8601 date in customer's timezone"2027-11-25T13:00:00.000+02:00"
humanReadableNextOrderDatestring or nullFormatted date for display"November 25, 2027"
nextCycleIndexnumber or nullThe cycle number for next order1

Modified Order Information

When an order is skipped or unskipped, these fields contain the modified order details:

FieldTypeDescriptionExample
modifiedOrderDatestring or nullISO 8601 date of modified order"2026-11-20T15:00:00-05:00"
humanReadableModifiedOrderDatestring or nullFormatted modified date"November 20, 2026"
modifiedCycleIndexnumber or nullThe cycle number that was modified1

Note: These fields are only populated for order_skipped and order_unskipped events.

Delivery Schedule

Information about when products are delivered:

FieldTypeDescriptionPossible Values
deliveryIntervalstringTime unit for delivery"DAY", "WEEK", "MONTH", "YEAR"
deliveryFrequencynumberNumber of intervals between deliveries1, 2, 3, etc.

Examples:

  • Deliver every month: deliveryInterval: "MONTH", deliveryFrequency: 1
  • Deliver every 2 weeks: deliveryInterval: "WEEK", deliveryFrequency: 2

Billing Schedule:

Information about when payments are processed:

FieldTypeDescriptionPossible Values
billingIntervalstringTime unit for billing"DAY", "WEEK", "MONTH", "YEAR"
billingFrequencynumberNumber of intervals between billing1, 2, 3, etc.
maxCyclesnumber or nullMaximum number of billing cycles12 or null
minCyclesnumber or nullMinimum number of billing cycles3 or null

Delivery Method

Shipping or local delivery details.

The structure varies by delivery type.

For shipping delivery (typename: "SubscriptionDeliveryMethodShipping"):

Code
{
  "typename": "SubscriptionDeliveryMethodShipping",
  "address": {
    "address1": "2515 South Broad Street",
    "address2": null,
    "city": "Linden",
    "province": "New Jersey",
    "provinceCode": "NJ",
    "countryCodeV2": "US",
    "zip": "07036",
    "firstName": "John",
    "lastName": "Doe",
    "phone": null
  },
  "shippingOption": {
    "title": "Standard shipping",
    "presentmentTitle": "Standard shipping"
  }
}

For local delivery (typename: "SubscriptionDeliveryMethodShipping"):

Code
{
  "typename": "SubscriptionDeliveryMethodLocalDelivery",
  "address": {
    "address1": "123 Main Street",
    "address2": "Apt 4",
    "city": "Portland",
    "province": "Oregon",
    "provinceCode": "OR",
    "countryCodeV2": "US",
    "zip": "97201",
    "firstName": "Jane",
    "lastName": "Smith",
    "phone": "+15551234567"
  },
  "localDeliveryOption": {
    "title": "Local Delivery",
    "presentmentTitle": "Same-Day Local Delivery"
  }
}

For pickup (typename: "SubscriptionDeliveryMethodPickup"):

Code
{
  "typename": "SubscriptionDeliveryMethodPickup",
  "pickupOption": {
    "title": "In-Store Pickup",
    "presentmentTitle": "Pick up at Downtown Store"
  }
}

You can find out more about delivery method object structure in the official Shopify API docs: SubscriptionDeliveryMethod.

Payment Method

Details about the customer's payment method:

FieldTypeDescriptionExample
paymentMethod.idstringUnique payment method identifier"gid://shopify/..."
paymentMethod.typenamestringType of payment method"CustomerPaymentMethod"
paymentMethod.revokedAtstring or nullWhen the payment method was revokednull
paymentMethod.revokedReasonstring or nullWhy the payment method was revokednull

Payment Instrument (for Credit Cards):

When paymentMethod.instrument.typename is "CustomerCreditCard":

Code
{
  "typename": "CustomerCreditCard",
  "brand": "visa",
  "lastDigits": "4242",
  "billingAddress": {
    "firstName": "John",
    "lastName": "Doe",
    "address1": "2515 South Broad Street",
    "province": "New Jersey",
    "countryCode": "US",
    "city": "Linden",
    "zip": "07036"
  }
}

Possible Card Brands:

  • visa
  • mastercard
  • american_express
  • discover
  • etc.

You can find out more about payment method object structure in the official Shopify API docs: CustomerPaymentMethod.


Example event data

Code
{
  "subtotalPrice": {
    "currencyCode": "USD",
    "amount": 20
  },
  "humanReadableNextOrderDate": "November 25, 2025",
  "contractId": "44017680677",
  "currencyCode": "USD",
  "deliveryInterval": "MONTH",
  "isPrepaid": false,
  "subtotalPriceFormatted": "$20.00",
  "modifiedOrderDate": null,
  "manageSubscriptionUrl": "https://shopify.com/",
  "merchantSupportEmail": "example@gmail.com",
  "customer": {
    "numberOfOrders": "0",
    "lastName": "John",
    "firstName": "Doe",
    "id": "9313802453285",
    "displayName": "John Doe",
    "tags": [
      "kaching-has-active-subscription",
      "kaching-has-cancelled-subscription",
      "kaching-has-paused-subscription",
      "kaching-has-payment-failure",
      "kaching-subscriber"
    ],
    "lifetimeDuration": "about 2 months",
    "locale": "en-US",
    "email": "example@gmail.com",
    "isEmailVerified": true
  },
  "totalShippingPrice": {
    "currencyCode": "USD",
    "amount": "10.0"
  },
  "nextOrderDate": "2025-11-25T13:00:00.000+02:00",
  "deliveryMethod": {
    "typename": "SubscriptionDeliveryMethodShipping",
    "shippingOption": {
      "title": "Standard shipping",
      "presentmentTitle": "Standard shipping"
    },
    "address": {
      "address1": "2515 South Broad Street",
      "lastName": "Doe",
      "address2": null,
      "province": "New Jersey",
      "phone": null,
      "firstName": "John",
      "provinceCode": "NJ",
      "zip": "07036",
      "countryCodeV2": "US",
      "city": "Linden"
    }
  },
  "totalPriceFormatted": "$30.00",
  "billingInterval": "MONTH",
  "nextCycleIndex": 1,
  "paymentMethod": {
    "id": "gid://shopify/CustomerPaymentMethod/1283f7016e680465b7ab15f47d971432",
    "instrument": {
      "lastDigits": "4242",
      "typename": "CustomerCreditCard",
      "billingAddress": {
        "address1": "2515 South Broad Street",
        "lastName": "Doe",
        "firstName": "John",
        "province": "",
        "countryCode": "US",
        "zip": "07036",
        "city": "Linden"
      },
      "brand": "visa"
    },
    "revokedAt": null,
    "revokedReason": null
  },
  "billingFrequency": 1,
  "totalPrice": {
    "currencyCode": "USD",
    "amount": 30
  },
  "linesCount": 2,
  "maxCycles": null,
  "modifiedCycleIndex": null,
  "minCycles": null,
  "totalShippingPriceFormatted": "$10.00",
  "lines": [
    {
      "variantImageUrl": "https://cdn.shopify.com/s/files/1/0957/5756/6245/files/hat.jpg?v=1761388161",
      "lineDiscountedPriceFormatted": "$10.00",
      "quantity": 1,
      "variantTitle": null,
      "variantId": "51451354349861",
      "title": "Hat",
      "productId": "10200405147941",
      "lineDiscountedPrice": "10.0",
      "variantImageAltText": null
    },
    {
      "variantImageUrl": "https://cdn.shopify.com/s/files/1/0957/5756/6245/files/shirt.jpg?v=1761388177",
      "lineDiscountedPriceFormatted": "$10.00",
      "quantity": 1,
      "variantTitle": null,
      "variantId": "51451354415397",
      "title": "Blue Shirt",
      "productId": "10200405213477",
      "lineDiscountedPrice": "10.0",
      "variantImageAltText": null
    }
  ],
  "deliveryFrequency": 1,
  "humanReadableModifiedOrderDate": null
}

Practical Examples for Email Templates

Example 1: Personalized Greeting with Order Total:

Code
Hi {{ event.customer.firstName }},
Your next subscription order of {{ event.totalPriceFormatted }} will be processed on {{ event.humanReadableNextOrderDate }}.

Output:

Code
Hi John,
Your next subscription order of $30.00 will be processed on November 25, 2027.

Example 2: List All Subscription Items

Code
Your subscription includes:
{% for line in lines %}
- {{ line.quantity }}x {{ line.title }}{% if line.variantTitle %} ({{ line.variantTitle }}){% endif %} - {{ line.lineDiscountedPriceFormatted }}
{% endfor %}

Output:

Code
Your subscription includes:
- 1x Hat - $10.00
- 1x Blue Shirt - $15.00

Example 3: Display Delivery Schedule

Code
You'll receive deliveries every {{ deliveryFrequency }} {{ deliveryInterval | downcase }}{% if deliveryFrequency > 1 %}s{% endif %}.

Output:

Code
You'll receive deliveries every 1 month. You'll receive deliveries every 2 weeks.

Important Notes

Date Formats

  • nextOrderDate and modifiedOrderDate are ISO 8601 formatted strings in the customer's timezone
  • humanReadableNextOrderDate and humanReadableModifiedOrderDate are pre-formatted strings ready for display, localized based on the customer's locale

Price Formats

  • Use the *Formatted fields (e.g., totalPriceFormatted) for display in emails - these include the currency symbol and proper formatting
  • Use the .amount fields (e.g., totalPrice.amount) for calculations or comparisons

Null Values

  • Many fields can be null if the information is not available
  • Always check for null values in your templates to avoid display issues

Customer Tags

  • Use customer tags to segment and personalize your communications
  • Tags are automatically managed by the app based on subscription status

Delivery Method Types

  • Always check deliveryMethod.typename to determine which fields are available
  • Shipping and Local Delivery have address objects, while Pickup has pickupOption

Testing Your Templates

You can send test events from the Klaviyo integration settings page to verify your email templates work correctly with real subscription data. Test events are available for all event types.


Need help? Drop us a message in the live chat, and we'll sort it out together.