Developer docs

Every webhook event, its fields and the scope it needs

Dispense Flow developers

In short

There are 22 event types. Each needs one scope: orders and disputes need read_orders, subscriptions and memberships read_subscriptions, customers and contact messages read_customers, campaigns read_marketing, and visits the PHI scope read_visits. This page is generated from the API's own catalog.

Orders events

order.created Order created

An order exists. Follows the customer paying at checkout or the visit's charge. Needs read_orders.

FieldTypeWhat it is
orderIdstringThe order's id.
orderNumberstringThe order number customers see, e.g. ORD-20261104-C35FFE05.
customerIdstring | nullThe customer's id, when the order has an account behind it.
totalCentsnumberWhat was charged now, in cents.
subtotalCentsnumberBefore discounts, in cents.
discountCentsnumberDiscounts applied, in cents.
currencystringISO code, usd.
source"cart" | "consultation"A cart checkout or a visit.
fulfilment"ship" | "pickup" | undefinedOn a visit's order: shipped, or collected from a pharmacy.
pickupPharmacyNamestring | null | undefinedThe pharmacy the customer collects from, on a pickup order. Its address and phone are on the order.

order.paid Order paid

Payment captured for the order. Needs read_orders.

FieldTypeWhat it is
orderIdstringThe order's id.
orderNumberstringThe order number customers see, e.g. ORD-20261104-C35FFE05.
customerIdstring | nullThe customer's id, when the order has an account behind it.
amountCentsnumberCaptured, in cents.
currencystringISO code, usd.

order.refunded Order refunded

A full or partial refund was issued from the dashboard. Needs read_orders.

FieldTypeWhat it is
orderIdstringThe order's id.
orderNumberstringThe order number customers see, e.g. ORD-20261104-C35FFE05.
customerIdstring | nullThe customer's id, when the order has an account behind it.
amountCentsnumberRefunded in this action, in cents.
currencystringISO code, usd.
reasonstring | nullThe reason entered, if any.

order.shipped Order shipped

The order left: the pharmacy shipped it, the merchant marked it fulfilled, or a dropship supplier shipped it. Needs read_orders.

FieldTypeWhat it is
orderIdstringThe order's id.
trackingNumberstring | nullCarrier tracking number, when known.
carrierstring | nullCarrier name, when known.
source"beluga" | "pharmacy_approved" | "fulfilled_offline"Which path shipped it.

order.cancelled Order canceled

The merchant canceled the order. Needs read_orders.

FieldTypeWhat it is
orderIdstringThe order's id.
orderNumberstringThe order number customers see, e.g. ORD-20261104-C35FFE05.
customerIdstring | nullThe customer's id, when the order has an account behind it.
reasonstring | nullThe reason entered, if any.
fromStatusstringThe status it was in before canceling.

Subscriptions events

subscription.created Subscription created

A product subscription started, after the provider approved the visit. Needs read_subscriptions.

FieldTypeWhat it is
subscriptionIdstringThe product subscription's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
productIdstring | nullThe anchor product.
bundleIdstring | nullThe bundle, when the subscription is for one.
flowSessionIdstringThe visit's id.

subscription.renewed Subscription renewed

A renewal was charged. Needs read_subscriptions.

FieldTypeWhat it is
subscriptionIdstringThe product subscription's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
productIdstring | nullThe product renewed.
amountCentsnumberCharged, in cents.
chargeCountnumberHow many charges so far, this one included.

subscription.paused Subscription paused

The customer paused from their account. Needs read_subscriptions.

FieldTypeWhat it is
subscriptionIdstringThe product subscription's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
resumeAtstring | nullWhen it resumes on its own, ISO date, if set.
by"customer"Who paused it.

subscription.resumed Subscription resumed

The customer resumed from their account. Needs read_subscriptions.

FieldTypeWhat it is
subscriptionIdstringThe product subscription's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
by"customer"Who resumed it.

subscription.cancelled Subscription canceled

The customer canceled from their account. Needs read_subscriptions.

FieldTypeWhat it is
subscriptionIdstringThe product subscription's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
reasonstring | nullThe reason they picked, if any.
by"customer"Who canceled it.

subscription.payment_failed Subscription payment failed

