subscription.canceled

{
    "type": "subscription.canceled",
    "id": "evt_BFEJ6lAHDqD2uX8P2XJW31nE",
    "created": 1624543670,
    "data": {
        "object": {
            "object": "subscription",
            "id": 5,
            "address_id": null,
            "address_shipping": null,
            "agency_id": null,
            "backdate_start_date": null,
            "billing": "send_invoice",
            "billing_cycle_anchor": "2021-06-24 14:06:47",
            "cancel_at": "2022-06-24 14:06:47",
            "cancel_at_period_end": 1,
            "cancel_reason": null,
            "canceled_at": "2021-06-24 14:07:49",
            "coupon": null,
            "created": "2021-06-24 14:06:47",
            "current_period_end": "2022-06-24 14:06:47",
            "current_period_start": "2021-06-24 14:06:47",
            "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_name": "last name",
                "metadata": {
                    "pelcro_account_id": "1",
                    "pelcro_customer_id": "5"
                },
                "phone": "123456",
                "phone_confirm": null,
                "salutation": null,
                "title": null
            },
            "days_until_due": 30,
            "default_source": null,
            "default_tax_rates": null,
            "ended_at": null,
            "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": 5,
                "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 14:06:47",
                "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_name": "last name",
                    "metadata": {
                        "pelcro_account_id": "1",
                        "pelcro_customer_id": "5"
                    },
                    "phone": "123456",
                    "phone_confirm": null,
                    "salutation": null,
                    "title": null
                },
                "customer_address": {
                    "city": "city name",
                    "country": "CA",
                    "line1": "specific address",
                    "line2": null,
                    "postal_code": "12345",
                    "state": "QC"
                },
                "customer_shipping": null,
                "default_tax_rates": null,
                "deleted_at": null,
                "discount_id": null,
                "ending_balance": 0,
                "finalized_at": "2021-06-24 14:06:48",
                "is_imported": null,
                "lines": {
                    "object": "list",
                    "data": [
                        {
                            "object": "line_item",
                            "id": 5,
                            "amount": 10000,
                            "created_at": "2021-06-24 14:06:50",
                            "currency": "cad",
                            "deleted_at": null,
                            "description": "1 × Cool product (at $100.00 / year)",
                            "metadata": {
                                "pelcro_site_id": "1",
                                "pelcro_subscription_id": "5"
                            },
                            "period": {
                                "end": 1656079607,
                                "start": 1624543607
                            },
                            "quantity": 1,
                            "tax_amounts": null,
                            "tax_rates": null,
                            "updated_at": "2021-06-24 14:06:50"
                        }
                    ]
                },
                "marked_uncollectible_at": null,
                "number": "4C6B728B-0003",
                "paid_at": null,
                "period_end": "2021-06-24 14:06:47",
                "period_start": "2021-06-24 14:06:47",
                "post_payment_credit_notes_amount": 0,
                "pre_payment_credit_notes_amount": 0,
                "purchase_order": null,
                "source": null,
                "starting_balance": 0,
                "status": "open",
                "subtotal": 10000,
                "tax": null,
                "tax_percent": null,
                "total": 10000,
                "total_tax_amounts": null,
                "updated_at": "2021-06-24 14:06:58",
                "voided_at": null
            },
            "plan": {
                "object": "plan",
                "id": 2,
                "active": "active",
                "amount": 10000,
                "currency": "cad",
                "entitlements": null,
                "interval": "year",
                "interval_count": 1,
                "nickname": "cool plan",
                "trial_period_days": 0,
                "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,
            "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 14:06:47",
            "status": "active",
            "trial_end": null,
            "trial_start": null
        }
    }
}