About the Subscriptions API

The Subscriptions API lets you manage the subscriptions that customers started in a Base44 app by paying for a subscription item through Checkout Sessions. It's part of the Payments APIs for Base44. Each call applies to the app's site, which holds the app's payments data.

With the Subscriptions API, you can:

  • Retrieve a subscription, or up to 100 subscriptions at once.
  • Cancel a subscription, either immediately or at the end of the current billing cycle.
  • Pause a subscription, and resume a paused subscription.

Subscription IDs

A subscription is identified by the ID of its eCom subscription contract. This isn't an ID from the billing system. Checkout Sessions creates the subscription items that lead to these contracts. You can get a subscription ID in either of these ways:

  • From the eCom subscription contract that's created after a customer pays through Checkout Sessions.
  • From the payloads of the eCom subscription contract canceled and expired events, which tell you when a subscription ends.

The subscription's status, next billing date, and cancellation date come from the billing subscription that the contract points to.

Canceling a subscription

Cancel Subscription works in 2 modes, which you choose with the immediate parameter:

  • Soft cancellation (immediate is false, the default): Turns off auto-renewal. The subscription stays ACTIVE, and cancellationDate is set to the date of the next billing cycle, when the subscription is scheduled to end.
  • Immediate cancellation (immediate is true): Cancels the subscription immediately.

If the subscription is already CANCELED or ENDED, the call succeeds and returns the current subscription. The same applies to a soft cancellation when auto-renewal is already off.

Before you begin

It's important to note the following points before starting to code:

  • Retrieve, cancel, pause, and resume calls return a SUBSCRIPTION_NOT_FOUND error when the subscription doesn't exist on the site that makes the call. Query Subscriptions leaves such IDs out of the response instead.
  • Query Subscriptions requires a filter on id, using either $in with up to 100 unique IDs or $eq with a single ID. All matches are returned in a single page. Sorting isn't supported, and you can set a paging limit but not a cursor.
  • Pause and resume apply immediately. Only active subscriptions can be paused, and only paused subscriptions can be resumed. Cancel, pause, and resume fail with an error when the subscription's current status or state doesn't allow the action.

Use cases

Terminology

  • Subscription: A recurring payment arrangement that a customer starts through Checkout Sessions.
  • eCom subscription contract: The eCom record that represents a subscription. Its ID is the subscription ID.
  • Soft cancellation: Canceling a subscription by turning off auto-renewal, so the subscription stays active until its next billing date.

Last updated: 2 December 2026

Did this help?