Skip to content

Subscription

Source code in docs_src/capo_appmonetization/types/subscription.py
class Subscription(TypedDict, closed=True):
    app_id: "capo_appmonetization.types.app_id.AppId"
    """The ID of the app that the subscription belongs to."""
    user_id: "capo_appmonetization.types.user_id.UserId"
    """The opaque end-user identifier that the subscription belongs to."""
    plan_id: NotRequired["capo_appmonetization.types.plan_id.PlanId"]
    """The ID of the plan that the user is subscribed to."""
    effective_at: "capo_appmonetization.types.timestamp.Timestamp"
    """The time when the subscription took effect."""
    billing_anchor_date: "capo_appmonetization.types.timestamp.Timestamp"
    """The fixed reference instant the recurring billing cycle is measured from. It is set when the subscription first takes effect and stays fixed as periods roll forward, so it is normally an older date than the current period — not the start of the current period. For the end of the current cycle, use `currentPeriodEndsAt` on GetSubscriptionResponse (derived from this anchor and the billing cycle) rather than this value."""
    billing_cycle: NotRequired["capo_appmonetization.types.billing_cycle.BillingCycle"]
    """The billing cycle of the subscription, such as monthly or annual."""

app_id instance-attribute

app_id: AppId

The ID of the app that the subscription belongs to.

billing_anchor_date instance-attribute

billing_anchor_date: Timestamp

The fixed reference instant the recurring billing cycle is measured from. It is set when the subscription first takes effect and stays fixed as periods roll forward, so it is normally an older date than the current period — not the start of the current period. For the end of the current cycle, use currentPeriodEndsAt on GetSubscriptionResponse (derived from this anchor and the billing cycle) rather than this value.

billing_cycle instance-attribute

billing_cycle: NotRequired[BillingCycle]

The billing cycle of the subscription, such as monthly or annual.

effective_at instance-attribute

effective_at: Timestamp

The time when the subscription took effect.

plan_id instance-attribute

plan_id: NotRequired[PlanId]

The ID of the plan that the user is subscribed to.

user_id instance-attribute

user_id: UserId

The opaque end-user identifier that the subscription belongs to.