FlowEvents
Subscription events
What data you get for subscription.created, .updated, .resumed, .paused, .canceled, and .trial_will_end.
Fires as a subscription's status changes — created, renewed, resumed, paused, canceled, or nearing the end of its trial.
Each event arrives as an event object.
The examples on this page show its data.object.
Prop
Type
{
"id": "sub_01J9ABCDEFGHJKMNPQRSTV",
"object": "subscription",
"customer_id": "cus_01J8XYZABCDEFGHJKMNPQR",
"line_items": [
{
"product_id": "prod_01J8XYZABCDEFGHJKMNPQR",
"product_name": "Pro plan",
"unit_amount": 150000,
"quantity": 1,
"amount_total": 150000,
"currency": "thb"
}
],
"total": 150000,
"currency": "thb",
"status": "active",
"collection_method": "charge_automatically",
"current_period_start": 1784937600,
"current_period_end": 1787616000,
"trial_end": null,
"cancel_at_period_end": false,
"canceled_at": null,
"metadata": { "order_id": "SO-2026-0042" }
}All six events share this shape — only status and the matching timestamps change.
Status changes
- New subscriptions. A subscription Paycose bills itself with
charge_automaticallystarts asincompleteand becomesactivewhen its first invoice is paid, or at once when that invoice has nothing to collect. One with a trial starts astrialing. One withsend_invoicestarts asactive, unless you create it withpayment_behavior=default_incomplete. - Failed renewals. When a payment fails, an
activeortrialingsubscription moves topast_due. - Retries run out. The country's dunning setting decides what happens to a
past_duesubscription: canceled by default, as on Stripe (subscription.canceled, reasonpayment_failed), orunpaid, or leftpast_due. Only apast_duesubscription becomesunpaid; paying the open invoice brings it back toactive.
There's no separate "trialing" or "past_due" event — a subscription entering one of
those states is reported as subscription.updated, with data.object.status showing the
actual value. subscription.trial_will_end fires once, ahead of trial_end, as a
reminder — it doesn't change status.