Skip to content
Baremetrics

Cancel Subscription

PUT https://api.baremetrics.com/v1/{source_id}/subscriptions/{oid}/cancel

This endpoint allows you to cancel a subscription.

It may take a while for your cancellations to appear in your metrics.

[!NOTE] To update the canceled_at time on a subscription, you may send subsequent canceled events. However, you cannot set the date further forward than it currently is set.

Path parameters

  • oid string required

    Your unique ID for the subscription

  • source_id string required

    Please see Sources

Body

application/json
  • canceled_at string · date-time required

    A unix timestamp of when this subscription was, or should be canceled.

Responses

200OK
{
  "event": {
    "id": "48X3C1W4w5vCbx",
    "type": "subscription.canceled",
    "info": {
      "canceled_at": 1480421362,
      "addons": []
    },
    "occurred_at": 1480421362,
    "received_at": 1480421362
  }
}
400Bad Request
{
  "error": "Error message here"
}