Documentation Index
Fetch the complete documentation index at: https://docs.subtotal.com/llms.txt
Use this file to discover all available pages before exploring further.
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:
| Key | Type | Description |
|---|
| type | string | The webhook event type |
| id | string | Identifier for the webhook |
| payload | string | The 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.
| Key | Type | Description |
|---|
| payload.connection.connection_id | string | Identifier for the connection |
| payload.connection.customer_id | string | Identifier for the associated customer |
| payload.connection.retailer_id | string | Identifier for the retailer in the connection |
| payload.connection.email | string | Email address of the associated customer |
| payload.connection.mobile | string | Mobile phone number of the associated customer |
| payload.connection.status | string | Current 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.
| Key | Type | Description |
|---|
| payload.connection.connection_id | string | Identifier for the connection |
| payload.connection.customer_id | string | Identifier for the associated customer |
| payload.connection.retailer_id | string | Identifier for the retailer in the connection |
| payload.connection.email | string | Email address of the associated customer |
| payload.connection.mobile | string | Mobile phone number of the associated customer |
| payload.connection.status | string | Current 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.
| Key | Type | Description |
|---|
| payload.connection.connection_id | string | Identifier for the connection |
| payload.connection.customer_id | string | Identifier for the associated customer |
| payload.connection.retailer_id | string | Identifier for the retailer in the connection |
| payload.connection.email | string | Email address of the associated customer |
| payload.connection.mobile | string | Mobile phone number of the associated customer |
| payload.connection.status | string | Current 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"
}
}
}
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.
| Key | Type | Description |
|---|
| payload.connection.connection_id | string | Identifier for the connection |
| payload.connection.customer_id | string | Identifier for the associated customer |
| payload.connection.retailer_id | string | Identifier for retailer in the connection |
| payload.connection.email | string | Email address of the associated customer |
| payload.connection.mobile | string | Mobile phone number of the associated customer |
| payload.connection.status | string | Current status of the connection |
| payload.purchase.purchase_id | string | Identifier for the purchase |
| payload.purchase.date | string | Date of the purchase (ISO 8601) |
| payload.purchase.item_count | number | The number of items in the purchase |
| payload.purchase.subtotal | number | The subtotal of the purchase |
| payload.purchase.tax | number | The sales tax that was paid |
| payload.purchase.total | number | Total amount of the purchase |
| payload.purchase.items[].item_id | string | Identifier for the item |
| payload.purchase.items[].price | number | Price of the item |
| payload.purchase.items[].quantity | number | The quantity purchased |
| payload.purchase.items[].product.product_id | string | Identifier for the product |
| payload.purchase.items[].product.name | string | The name of the product |
| payload.purchase.items[].product.description | string | Description of the item |
| payload.purchase.items[].product.upc | string | Universal identifier for the product (UPC) |
| payload.purchase.items[].product.brand | string | The 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"
}
}
]
}
}
}