A renewal charge failed. Needs read_subscriptions.

FieldTypeWhat it is
subscriptionIdstringThe product subscription's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
reasonstringThe processor's reason.
consecutiveFailuresnumberFailures in a row, this one included.
decisionstringWhat happens next: retry, pause or cancel.

Customers events

customer.created Customer created

A customer account was created on the storefront. Needs read_customers.

FieldTypeWhat it is
customerIdstringThe customer's id.
emailstringThe address they signed up with.

Visits events

flow_session.submitted Visit submitted

The customer finished the intake. The visit goes to the provider, or to your review first when the product asks for it. Needs read_visits (health information).

FieldTypeWhat it is
flowSessionIdstringThe visit's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
productIdstring | nullThe product the visit is for.
bundleIdstring | nullThe bundle, when the visit is for one.
orderIdstring | nullThe order, when one exists already.
status"INTAKE_SUBMITTED" | "MERCHANT_REVIEW_INTAKE"Where it went.
source"storefront"Where it came from.

flow_session.approved Visit approved

The provider approved the visit. Needs read_visits (health information).

FieldTypeWhat it is
flowSessionIdstringThe visit's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
orderIdstring | nullThe order the visit belongs to.
productIdstring | nullThe product.
bundleIdstring | nullThe bundle, if any.
source"beluga"Which provider network decided.

flow_session.declined Visit declined

The provider declined the visit. Needs read_visits (health information).

FieldTypeWhat it is
flowSessionIdstringThe visit's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
orderIdstring | nullThe order the visit belongs to.
productIdstring | nullThe product.
bundleIdstring | nullThe bundle, if any.
source"beluga"Which provider network decided.

Disputes events

dispute.opened Dispute opened

A customer opened a dispute from their account, or the card issuer opened a chargeback. The customer's own words are never included. Needs read_orders.

FieldTypeWhat it is
orderIdstringThe order's id.
orderNumberstring | undefinedPresent when the customer opened it.
customerIdstring | nullThe customer's id, when the order has an account behind it.
reasonstring | nullThe reason category.
disputedAmountCentsnumber | nullThe amount in question, in cents.
evidenceDueAtstring | null | undefinedFor a chargeback, when the evidence is due, ISO date.
source"customer" | "stripe_chargeback"Who opened it.

Campaigns events

campaign.sent Campaign sent

An email campaign started sending. Needs read_marketing.

FieldTypeWhat it is
campaignIdstringThe campaign's id.
namestringIts name.
recipientCountnumberHow many people it goes to.
stepsnumberEmails per person, the first plus every drip step.

Contact messages events

contact.received Contact message received

Someone used the store's contact form. Needs read_customers.

FieldTypeWhat it is
contactMessageIdstringThe message's id.
namestringThe sender's name.
emailstringThe sender's address.
topicstring | nullThe topic they picked, if any.

Memberships events

program.started Membership started

A customer joined a membership program. Needs read_subscriptions.

FieldTypeWhat it is
programSubscriptionIdstringThe membership subscription's id.
programIdstringThe membership program's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
feeCentsnumberThe monthly fee, in cents.
flowSessionIdstring | nullThe visit it started from, or null when joined on its own.

program.renewed Membership renewed

A membership month was charged. Needs read_subscriptions.

FieldTypeWhat it is
programSubscriptionIdstringThe membership subscription's id.
programIdstringThe membership program's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
amountCentsnumberCharged, in cents.
orderIdstringThe order the charge created.

program.payment_failed Membership payment failed

A membership charge failed and will be retried. Needs read_subscriptions.

FieldTypeWhat it is
programSubscriptionIdstringThe membership subscription's id.
programIdstringThe membership program's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
reasonstringThe processor's reason.

program.cancelled Membership canceled

The membership ended: canceled, or the period ran out after failed payments. Needs read_subscriptions.

FieldTypeWhat it is
programSubscriptionIdstringThe membership subscription's id.
programIdstringThe membership program's id.
customerIdstring | nullThe customer's id, when the order has an account behind it.
reasonstringWhy it ended, e.g. period_ended.

Questions

Can I receive every event?

An app subscribes to the events it needs and requests the scopes that cover them. A store grants the scopes at install; a PHI scope also needs our approval.