organization.billing.subscription
Subscribe an endpoint to every event on this page with organization.billing.subscription.*. Each is the envelope every webhook event shares, with the OrganizationSubscriptionEventObject object as its data.object.
An organization's Data API subscription as a webhook event carries it: its identifier, its status, whether it is paused, and when its period ends. getOrganizationBillingSubscription reads its items and discount.
objectstring
One of: organization.billing.subscription
The kind of object this is, always organization.billing.subscription: the family of the event types that carry it, and what tells the members of WebhookEventObject apart.
idstring
Identifier of the subscription, the payment provider's sub_ identifier. It is not a UUID. An organization holds one Data API subscription at a time, and one opened after another ended carries another identifier: the events of one subscription share it.
organization_idstring (uuid)
Identifier of the organization the subscription belongs to.
statusstring
One of: active, trialing, past-due, canceled, unpaid, incomplete, incomplete-expired, paused
The subscription's status once this change was made.
pausedboolean
Whether collection on the subscription is paused.
cancel_at_period_endboolean
Whether the subscription ends when its current period does.
current_period_end_atstring (date-time)
When the subscription's current period ends.
An organization's Data API subscription was opened: by its first card, or by postOrganizationBillingSubscription.
Triggered by
organization.billing.subscription.run: When the organization held none and one is opened.POST /v1/organizations/{organization_id}/billing/subscription:postOrganizationBillingSubscription,mountaya.admin.billing.postOrganizationBillingSubscription()in TypeScript. Every request.
organization.billing.subscription.sync: When the report is of a subscription the organization did not hold.- The payment provider: The payment provider reports a change to the organization's Data API subscription.
- A schedule: Every day, and every week, a check finds the subscription changed at the payment provider in a way not recorded yet.
- Mountaya's staff: Mountaya's staff move the organization to an agreement, which ends its Data API subscription at the end of its period.
organization.billing.payment_method.attach: When the first card opens the organization's Data API subscription.POST /v1/organizations/{organization_id}/billing/payment-methods:postOrganizationBillingPaymentMethod,mountaya.admin.billing.postOrganizationBillingPaymentMethod()in TypeScript. Every payment method saved.- The payment provider: The payment provider reports a payment method confirmed, as a method that confirms after the request does.
- A schedule: Every day, a check finds that the payment method the organization is charged on was saved without being recorded, and records it.
Payload
typestring
One of: organization.billing.subscription.created
Always organization.billing.subscription.created.
data.objectOrganizationSubscriptionEventObject
The Data API subscription.
Every other field is the envelope every webhook event shares.
An organization's Data API subscription changed: an end was scheduled or taken back, its status moved, or a new period began.
Triggered by
organization.billing.subscription.run: When an end scheduled for the subscription is taken back.POST /v1/organizations/{organization_id}/billing/subscription:postOrganizationBillingSubscription,mountaya.admin.billing.postOrganizationBillingSubscription()in TypeScript. Every request.
organization.billing.subscription.cancel: When an end is scheduled, withcancel_at_period_endtrue. The end itself isorganization.billing.subscription.canceled, recorded when the period closes.DELETE /v1/organizations/{organization_id}/billing/subscription:deleteOrganizationBillingSubscription,mountaya.admin.billing.deleteOrganizationBillingSubscription()in TypeScript. Every request.
organization.billing.subscription.sync: When its status, its scheduled end or its period changes.- The payment provider: The payment provider reports a change to the organization's Data API subscription.
- A schedule: Every day, and every week, a check finds the subscription changed at the payment provider in a way not recorded yet.
- Mountaya's staff: Mountaya's staff move the organization to an agreement, which ends its Data API subscription at the end of its period.
Payload
typestring
One of: organization.billing.subscription.updated
Always organization.billing.subscription.updated.
data.objectOrganizationSubscriptionEventObject
The Data API subscription.
data.previous_attributesobject
The former value of each field of data.object the change moved, and of no other.
Every other field is the envelope every webhook event shares.
Collection on an organization's Data API subscription was paused.
Triggered by
organization.billing.subscription.sync: When collection on it is paused.- The payment provider: The payment provider reports a change to the organization's Data API subscription.
- A schedule: Every day, and every week, a check finds the subscription changed at the payment provider in a way not recorded yet.
- Mountaya's staff: Mountaya's staff move the organization to an agreement, which ends its Data API subscription at the end of its period.
Payload
typestring
One of: organization.billing.subscription.paused
Always organization.billing.subscription.paused.
data.objectOrganizationSubscriptionEventObject
The Data API subscription.
Every other field is the envelope every webhook event shares.
Collection on an organization's paused Data API subscription was resumed.
Triggered by
organization.billing.subscription.sync: When collection on it resumes.- The payment provider: The payment provider reports a change to the organization's Data API subscription.
- A schedule: Every day, and every week, a check finds the subscription changed at the payment provider in a way not recorded yet.
- Mountaya's staff: Mountaya's staff move the organization to an agreement, which ends its Data API subscription at the end of its period.
Payload
typestring
One of: organization.billing.subscription.resumed
Always organization.billing.subscription.resumed.
data.objectOrganizationSubscriptionEventObject
The Data API subscription.
Every other field is the envelope every webhook event shares.
An organization's Data API subscription ended, at the end of its period or because it could not be paid.
Triggered by
organization.billing.subscription.sync: When it ends.- The payment provider: The payment provider reports a change to the organization's Data API subscription.
- A schedule: Every day, and every week, a check finds the subscription changed at the payment provider in a way not recorded yet.
- Mountaya's staff: Mountaya's staff move the organization to an agreement, which ends its Data API subscription at the end of its period.
Payload
typestring
One of: organization.billing.subscription.canceled
Always organization.billing.subscription.canceled.
data.objectOrganizationSubscriptionEventObject
The Data API subscription.
Every other field is the envelope every webhook event shares.