Skip to main content

Overview

The subscription.cancelled webhook is triggered when a subscription is cancelled in your Metrifox account. This event is sent when a subscription is immediately cancelled (not scheduled for future cancellation).

When It’s Triggered

This event is sent immediately after a subscription is successfully cancelled, which can happen when:
  • A customer cancels their subscription immediately
  • A subscription is cancelled through the API
  • A subscription is cancelled manually in the dashboard
  • A subscription is cancelled due to payment failure or other reasons
For subscriptions scheduled to cancel at the end of the billing period, see the subscription.cancel_scheduled event instead.

Payload Structure

Data Fields

The data.subscription object contains the subscription record with cancellation details:
  • id: Internal subscription ID
  • customer_id: ID of the customer who owns the subscription
  • customer_key: Your external customer identifier
  • tenant_id: The tenant ID this subscription belongs to
  • order_id: Order ID that created the subscription
  • plan_id: ID of the plan associated with this subscription
  • status: Subscription status
  • currency_code: Currency code (e.g., “USD”, “NGN”)
  • subscription_number: Subscription number
  • starts_at: Subscription start timestamp
  • ends_at: Subscription end timestamp (if scheduled to end)
  • renews_at: Next renewal timestamp
  • paused_at: Pause timestamp (if paused)
  • cancelled_at: Cancellation timestamp (if cancelled)
  • metadata: Custom metadata object
  • created_at: Timestamp when the subscription was created
  • updated_at: Timestamp when the subscription was last updated
  • price_option_id: Price option ID
  • trial_end_date: Trial end timestamp (if applicable)
  • converted_at: Conversion timestamp (if converted)
  • billing_interval: Billing interval (e.g., “month”)
  • billing_interval_value: Billing interval value
  • renew_date_anchor: Renewal day of month anchor

Example Use Cases

  • Deactivate features in your application for the customer
  • Send cancellation confirmation emails
  • Update user access levels
  • Trigger retention workflows
  • Update analytics and reporting
  • Sync cancellation data to your CRM