Order API
TypeSubscription1
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
-
idstring requiredStable primary subscription ID assigned by the subscription system.
-
ecomm_idstring optionalDistinct 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.
-
Time when the subscription was created.
-
Time when the subscription last changed.
-
Time when the subscription was cancelled.
-
Time of the latest billing attempt.
-
Expected time of the next billing attempt.
-
Time when the subscription was paused.
-
Time when the paused subscription is expected to resume.
-
Time when payment-recovery attempts started.
-
Time when payment-recovery attempts ended.
-
Time when the subscription churned.
-
Customer who owns the subscription.
Provide a stable customer ID and any current customer data available to your integration.
-
Current subscription lines. Send an empty array when the subscription has no lines.
-
currencystring optionalISO 4217 currency code for subscription amounts.
-
Current subscription status.
-
cycles_completedinteger optionalKnown 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_ecommerceboolean optionalWhether 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_codesarray of string optionalCoupon codes used by the subscription.
Include these only when the same codes are not sent on matching orders.
-
Known completed and scheduled cycle details.
Include upcoming scheduled cycles when available. If
cycles_completedis omitted, Bubblehouse derives it from completed entries and therefore expects the completed details to be cumulative. An explicit empty array withoutcycles_completedmeans zero successful cycles.