Skip to main content

Documentation

Subscription Canceled Webhook

The CUSTOMER_SUBSCRIPTION_CANCELED webhook is sent when a subscription is canceled.

  • CUSTOMER_SUBSCRIPTION_CANCELED Webhook

  • {
        "id": "wh_c83f08b52d072cd6168a081cf7c1d612",
        "type": "CUSTOMER_SUBSCRIPTION_CANCELED",
        "data": {
            "id": "sub_005ca057b15771a535469a60ccce98a2",
            "type": "payment",
            "status": "canceled",
            "billing": "pay_automatically",
            "discount": null,
            "ended_at": null,
            "metadata": {},
            "trial_end": null,
            "created_at": 1641802550,
            "canceled_at": 1642032359,
            "tax_percent": 0,
            "trial_start": null,
            "payout_fields": null,
            "customer_token": "cus_d3ed65d5091a8398cc3651bcedec1201",
            "days_until_due": null,
            "payment_fields": null,
            "payment_method": "card_85264b18bc1bfb949dbb2d88d3d5c12c",
            "current_period_end": 1642032359,
            "subscription_items": {
                "url": "/v1/subscription_items?subscription=sub_005ca057b15771a535469a60ccce98a2",
                "data": [{
                        "id": "subi_139cc833a43aa340ee25ca59a4a34ea6",
                        "plan": {
                            "id": "plan_a2b5060d3e93d4c32883ac2b39c3f2de",
                            "tiers": [],
                            "amount": 1050,
                            "product": {
                                "id": "product_2ddd6f6b43f598d30543ef23ab806b58",
                                "name": "Acme music stream",
                                "skus": [],
                                "type": "services",
                                "active": true,
                                "images": [],
                                "metadata": {},
                                "shippable": false,
                                "attributes": [],
                                "created_at": 1641481860,
                                "unit_label": "",
                                "updated_at": 1641481860,
                                "description": "",
                                "package_dimensions": {
                                    "width": 0,
                                    "height": 0,
                                    "length": 0,
                                    "weight": 0
                                },
                                "statement_descriptor": ""
                            },
                            "currency": "USD",
                            "interval": "day",
                            "metadata": {},
                            "nickname": "Plan 1050",
                            "created_at": 1641802015,
                            "tiers_mode": "",
                            "usage_type": "licensed",
                            "billing_scheme": "per_unit",
                            "interval_count": 1,
                            "aggregate_usage": "sum",
                            "transform_usage": {
                                "round": "up",
                                "divide_by": 1
                            },
                            "trial_period_days": 0
                        },
                        "created": 1641802550,
                        "metadata": null,
                        "quantity": 1
                    }
                ],
                "has_more": false,
                "total_count": 0
            },
            "billing_cycle_anchor": 1641802550,
            "cancel_at_period_end": true,
            "current_period_start": 1641975350
        },
        "trigger_operation_id": "b55a493d-ae8a-4eb8-93a3-2624145a58ef",
        "status": "NEW",
        "created_at": 1642032362,
        "extended_timestamp": 1642032362666,
    }