type EventObject = {
id: string; // uuid
data: {
items: {
object: "item"; // string literal
id: string; // uuid
name: string;
value: number; // integer value in the smallest currency unit, defaults to 0
quantity: number;
currency: string; // ISO 4217 currency code
product: ProductObject;
variant: VariantObject;
offer: OfferObject;
plan: VariantObject; // subscriptions product's plans are in fact variants
internalId: string | null;
customFields: Record<string, string>; // custom fields keys are defined by the store owner, values are filled by customer
}[];
order: OrderObject;
payment: PaymentObject;
customer: UserObject;
};
type: string; // one of "payment_success", "payment_refunded", "payment_failed", "subscription_created", "subscription_interval", "subscription_updated", "subscription_cancelled"
idempotencyKey: string; // uuid
testMode: boolean;
};