Skip to main content

subscription.status_changed

Disparado sempre que o status de uma assinatura muda (active, trialing, past_due, paused, canceled).

Grupo: Faturamento

Payload

{
"id": "evt_01HXYZABC123",
"type": "subscription.status_changed",
"created_at": "2026-05-20T12:00:00.000Z",
"environment": "production",
"version": "2026-03-01",
"data": {
"id": "sub_01HABCDEF",
"public_id": "sub_8f3d2a1b",
"organization_id": "org_01HORG",
"billing_account_id": "ba_01HXY123",
"company_id": "cmp_01HZZ987",
"plan_id": "plan_01HPRO",
"status": "active",
"billing_cycle": "monthly",
"billing_cycle_anchor": "2026-05-01T00:00:00.000Z",
"current_period_start": "2026-05-01T00:00:00.000Z",
"current_period_end": "2026-06-01T00:00:00.000Z",
"trial_start": null,
"trial_end": null,
"activated_at": "2026-04-01T12:00:00.000Z",
"cancel_at_period_end": false,
"canceled_at": null,
"cancellation_reason": null,
"recurring_amount_cents": 9900,
"collection_method": "charge_automatically",
"proration_behavior": "create_prorations",
"metadata": {},
"created_at": "2026-04-01T12:00:00.000Z",
"updated_at": "2026-05-20T12:00:00.000Z",
"items": [
{
"id": "sitem_01HSITEM",
"subscription_id": "sub_01HABCDEF",
"product_id": "prod_01HPROD",
"price_id": "price_01HPRC",
"quantity": 1,
"unit_amount_subcents": 990000,
"metadata": {},
"created_at": "2026-04-01T12:00:00.000Z",
"updated_at": "2026-04-01T12:00:00.000Z"
}
]
},
"changes": {
"status": {
"from": "past_due",
"to": "active"
}
}
}