Order API

Type

Subscription1

A full current snapshot of one subscription.

Send the complete current values for all required fields whenever the subscription changes. Cycle information is optional and supports three forms described in the custom subscription programs guide.

Kind Type
Used in UpdateSubscriptions1

Properties

  • id string required

    Stable primary subscription ID assigned by the subscription system.

  • ecomm_id string optional

    Distinct ID assigned to the same subscription by a separate ecommerce system.

    Omit this field when there is no separate ecommerce system or it does not assign a different subscription ID.

  • created_at time required

    Time when the subscription was created.

  • updated_at time required

    Time when the subscription last changed.

  • cancelled_at time optional

    Time when the subscription was cancelled.

  • last_billing_attempt_at time optional

    Time of the latest billing attempt.

  • next_billing_attempt_at time optional

    Expected time of the next billing attempt.

  • paused_at time optional

    Time when the subscription was paused.

  • paused_until time optional

    Time when the paused subscription is expected to resume.

  • dunning_started_at time optional

    Time when payment-recovery attempts started.

  • dunning_exited_at time optional

    Time when payment-recovery attempts ended.

  • churned_at time optional

    Time when the subscription churned.

  • customer Customer2 required

    Customer who owns the subscription.

    Provide a stable customer ID and any current customer data available to your integration.

  • lines array of SubscriptionLine1 required

    Current subscription lines. Send an empty array when the subscription has no lines.

  • currency string optional

    ISO 4217 currency code for subscription amounts.

  • status SubscriptionStatus required

    Current subscription status.

  • cycles_completed integer optional

    Known number of successfully billed cycles.

    Zero is a known value. Omit this field when cycle progress is unknown. When supplied with cycles, this count is authoritative and the detailed list may be incomplete.

  • non_ecommerce boolean optional

    Whether detailed cycles act as the purchase source instead of ecommerce orders.

    Use this only when subscription charges are not also sent through the order API. Bubblehouse can use cycle amounts for spend and point accrual when configured for this mode.

  • discount_codes array of string optional

    Coupon codes used by the subscription.

    Include these only when the same codes are not sent on matching orders.

  • cycles array of SubscriptionCycle1 optional

    Known completed and scheduled cycle details.

    Include upcoming scheduled cycles when available. If cycles_completed is omitted, Bubblehouse derives it from completed entries and therefore expects the completed details to be cumulative. An explicit empty array without cycles_completed means zero successful cycles.

Previous
ProductVariantLocalization1