POST https://api.usecommune.combilling.subscription.updated Production. There is no separate sandbox host.

Billing subscription state changed

The newsletter's own Commune subscription moved between billing states: trialing, active, past_due, canceled or trial_expired.

Two things move it. Activity at the payment provider: a checkout completing, the subscription being created, updated or deleted, an invoice being paid or failing. And a daily pass that expires trials which have run out, which is why a trial_expired event can arrive with no creator action behind it.

Named billing.subscription.* because in Commune a "subscriber" is a reader of a newsletter. This topic is about the creator paying Commune.

A state here gates publishing. Past due beyond the grace window, canceled, and an expired trial each refuse a send with 402. A newsletter that is trialing or past due is also capped on how many emails it may send in a day, and exceeding that refuses with 429 rather than 402, so a consumer watching for payment problems should treat both codes as billing refusals.

Delivered as a single HTTPS POST to the consumer's registered endpoint, with the message as the JSON request body. Respond 2xx to acknowledge. Anything else, or a timeout, is retried with backoff, so acknowledge fast and do the work afterwards.

Request Headers

  • string Required
  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • integer

Body

The newsletter's own Commune subscription changed state.

  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • string(uuid) | null Required
  • string | null Required
POST billing.subscription.updated
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-onbillingsubscriptionupdated

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.