subscription.expired
The susbcription.expired
event is triggered whenever a customer's subscription ends. This event is controlled by the expiry date on the end-user's subscription in situations where the subscription organically expires or is cancelled by collaborators/end user.
{
"type": "subscription.expired",
"id": "evt_k2MhUL1aBsMd0CdrSEskGNNo",
"created": 1624543375,
"data": {
"object": {
"object": "subscription",
"id": 3,
"address_id": null,
"address_shipping": null,
"agency_id": null,
"auto_renew": false,
"backdate_start_date": null,
"billing": "send_invoice",
"billing_cycle_anchor": "2021-06-24 13:55:55",
"cancel_at": null,
"cancel_at_period_end": 0,
"cancel_reason": null,
"canceled_at": "2021-06-24 14:02:51",
"coupon": null,
"created": "2021-06-24 13:55:55",
"current_period_end": "2022-06-24 13:55:55",
"current_period_start": "2021-06-24 13:55:55",
"customer": {
"object": "customer",
"id": 5,
"balance": 0,
"created": "2021-06-24 13:53:25",
"currency": "cad",
"default_source": null,
"delinquent": false,
"display_name": "display_name",
"email": "[email protected]",
"email_confirm": null,
"first_name": "first name",
"has_password": 0,
"language": null,
"last_login_method": 'email',
"last_name": "last name",
"metadata": {
"pelcro_account_id": "1",
"pelcro_customer_id": "5"
},
"phone": "123456",
"phone_confirm": null,
"salutation": null,
"title": null,
"username": null
},
"days_until_due": 30,
"default_source": null,
"default_tax_rates": null,
"ended_at": "2021-06-24 14:02:51",
"expires_at": 1632153908,
"gift_code": null,
"gift_donor_subscription_id": null,
"gift_recipient_email": null,
"gift_recipient_first_name": null,
"gift_recipient_last_name": null,
"gift_start_date": null,
"is_gift_donor": null,
"is_gift_recipient": null,
"is_redeemed": null,
"latest_invoice": {
"object": "invoice",
"id": 3,
"address_billing": {
"object": "address",
"id": 2,
"city": "city name",
"company": null,
"country": "CA",
"country_name": "Canada",
"created_at": "2021-06-24 13:58:57",
"department": null,
"first_name": "first name",
"is_default": true,
"last_name": "last name",
"line1": "specific address",
"line2": null,
"postal_code": "12345",
"salutation": null,
"state": "QC",
"state_name": "Quebec",
"title": null,
"type": "billing",
"updated_at": "2021-06-24 13:58:57"
},
"address_shipping": null,
"amount_due": 10000,
"amount_paid": 0,
"amount_remaining": 10000,
"auto_advance": true,
"billing": "send_invoice",
"billing_address": {
"object": "address",
"id": 2,
"city": "city name",
"company": null,
"country": "CA",
"country_name": "Canada",
"created_at": "2021-06-24 13:58:57",
"department": null,
"first_name": "first name",
"is_default": true,
"last_name": "last name",
"line1": "specific address",
"line2": null,
"postal_code": "12345",
"salutation": null,
"state": "QC",
"state_name": "Quebec",
"title": null,
"type": "billing",
"updated_at": "2021-06-24 13:58:57"
},
"billing_reason": "subscription_create",
"charge_id": null,
"created": "2021-06-24 13:55:55",
"currency": "cad",
"customer": {
"object": "customer",
"id": 5,
"balance": 0,
"created": "2021-06-24 13:53:25",
"currency": "cad",
"default_source": null,
"delinquent": false,
"display_name": "display_name",
"email": "[email protected]",
"email_confirm": null,
"first_name": "first name",
"has_password": 0,
"language": null,
"last_login_method": 'email',
"last_name": "last name",
"metadata": {
"pelcro_account_id": "1",
"pelcro_customer_id": "5"
},
"phone": "123456",
"phone_confirm": null,
"salutation": null,
"title": null,
"username": null
},
"customer_address": null,
"customer_shipping": null,
"default_tax_rates": null,
"deleted_at": null,
"discount_id": null,
"ending_balance": 0,
"finalized_at": "2021-06-24 13:55:56",
"is_imported": null,
"lines": {
"object": "list",
"data": [
{
"object": "line_item",
"id": 3,
"amount": 10000,
"created_at": "2021-06-24 13:55:58",
"currency": "cad",
"deleted_at": null,
"description": "1 × Cool product (at $100.00 / year)",
"metadata": {
"pelcro_site_id": "1",
"pelcro_subscription_id": "3"
},
"period": {
"end": 1656078955,
"start": 1624542955
},
"quantity": 1,
"tax_amounts": null,
"tax_rates": null,
"updated_at": "2021-06-24 13:55:58"
}
]
},
"marked_uncollectible_at": null,
"number": "4C6B728B-0001",
"paid_at": null,
"period_end": "2021-06-24 13:55:55",
"period_start": "2021-06-24 13:55:55",
"post_payment_credit_notes_amount": 0,
"pre_payment_credit_notes_amount": 0,
"purchase_order": null,
"source": null,
"plan": {
"id": 1,
"nickname": "test",
"interval": "day"
},
"product": {
"id": 1,
"name": "test",
"name_internal": null
},
"subscription_id": 10,
"starting_balance": 0,
"status": "open",
"subtotal": 10000,
"tax": null,
"tax_percent": null,
"total": 10000,
"total_tax_amounts": null,
"updated_at": "2021-06-24 13:57:31",
"voided_at": null
},
"plan": {
"object": "plan",
"id": 2,
"active": "active",
"amount": 10000,
"currency": "cad",
"domains": null,
"domains": null,
"entitlements": null,
"group_owner_plan_id": null,
"interval": "year",
"interval_count": 1,
"nickname": "cool plan",
"name_internal": "cool plan",
"type": "regular",
"trial_period_days": 0,
"ip_addresses": null,
"product": {
"object": "product",
"id": 1,
"type": "service",
"active": "active",
"address_required": 0,
"description": "Cool product",
"livemode": false,
"is_hidden": null,
"name": "Cool product",
"package_dimensions": null,
"shippable": null,
"statement_descriptor": "Cool product",
"unit_label": null
}
},
"quantity": 1,
"renews_at": 1656066782,
"schedules": null,
"shipments_remaining": null,
"shipments_suspended_until": null,
"shipments_undeliverable": false,
"shipping_address": null,
"site_id": 1,
"source": "Phone",
"start_date": "2021-06-24 13:55:55",
"status": "canceled",
"trial_end": null,
"trial_start": null
}
}
}
Updated 12 days ago