Skip to main content
Events are notifications that inform you when something significant happens in your Fungies account. When an event occurs - such as a successful Payment or Subscription cancellation - we create an Event object and send it to your configured webhook endpoints. You can use events to trigger workflows in your application, such as fulfilling Orders, sending custom emails, or syncing data with your backend systems.

Event delivery

Events are delivered to your webhook endpoints via HTTP POST requests. Each event includes:
  • A unique id for deduplication
  • An idempotencyKey to prevent duplicate processing
  • The event type indicating what happened
  • A data payload with relevant objects
Events may be delivered more than once. Use the idempotencyKey to ensure you process each event only once.

Event types

These are the event types currently supported. We may add more at any time, so your code should handle unknown event types gracefully.

Subscription signup events

On the first subscription checkout, Fungies sends both events when your webhook is subscribed to both types. They are produced by different Stripe notifications and may arrive seconds apart or out of order.
  • subscription_created — subscription object created; data.lastPayment and data.order may still be PENDING.
  • payment_success — initial subscription_initial payment is PAID; safe to fulfill.
Treat subscription_created as informational (lifecycle, CRM, analytics). Treat payment_success as the fulfillment trigger for the first charge.

The Event object

string
required
Unique identifier (UUID) for this event.
string
required
The type of event that occurred. See Event types above.
string
required
Unique key (UUID) for idempotent event processing. Use this to prevent duplicate handling of the same event.
boolean
required
Whether this event occurred in test mode (true) or live mode (false).
object
required
The event payload containing related objects.

Item object

Each item in the data.items array represents a line item in the Order.
string
Object type identifier. Always "item".
string
required
Unique identifier (UUID) for this line item.
string
required
Display name of the item.
integer
required
Item price in the smallest currency unit. Defaults to 0.
integer
required
Number of units purchased.
string
required
Three-letter ISO 4217 currency code.
Product
The Product object this item belongs to.
object | null
The Variant object if applicable.
Offer | null
The Offer object if this item was purchased through an offer.
object | null
The subscription Plan object (variants are used as plans for Subscriptions).
string | null
Your custom identifier for this item.
object
Key-value pairs of custom fields defined by you and filled by the customer during checkout. Only keys that exactly match a field’s Key (configured in the Dashboard) are included — an unmatched or undefined key is silently omitted rather than sent as an empty value.

Example event payload


Webhooks Setup

Configure webhook endpoints

Webhooks Overview

Learn about webhooks

Orders

Order object reference

Payments

Payment object reference