Regoria API docs

subscription.cancelled

A subscription was canceled.

Sent as POST to each of your endpoints subscribed to subscription.cancelled. Verify X-Webhook-Signature before trusting the body; X-Webhook-Delivery is the same across retries of one event, so use it to deduplicate.

Headers

Header Value
X-Webhook-Signature t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" with the endpoint secret>. Recompute over the raw body, compare in constant time and reject when |now - t| is above 300 seconds.
X-Webhook-Event The event type, the same as type in the body.
X-Webhook-Delivery The event id (evt_…), stable across retries and replays of the same event.

Payload

The body is the delivery envelope: id, type (subscription.cancelled), version, occurred_at, merchant_id and data.

Field Type Required Description
data.subscription_id string yes
data.merchant_id string yes
data.buyer_id string or null no
data.buyer_email string yes
data.customer_id string or null no the customer's cus_ id; null when the row has no customer
data.customer_ref string or null no
data.price_id string yes
data.status string yes
data.current_period_start string or null (date-time) no
data.current_period_end string or null (date-time) no
data.next_charge_at string or null (date-time) no
data.trial_end string or null (date-time) no
data.payment_method_id string or null no
data.order_id string or null no
data.period_id string or null no
data.currency string no The currency of the amounts; absent on an event from before, read as the home currency
data.amount_cents integer or null no
data.cancel_source string or null no
data.decline_category string or null no
data.attempt integer or null no

Example

{
    "id": "evt_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
    "type": "subscription.cancelled",
    "version": 1,
    "occurred_at": "2026-10-21T14:05:00.000Z",
    "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
    "data": {
        "subscription_id": "sub_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
        "merchant_id": "mer_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
        "buyer_id": "buy_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
        "buyer_email": "buyer@example.test",
        "price_id": "prc_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
        "status": "cancelled",
        "current_period_start": "2026-10-08T12:00:00.000Z",
        "current_period_end": "2026-11-08T12:00:00.000Z",
        "next_charge_at": "2026-11-08T12:00:00.000Z",
        "trial_end": null,
        "payment_method_id": "pm_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
        "order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C",
        "period_id": "per_1",
        "amount_cents": 1900,
        "cancel_source": null,
        "decline_category": null,
        "attempt": 1
    }
}

Verify the signature before trusting the body and deduplicate on X-Webhook-Delivery: see Webhooks.