Subscriptions
Subscriptions API operations.
Summary
Functions
Create Subscription
Export Subscriptions
Get Subscription
List Subscriptions
Revoke Subscription
Update Subscription
Functions
@spec create_subscription(PolarExpress.Client.t(), map(), keyword()) :: {:ok, PolarExpress.Schemas.Subscription.t()} | {:error, PolarExpress.Error.t()}
Create Subscription
Create a subscription programmatically.
This endpoint only allows to create subscription on free products. For paid products, use the checkout flow.
No initial order will be created and no confirmation email will be sent.
Scopes: subscriptions:write
See PolarExpress.Params.SubscriptionsCreateSubscriptionParams for parameter details.
@spec export_subscriptions(PolarExpress.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, PolarExpress.Error.t()}
Export Subscriptions
Export subscriptions as a CSV file.
Scopes: subscriptions:read subscriptions:write
See PolarExpress.Params.SubscriptionsExportSubscriptionsParams for parameter details.
@spec get_subscription(PolarExpress.Client.t(), String.t(), map(), keyword()) :: {:ok, PolarExpress.Schemas.Subscription.t()} | {:error, PolarExpress.Error.t()}
Get Subscription
Get a subscription by ID.
Scopes: subscriptions:read subscriptions:write
See PolarExpress.Params.SubscriptionsGetSubscriptionParams for parameter details.
@spec list_subscriptions(PolarExpress.Client.t(), map(), keyword()) :: {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}
List Subscriptions
List subscriptions.
Scopes: subscriptions:read subscriptions:write
See PolarExpress.Params.SubscriptionsListSubscriptionsParams for parameter details.
@spec revoke_subscription(PolarExpress.Client.t(), String.t(), map(), keyword()) :: {:ok, PolarExpress.Schemas.Subscription.t()} | {:error, PolarExpress.Error.t()}
Revoke Subscription
Revoke a subscription, i.e cancel immediately.
Scopes: subscriptions:write
See PolarExpress.Params.SubscriptionsRevokeSubscriptionParams for parameter details.
@spec update_subscription(PolarExpress.Client.t(), String.t(), map(), keyword()) :: {:ok, PolarExpress.Schemas.Subscription.t()} | {:error, PolarExpress.Error.t()}
Update Subscription
Update a subscription.
Scopes: subscriptions:write
See PolarExpress.Params.SubscriptionsUpdateSubscriptionParams for parameter details.