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_j57FNIOO8sBwuMrlfHQeYXeo",
  "created": 1676976736,
  "triggered_from": "open_api",
  "data": {
    "object": {
      "object": "subscription",
      "id": 2895998,
      "address_id": 8154222,
      "campaign_id": null,
      "campaign_key":null,
      "address_shipping": null,
       "metadata" : [
         "metadata-example1",
         "metadata-example2",
      ],
      "agency_id": null,
      "auto_renew": false,
      "backdate_start_date": null,
      "billing": "charge_automatically",
      "billing_cycle_anchor": "2023-02-13T19:47:23.000000Z",
      "campaign_id": 5374,
      "campaign_key": "InstantPromo",
      "cancel_at": null,
      "cancel_at_period_end": 0,
      "cancel_reason": "Customer Deleted",
      "canceled_at": "2023-02-13T19:47:45.000000Z",
      "canceled_by_email": null,
      "canceled_by_type": "System",
      "coupon": null,
      "created": "2023-02-13T19:47:23.000000Z",
      "current_period_end": "2023-03-13T19:47:23.000000Z",
      "current_period_start": "2023-02-13T19:47:23.000000Z",
      "customer": {
        "object": "customer",
        "id": 8189146,
        "balance": 0,
        "created": "2023-02-13T19:44:52.000000Z",
        "currency": "usd",
        "default_source": null,
        "delinquent": false,
        "display_name": null,
        "email": null,
        "email_confirm": null,
        "email_hardbounce": false,
        "first_name": "a",
        "has_password": 0,
        "language": null,
        "last_login_method": null,
        "last_name": "a",
        "metadata": null,
        "object_id": "cus_NLpcWBXM75Doyx",
        "organization": null,
        "password_last_updated_at": null,
        "phone": null,
        "phone_confirm": null,
        "salutation": null,
        "site_ids": [
          699
        ],
        "title": null,
        "username": null
      },
      "days_until_due": null,
      "default_source": null,
      "default_tax_rates": null,
      "ended_at": "2023-02-21T10:52:00.000000Z",
      "expires_at": 1676976720,
      "gift_code": null,
      "gift_donor_subscription_id": null,
      "gift_message": null,
      "gift_notification_sent": 0,
      "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": 2895205,
        "address_billing": null,
        "address_shipping": null,
        "amount_due": 10000,
        "amount_paid": 10000,
        "amount_remaining": 0,
        "auto_advance": false,
        "billing": "charge_automatically",
        "billing_address": null,
        "billing_reason": "subscription_create",
        "charge": {
          "id": 1688621,
          "offline": false,
          "payment_category": "Card",
          "reference": null
        },
        "charge_id": 1688621,
        "created": "2023-02-13T19:47:23.000000Z",
        "currency": "usd",
        "customer": {
          "object": "customer",
          "id": 8189146,
          "balance": 0,
          "created": "2023-02-13T19:44:52.000000Z",
          "currency": "usd",
          "default_source": null,
          "delinquent": false,
          "display_name": null,
          "email": null,
          "email_confirm": null,
          "email_hardbounce": false,
          "first_name": "a",
          "has_password": 0,
          "language": null,
          "last_login_method": null,
          "last_name": "a",
          "metadata": null,
          "object_id": "cus_NLpcWBXM75Doyx",
          "organization": null,
          "password_last_updated_at": null,
          "phone": null,
          "phone_confirm": null,
          "salutation": null,
          "site_ids": [
            699
          ],
          "title": null,
          "username": null
        },
        "customer_address": {
          "city": "sadas",
          "country": "AE",
          "line1": "aa",
          "line2": null,
          "postal_code": "213123",
          "state": "AJ"
        },
        "customer_shipping": null,
        "days_to_creation": null,
        "default_tax_rates": null,
        "deleted_at": null,
        "discount_id": null,
        "ending_balance": 0,
        "finalized_at": "2023-02-13T19:47:23.000000Z",
        "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1JeNdIAQMlpW1iAw/test_YWNjdF8xSmVOZElBUU1scFcxaUF3LF9OTHBmckhzQ09XWThpNTJoQ2p1YW9QTjJ6elBRc3FXLDY2OTQ0NTA30200i8U5gori?s=ap",
        "invoice_pdf": "https://staging.pelcro.com/pdf/invoice/eyJpdiI6IkVPL0hEYkgzbVREL3dSTHpRRlFHQ0E9PSIsInZhbHVlIjoiVXhTVWo5SXoyaWRIWVM2Q1JjaGJQdGlEYmdNbFpneExqZW02MGQrL0RNZz0iLCJtYWMiOiJhZjQ5YjRlN2M5NjVkZTQxZmQ0OGNkMTJmOWE5NmQ2NjAzZDQ2OTQzNGVjMTE1NDk2NDQ3ZWE1Mzg1YWMyZGZkIiwidGFnIjoiIn0=",
        "is_imported": null,
        "lines": {
          "object": "list",
          "data": [
            {
              "object": "line_item",
              "id": 3356760,
              "amount": 10000,
              "created_at": "2023-02-13T19:47:27.000000Z",
              "currency": "usd",
              "deleted_at": null,
              "description": "1 × Gadgets (at $100.00 / month)",
              "metadata": null,
              "object_id": "il_1Mb7zjAQMlpW1iAwl9SSfB9e",
              "period": {
                "end": 1678736843,
                "start": 1676317643
              },
              "quantity": 1,
              "tax_amounts": null,
              "tax_rates": null,
              "updated_at": "2023-02-13T19:47:27.000000Z"
            }
          ]
        },
        "marked_uncollectible_at": null,
        "number": "D63A0257-0001",
        "object_id": "in_1Mb7zjAQMlpW1iAw1Asgzg9w",
        "paid_at": "2023-02-13T19:47:23.000000Z",
        "period_end": "2023-02-13T19:47:23.000000Z",
        "period_start": "2023-02-13T19:47:23.000000Z",
        "plan": {
          "id": 374876,
          "nickname": "Monthly",
          "interval": "month"
        },
        "post_payment_credit_notes_amount": 0,
        "pre_payment_credit_notes_amount": 0,
        "product": {
          "id": 4867,
          "name": "Gadgets",
          "name_internal": null
        },
        "purchase_order": null,
        "site_id": 699,
        "source": null,
        "starting_balance": 0,
        "status": "paid",
        "subscription": {
          "object": "subscription",
          "id": 2895998,
          "billing": "charge_automatically",
          "cancel_at_period_end": 0,
          "canceled_at": "2023-02-13T19:47:45.000000Z",
          "created": "2023-02-13T19:47:23.000000Z",
          "current_period_start": "2023-02-13T19:47:23.000000Z",
          "current_period_end": "2023-03-13T19:47:23.000000Z",
          "schedules": null,
          "plan": {
            "id": 374876,
            "product_id": 4867,
            "parent_plan_id": null,
            "object_id": "plan_N6R4t1L6GPW6dp",
            "active": "active",
            "type": "regular",
            "amount": 10000,
            "recognized_revenue_type": "time",
            "renewal_strategy": null,
            "auto_renew": true,
            "available_online": true,
            "allow_send_invoice": false,
            "auto_uncollectible_days": null,
            "invoice_upcoming_notification": null,
            "currency": "usd",
            "countries": null,
            "entitlements": null,
            "interval": "month",
            "interval_count": 1,
            "is_imported": false,
            "is_hidden": false,
            "is_donation": false,
            "metadata": null,
            "member_seat_capacity": null,
            "nickname": "Monthly",
            "name_internal": null,
            "refundable": true,
            "shipments_per_interval": null,
            "description": null,
            "trial_period_days": 1,
            "ip_addresses": null,
            "domains": null,
            "created_at": "2023-01-03T17:22:55.000000Z",
            "updated_at": "2023-02-20T12:33:20.000000Z",
            "site_ids": [
              699
            ],
            "product": {
              "id": 4867,
              "object_id": "prod_MzIuBxwrF3pM6U",
              "type": "service",
              "active": "active",
              "address_required": true,
              "countries": null,
              "description": null,
              "entitlements": null,
              "is_imported": null,
              "is_hidden": null,
              "language": "en_US",
              "livemode": false,
              "metadata": null,
              "name": "Gadgets",
              "name_internal": null,
              "shippable": null,
              "statement_descriptor": null,
              "created_at": "2022-12-15T16:28:55.000000Z",
              "updated_at": "2023-01-25T14:48:38.000000Z",
              "site_ids": [
                699
              ]
            }
          }
        },
        "subscription_id": 2895998,
        "subtotal": 10000,
        "tax": null,
        "tax_percent": null,
        "total": 10000,
        "total_tax_amounts": null,
        "updated_at": "2023-02-14T19:41:47.000000Z",
        "voided_at": null
      },
      "object_id": "sub_1Mb7zjAQMlpW1iAwbfh8gBDH",
      "plan": {
        "id": 374876,
        "product_id": 4867,
        "parent_plan_id": null,
        "object_id": "plan_N6R4t1L6GPW6dp",
        "active": "active",
        "type": "regular",
        "amount": 10000,
        "recognized_revenue_type": "time",
        "renewal_strategy": null,
        "auto_renew": true,
        "available_online": true,
        "allow_send_invoice": false,
        "auto_uncollectible_days": null,
        "invoice_upcoming_notification": null,
        "currency": "usd",
        "countries": null,
        "entitlements": null,
        "interval": "month",
        "interval_count": 1,
        "is_imported": false,
        "is_hidden": false,
        "is_donation": false,
        "metadata": null,
        "member_seat_capacity": null,
        "nickname": "Monthly",
        "name_internal": null,
        "refundable": true,
        "shipments_per_interval": null,
        "description": null,
        "trial_period_days": 1,
        "ip_addresses": null,
        "domains": null,
        "created_at": "2023-01-03T17:22:55.000000Z",
        "updated_at": "2023-02-20T12:33:20.000000Z",
        "site_ids": [
          699
        ],
        "product": {
          "id": 4867,
          "object_id": "prod_MzIuBxwrF3pM6U",
          "type": "service",
          "active": "active",
          "address_required": true,
          "countries": null,
          "description": null,
          "entitlements": null,
          "is_imported": null,
          "is_hidden": null,
          "language": "en_US",
          "livemode": false,
          "metadata": null,
          "name": "Gadgets",
          "name_internal": null,
          "shippable": null,
          "statement_descriptor": null,
          "created_at": "2022-12-15T16:28:55.000000Z",
          "updated_at": "2023-01-25T14:48:38.000000Z",
          "site_ids": [
            699
          ]
        }
      },
      "quantity": 1,
      "renews_at": null,
      "schedules": null,
      "shipments_remaining": null,
      "shipments_suspended_until": null,
      "shipments_undeliverable": false,
      "shipping_address": null,
      "site_id": 699,
      "source": "Email",
      "start_date": "2023-02-13T19:47:23.000000Z",
      "status": "canceled",
      "trial_end": null,
      "trial_start": null
    }
  }
}