Managing Subscriptions

Some parts of a customer's subscription can be managed directly through Archetype, other parts can only be managed by the customer directly in their profile page.

Creating a sandbox subscription

Sandbox subscriptions are essentially time limited access a customer can have to certain plans. You can assign them to a customer from the dashboard, using the SDK or the API. Customers assigned sandbox subscriptions will immediately get access to that product.

Creating or Updating a Subscription

To create a subscription that isn't a sandbox, you'll need to send the customer a payment link or a checkout session to go through the flow. Payment links are handled directly by Archetype and checkout sessions are done through Stripe. Checkout sessions are ephemeral.

When a customer is changing their subscription, if confirmation is disabled, it'll automatically change their subscription to the new product. If confirmation is enabled, it will always generate a payment link that defaults to their previously entered payment details. Customers will be able to update/edit/delete payment methods.

When a user upgrades or downgrades their subscription, invoicing based on proration will be different. There are three proration behaviors: always_invoice, create_prorations, and none.

Essentially the main difference is that always_invoice will create prorated charges when the change occurs, and create_prorations will

πŸ“˜

Proration Behavior

Check out the page on Prorations for more details as it's super important to handle how your customers upgrade and downgrade their plans.

Cancelling a subscription

Canceling a subscription is straightforward for the most part. You have an option to cancel a subscription in one of two ways.

  • Cancel Immediately: This will immediately cancel the subscription and remove all access to the subscription. This will also charge immediately if always_invoice proration is toggled.
  • Cancel at Period End: This will cancel the subscription but the state will be in canceled and the subscription fully ends at the end of the current billing cycle. All new usage elements will still be counted till the end of the billing cycle.