Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pedro-vasconcelos/7513682e078c251c8070cf7af1a62e43 to your computer and use it in GitHub Desktop.

Select an option

Save pedro-vasconcelos/7513682e078c251c8070cf7af1a62e43 to your computer and use it in GitHub Desktop.
stripe_event: customer.subscription.deleted
{
"id": "evt_1KljliLueXt1u2tdSuQdM3qb",
"object": "event",
"api_version": "2020-08-27",
"created": 1649293454,
"data": {
"object": {
"id": "sub_1KljSYLueXt1u2tdEQEreQ5V",
"object": "subscription",
"application_fee_percent": null,
"automatic_tax": {
"enabled": true
},
"billing_cycle_anchor": 1580688000,
"billing_thresholds": null,
"cancel_at": 1585872000,
"cancel_at_period_end": true,
"canceled_at": 1583366400,
"collection_method": "charge_automatically",
"created": 1580688000,
"current_period_end": 1585872000,
"current_period_start": 1583193600,
"customer": "cus_LSelmlkKQAXfey",
"days_until_due": null,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [],
"discount": null,
"ended_at": 1585872000,
"items": {
"object": "list",
"data": [
{
"id": "si_LSemYJh2TadwA6",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1580688000,
"metadata": [],
"plan": {
"id": "price_1KlLdQLueXt1u2tdGUWqIXUf",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": null,
"amount_decimal": null,
"billing_scheme": "tiered",
"created": 1649200684,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": [],
"nickname": "Monthly Plan",
"product": "prod_LSG9r7UIDjZUdp",
"tiers_mode": "volume",
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1KlLdQLueXt1u2tdGUWqIXUf",
"object": "price",
"active": true,
"billing_scheme": "tiered",
"created": 1649200684,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": [],
"nickname": "Monthly Plan",
"product": "prod_LSG9r7UIDjZUdp",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "exclusive",
"tiers_mode": "volume",
"transform_quantity": null,
"type": "recurring",
"unit_amount": null,
"unit_amount_decimal": null
},
"quantity": 1,
"subscription": "sub_1KljSYLueXt1u2tdEQEreQ5V",
"tax_rates": []
},
{
"id": "si_LSemm7vQuoHwtU",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1580688000,
"metadata": [],
"plan": {
"id": "price_1KlLdNLueXt1u2td1d5EZ9nI",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 500,
"amount_decimal": "500",
"billing_scheme": "per_unit",
"created": 1649200681,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": [],
"nickname": "Pro Feature Plan",
"product": "prod_LSG9xgKks2ustM",
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "price_1KlLdNLueXt1u2td1d5EZ9nI",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1649200681,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": [],
"nickname": "Pro Feature Plan",
"product": "prod_LSG9xgKks2ustM",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "exclusive",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 500,
"unit_amount_decimal": "500"
},
"quantity": 1,
"subscription": "sub_1KljSYLueXt1u2tdEQEreQ5V",
"tax_rates": []
}
],
"has_more": false,
"total_count": 2,
"url": "/v1/subscription_items?subscription=sub_1KljSYLueXt1u2tdEQEreQ5V"
},
"latest_invoice": "in_1KljU1LueXt1u2tdtymyAbiX",
"livemode": false,
"metadata": [],
"next_pending_invoice_item_invoice": null,
"pause_collection": null,
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null
},
"pending_invoice_item_interval": null,
"pending_setup_intent": null,
"pending_update": null,
"plan": null,
"quantity": null,
"schedule": null,
"start_date": 1580688000,
"status": "canceled",
"test_clock": "clock_1KljLyLueXt1u2td7Aq9Yp7c",
"transfer_data": null,
"trial_end": null,
"trial_start": null
}
},
"livemode": false,
"pending_webhooks": 2,
"request": {
"id": null,
"idempotency_key": null
},
"type": "customer.subscription.deleted"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment