Skip to main content
Dub

sale.created

2 min read

Event triggered when a new sale is tracked via your referral link.

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. Subscription).

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#

Destination URL of the click.

countrystring#

Country code.

citystring#

City name.

regionstring#

Region or datacenter identifier.

continentstring#

Continent code.

devicestring#

Device type (e.g. Desktop).

browserstring#

Browser name.

osstring#

Operating system.

refererstring#

Referrer source.

refererUrlstring#

Referrer URL.

qrboolean#

Whether the click came from a QR code.

ipstring#

IP address of the click.

customerobject#

The customer that made the purchase.

Show customer object
idstring#

Unique identifier for the customer.

countrystring#

Country code.

createdAtstring#

ISO 8601 timestamp when the customer was first seen.

firstSaleAtstring | null#

ISO 8601 timestamp of the customer's first sale, if any.

subscriptionCanceledAtstring | null#

ISO 8601 timestamp when the subscription was canceled, if any.

saleobject#

Details about the recorded sale.

Show sale object
amountnumber#

Sale amount in cents.

currencystring#

Currency code (e.g. usd).