Skip to main content

Overview

Webhooks let you subscribe to Subtotal system events and receive real-time HTTP requests when those events occur. Use webhooks to keep your systems in sync with connection and purchase activity.

Properties included with every event

These properties are included with each webhook request:
KeyTypeDescription
typestringThe webhook event type
idstringIdentifier for the webhook
payloadstringThe payload of the webhook
Below are all supported event types and their corresponding payload structures.

connection.activated

Connections are activated when a customer successfully links their account.
KeyTypeDescription
payload.connection.connection_idstringIdentifier for the connection
payload.connection.customer_idstringIdentifier for the associated customer
payload.connection.retailer_idstringIdentifier for the retailer in the connection
payload.connection.emailstringEmail address of the associated customer
payload.connection.mobilestringMobile phone number of the associated customer
payload.connection.statusstringCurrent status of the connection
Example connection.activated event
{
  "type": "connection.activated",
  "id": "01KFJSR44CPH867805V8GJ9VCY",
  "payload": {
    "connection": {
      "connection_id": "01K8BPF23CCZ2FK50STB8EGWAV",
      "customer_id": "01K8BPF2393S9VB6JQT99GK447",
      "retailer_id": "target",
      "email": null,
      "mobile": null,
      "status": "active"
    }
  }
}

connection.unauthenticated

Connections move from activated to unauthenticated when a customer needs to re-authenticate their account. For example, when a customer changes their password with the retailer.
KeyTypeDescription
payload.connection.connection_idstringIdentifier for the connection
payload.connection.customer_idstringIdentifier for the associated customer
payload.connection.retailer_idstringIdentifier for the retailer in the connection
payload.connection.emailstringEmail address of the associated customer
payload.connection.mobilestringMobile phone number of the associated customer
payload.connection.statusstringCurrent status of the connection
Example connection.unauthenticated event
{
  "type": "connection.unauthenticated",
  "id": "01KFJSR44CPH867805V8GJ9VCY",
  "payload": {
    "connection": {
      "connection_id": "01K8BPF23CCZ2FK50STB8EGWAV",
      "customer_id": "01K8BPF2393S9VB6JQT99GK447",
      "retailer_id": "target",
      "email": null,
      "mobile": null,
      "status": "unauthenticated"
    }
  }
}

connection.disconnected

Connections move to disconnected status when a customer disconnects their account.
KeyTypeDescription
payload.connection.connection_idstringIdentifier for the connection
payload.connection.customer_idstringIdentifier for the associated customer
payload.connection.retailer_idstringIdentifier for the retailer in the connection
payload.connection.emailstringEmail address of the associated customer
payload.connection.mobilestringMobile phone number of the associated customer
payload.connection.statusstringCurrent status of the connection
Example connection.disconnected event
{
  "type": "connection.disconnected",
  "id": "01KFJSR44CPH867805V8GJ9VCY",
  "payload": {
    "connection": {
      "connection_id": "01K8BPF23CCZ2FK50STB8EGWAV",
      "customer_id": "01K8BPF2393S9VB6JQT99GK447",
      "retailer_id": "target",
      "email": null,
      "mobile": null,
      "status": "disconnected"
    }
  }
}

connection.profile.created

Sent the first time Subtotal captures a consumer’s profile for a connection — their identity details from the linked retailer account, together with purchase metrics scoped to your brands.
Unlike the other connection.* events, the profile payload is flat: its fields sit directly under payload, not under payload.connection.
KeyTypeDescription
payload.connection_idstringIdentifier for the connection
payload.first_namestringConsumer’s first name (null if unavailable)
payload.last_namestringConsumer’s last name (null if unavailable)
payload.emailstringConsumer’s email address (null if unavailable)
payload.mobilestringConsumer’s mobile phone number (null if unavailable)
payload.postal_codestringConsumer’s postal code (null if unavailable)
payload.account_created_datestringWhen the consumer’s retailer account was created (ISO 8601; null if unknown)
payload.total_purchasesnumberAll-time number of purchases on the connected account
payload.last_purchase_datestringDate of the most recent purchase (ISO 8601; null if none)
payload.brand_purchasesnumberNumber of those purchases you are authorized to see (matching your brands)
payload.last_brand_purchase_datestringDate of the most recent brand purchase (ISO 8601; null if none)
payload.brand_purchase_ratenumberbrand_purchases ÷ total_purchases, from 0.0 to 1.0
Example connection.profile.created event
{
  "type": "connection.profile.created",
  "id": "01KFJSR44CPH867805V8GJ9VCY",
  "payload": {
    "connection_id": "01K8BPF23CCZ2FK50STB8EGWAV",
    "first_name": "Jessica",
    "last_name": "Smith",
    "email": "jessica@acme.com",
    "mobile": "+123456789",
    "postal_code": "84101",
    "account_created_date": "2024-03-12T00:00:00Z",
    "total_purchases": 42,
    "last_purchase_date": "2026-01-15T14:30:00Z",
    "brand_purchases": 7,
    "last_brand_purchase_date": "2026-01-14T09:45:00Z",
    "brand_purchase_rate": 0.17
  }
}

connection.profile.updated

