Skip to main content
Dub

sale.created

2 min read

Occurs whenever a sale is created.

Response body parameters

All webhook payloads follow a consistent top-level structure with event-specific data nested within the data object.

idstring#
The event ID.
eventstring#
The event type that triggered the webhook (e.g., sale.created).
createdAtstring#
ISO 8601 timestamp when the webhook event was created.
dataobject#
Event-specific data containing detailed information about the event. The data object for the sale.created event contains the following parameters:
Show object parameters
eventNamestring#

Name of the tracked event (e.g. Purchased).

customerobject#

The customer that made the purchase.

Show customer object
idstring#

Unique identifier for the customer.

namestring#

Customer name.

emailstring#

Customer email address.

avatarstring | null#

URL to the customer's avatar image.

externalIdstring#

Your external customer ID, if provided when tracking.

stripeCustomerIdstring | null#

The customer's Stripe customer ID, if linked.

salesnumber | null#

Total number of sales for the customer.

saleAmountnumber | null#

Total sale amount for the customer in cents.

createdAtstring#

ISO 8601 timestamp when the customer was first seen.

firstSaleAtstring | null#

ISO 8601 timestamp of the customer's first sale.

subscriptionCanceledAtstring | null#

ISO 8601 timestamp when the customer canceled their subscription, if applicable.

clickobject#

The click event that led to the sale.

Show click object
idstring#

Unique identifier for the click.

timestampstring#

ISO 8601 timestamp when the click occurred.

urlstring#

The destination URL that was visited.

countrystring#

Country code (e.g. US).

citystring#

City name.

regionstring#

Region or region code.

continentstring#

Continent code (e.g. NA).

devicestring#

Device type (e.g. Desktop, Mobile).

browserstring#

Browser name (e.g. Chrome).

osstring#

Operating system (e.g. Mac OS).

uastring#

User agent string.

refererstring#

Referrer hostname or (direct).

refererUrlstring#

Full referrer URL or (direct).

qrboolean#

Whether the click came from a QR code scan.

ipstring#

IP address of the visitor.

partnerobject | null#

Partner details. Only present when the link is a partner referral link.

saleobject#

Details about the recorded sale.

Show sale object
amountnumber#

Sale amount in cents.

currencystring#

Currency code (e.g. usd).

paymentProcessorstring#

Payment processor used (e.g. stripe).

invoiceIdstring | null#

External invoice ID, if any.

metadataobject | null#

Optional metadata associated with the sale event.