Skip to content
Join our SlackContact usGet started

Subscriptions

List Subscriptions
subscriptions.list(SubscriptionListParams**kwargs) -> SubscriptionListResponse
get/subscriptions
Create Subscription
subscriptions.create(SubscriptionCreateParams**kwargs) -> SubscriptionCreateResponse
post/subscriptions
Get Subscription
subscriptions.retrieve(strsubscription_id) -> SubscriptionResource
get/subscriptions/{subscription_id}
Cancel Subscription
subscriptions.cancel(strsubscription_id, SubscriptionCancelParams**kwargs) -> SubscriptionResource
post/subscriptions/{subscription_id}/cancel
Change Subscription Rate Card
subscriptions.change_rate_card(strsubscription_id, SubscriptionChangeRateCardParams**kwargs) -> SubscriptionChangeRateCardResponse
post/subscriptions/{subscription_id}/change-rate-card
ModelsExpand Collapse
class CheckoutCallback:
cancelled_url: str

The URL to redirect to after the checkout is cancelled.

minLength1
formaturi
success_url: str

The URL to redirect to after the checkout is successful.

minLength1
formaturi
class SubscriptionResource:
id: str

The ID of the subscription.

cancels_at_end_of_cycle: bool

Whether the subscription will be cancelled at the end of the current cycle.

current_period: Optional[CurrentPeriod]

The current period of the subscription if it is active.

end: datetime
formatdate-time
start: datetime
formatdate-time
inclusive_end: Optional[bool]
inclusive_start: Optional[bool]
cycles_next_at: Optional[datetime]

The date and time the next cycle of the subscription will start.

formatdate-time
effective_at: datetime

The date and time the subscription became effective.

formatdate-time
metadata: Dict[str, str]
rate_card_id: str

The ID of the rate card of the subscription.

status: Literal["active", "cancelled", "paused"]

The status of the subscription.

Accepts one of the following:
"active"
"cancelled"
"paused"
subject_id: str

The ID of the subject that the subscription is for.