Sent when a previously captured profile changes — for example an updated email or postal code, or when new purchases shift the brand-purchase metrics. The payload is identical in shape to connection.profile.created.
KeyTypeDescription
payload.connection_idstringIdentifier for the connection
payload.first_namestringConsumer’s first name (null if unavailable)
payload.last_namestringConsumer’s last name (null if unavailable)
payload.emailstringConsumer’s email address (null if unavailable)
payload.mobilestringConsumer’s mobile phone number (null if unavailable)
payload.postal_codestringConsumer’s postal code (null if unavailable)
payload.account_created_datestringWhen the consumer’s retailer account was created (ISO 8601; null if unknown)
payload.total_purchasesnumberAll-time number of purchases on the connected account
payload.last_purchase_datestringDate of the most recent purchase (ISO 8601; null if none)
payload.brand_purchasesnumberNumber of those purchases you are authorized to see (matching your brands)
payload.last_brand_purchase_datestringDate of the most recent brand purchase (ISO 8601; null if none)
payload.brand_purchase_ratenumberbrand_purchases ÷ total_purchases, from 0.0 to 1.0
Example connection.profile.updated event
{
  "type": "connection.profile.updated",
  "id": "01KFJSR44CPH867805V8GJ9VCY",
  "payload": {
    "connection_id": "01K8BPF23CCZ2FK50STB8EGWAV",
    "first_name": "Jessica",
    "last_name": "Smith",
    "email": "jessica.smith@acme.com",
    "mobile": "+123456789",
    "postal_code": "84101",
    "account_created_date": "2024-03-12T00:00:00Z",
    "total_purchases": 43,
    "last_purchase_date": "2026-02-02T18:05:00Z",
    "brand_purchases": 8,
    "last_brand_purchase_date": "2026-02-02T18:05:00Z",
    "brand_purchase_rate": 0.19
  }
}

purchase.created

The purchase.created event is sent when a new purchase is received from a customer’s connected retailer account. We recommend using this event when you need to process customer purchases for your use case.
KeyTypeDescription
payload.connection.connection_idstringIdentifier for the connection
payload.connection.customer_idstringIdentifier for the associated customer
payload.connection.retailer_idstringIdentifier for retailer in the connection
payload.connection.emailstringEmail address of the associated customer
payload.connection.mobilestringMobile phone number of the associated customer
payload.connection.statusstringCurrent status of the connection
payload.purchase.purchase_idstringIdentifier for the purchase
payload.purchase.datestringDate of the purchase (ISO 8601)
payload.purchase.item_countnumberThe number of items in the purchase
payload.purchase.subtotalnumberThe subtotal of the purchase
payload.purchase.taxnumberThe sales tax that was paid
payload.purchase.totalnumberTotal amount of the purchase
payload.purchase.items[].item_idstringIdentifier for the item
payload.purchase.items[].pricenumberPrice of the item
payload.purchase.items[].quantitynumberThe quantity purchased
payload.purchase.items[].product.product_idstringIdentifier for the product
payload.purchase.items[].product.namestringThe name of the product
payload.purchase.items[].product.descriptionstringDescription of the item
payload.purchase.items[].product.upcstringUniversal identifier for the product (UPC)
payload.purchase.items[].product.brandstringThe brand associated with the product
Example purchase.created event
{
  "id": "01J51S0JYV6N7K1030CV1ZBDOW",
  "type": "purchase.created",
  "payload": {
    "connection": {
      "connection_id": "01J51S0JYV6N7K1030CV1ZKSCA",
      "customer_id": "01K8HDK6Y9FXM7ES4NJSHZDEKF",
      "retailer_id": "walmart",
      "email": "jessica@acme.com",
      "mobile": "+123456789",
      "status": "active"
    },
    "purchase": {
      "purchase_id": "01J51S0JYV6N7K1030CV1ZKSJH",
      "date": "2025-10-08T14:23:00Z",
      "total": 47.85,
      "subtotal": 43.50,
      "tax": 4.35,
      "items": [
        {
          "item_id": "01JV7ZDWC9GN1VPR41K3BY08X9",
          "price": 5.99,
          "quantity": 2,
          "product": {
            "product_id": "01J51S0JYV6N7K1030CV1ZKSCA", 
            "name": "Sparkling Water 12pk",
            "description": "Sparkling Water 12-Pack - 12 fl oz bottles",
            "upc": "001234567890",
            "brand": "la-croix"
          }
        },
        {
          "item_id": "01K3KS9Q4522E3HG444E4XH1R0",
          "price": 12.99,
          "quantity": 1,
          "product": {
            "product_id": "01J51S0JYV6N7K1030CV1ZKSCA",
            "name": "Trail Mix",
            "description": "Trail Mix Family Size", 
            "upc": "009876543210",
            "brand": "harvest-one"
          }
        },
        {
          "item_id": "01JV7ZDWC9GN1VPR41K3BY08X9",
          "price": 18.53,
          "quantity": 1,
          "product": {
            "product_id": "01J51S0JYV6N7K1030CV1ZKSCA",
            "name": "Face Cream",
            "description": "Moisturizing Face Cream",
            "upc": "011122233344",
            "brand": "glowww"
          }
        }
      ]
    }
  }
}