CartThrob 10 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Key Concepts

Requirements

Subscriptions 6.0.0 requires CartThrob 10.0.1 or newer, ExpressionEngine 6.1 or newer, and PHP 8.0 or newer. For installation and first-time setup, follow Sell your first subscription.

When upgrading, deploy both bundled add-on folders and run their ExpressionEngine updates before use. The update adds Subscription currency and billing-anchor columns and registers the current extension hooks.

Setup Prerequisite

Install and enable CartThrob Permissions Manager (cartthrob_permissions_manager) before Subscriptions. Subscriptions depends on it for permission assignment and access checks. If Permissions Manager is not installed, the Subscriptions Control Panel redirects back to the Add-ons page.

Also map the CartThrob Purchased Items and Order fields that Subscriptions uses before taking orders. See CartThrob field mappings.

CartThrob field mappings

Subscriptions reads and writes payment details through fields mapped in CartThrob’s settings. Missing mappings don’t stop checkout, but they break refunds, credits and payment history later, so check them before you take orders.

CartThrob > Purchased Items (reference). Set Save each purchased item to its own channel entry? to Yes and select the Purchased Items Channel, then map:

Field What Subscriptions uses it for If it isn’t mapped
Purchased Items Sub ID Field Name Links each purchased item to its Subscription. Subscriptions writes the ID at checkout and on every renewal. Refund and Plan-change credit amounts are zero, and the Subscriptions Control Panel shows “You haven’t configured Purchased Items for use by CartThrob. This will prevent refunds from being applied.”
Purchased Items Price Field Name The amount last paid: Last Paid Amount, refund amounts and Plan-change credits. Last Paid Amount, refund amounts and Plan-change credits are usually zero. Payment history is incomplete.
Purchased Items Order ID Field Name Connects each payment to its Order for payment history. Payment history is incomplete (payment_history_complete is 0).

CartThrob > Orders, Order Data Fields (reference). Map:

Field What Subscriptions uses it for If it isn’t mapped
Total The amount of the original payment, which caps refunds, and payment history. Cancellation refunds and Plan-change refunds fail with “This refund could not be prepared.” Payment history is incomplete.
Payment Gateway Confirms that a refund goes back through the gateway that took the payment. Cancellation refunds and Plan-change refunds fail with “This refund could not be prepared.”
Subscription ID Records, on each Order, the Subscription it started or renewed. The Orders are created, but nothing on the Order says which Subscription it belongs to.
Vault ID Records the saved card each Order was charged to. Not recorded on the Order.
Last Four Digits Shown in Payment Review and recorded with refunds. Shown as unavailable.
Customer Email Saved on renewal Orders and Control Panel charges. Not recorded on the Order.
Error Message The gateway’s message on a failed renewal Order. Not recorded on the Order.

Subscription ID is the mapping most often missed: nothing is mapped on a new install. The sample Orders channel has a Payment: Subscription ID field (order_subscription_id); choose it. Mapping the field does not backfill existing Orders.

See the Subscription ID mapping reference for the field choice and supported short-name fallback.

Subscription System

A subscription is an agreement that lets your store charge a customer again on a schedule. The customer pays once at checkout; CartThrob saves a reusable payment reference with the gateway and charges it when each renewal is due.

Plans, Subscriptions and stored terms

These terms are easy to confuse:

Term What it is
Plan A reusable set of terms you create in Subscriptions > Plans: price, interval, trial, number of payments, permissions and whether customers may change Plan. A Plan is a template for new purchases.
Subscription Settings field The same terms stored on a product entry, for selling a channel product as a subscription.
Subscription One customer’s agreement, created at checkout (or in the Control Panel). It stores its own copy of the terms, its status, dates and saved card.
Order The first payment creates an Order; each renewal creates another Order. A Subscription’s payment history is its list of Orders.
Vault The saved card (a gateway token) that renewals are charged to.

A Subscription keeps the terms it was bought with. Renewals use the price, interval, trial terms, name and description stored on the Subscription, not the Plan’s current values, so editing a Plan never changes what existing customers pay. Plan permission changes are the exception; see Editing Plan Permissions. To change one customer’s terms, edit that Subscription, or have the customer use Change Plan Form.

You can also create subscriptions without a Plan by passing subscription parameters to add_to_cart_form or letting customers choose terms with subscription_select.

Eligible Payment Gateways

For automatic subscription payments, use Stripe Payments, classic Stripe, or Authorize.net with CIM enabled. The bundled PayPal, Mollie, Opayo/Sage and Dummy integrations do not support Subscriptions. Offline Payments is for intentional manual/test workflows and does not collect funds from a processor. A persistent notice on Subscriptions → Settings repeats these requirements.

Subscriptions initiates renewal charges when they are due, using the saved payment reference; it does not create a processor-managed subscription schedule. Support is specific to CartThrob’s integration, not every feature the provider offers through other APIs.

Subscription checkouts need ordinary order processing. When CartThrob’s Asynchronous Order Processing setting is on, a checkout whose cart contains a subscription is refused before payment with “Subscription checkout cannot use asynchronous order processing. Disable asynchronous order processing and try again.” The Subscription is created as part of the completed checkout, so it can’t be deferred. Checkouts without a subscription are not affected.

Token Vaults System

Most payment gateways have systems that can store customer information (including credit card numbers) securely on their systems. The benefit of using a vault system is a reduced PCI compliance burden. Generally, when adding a customer to the vault system, you capture a token from the payment gateway itself. Once you have this payment token, it can be sent in the future to initiate a payment even without the customer present, and without storing customer information.

As of version 5.1, vault management UI is handled in CartThrob core rather than a dedicated Vault panel inside Subscriptions.

Uses of vault systems:

  • To initiate payments in a subscription on a regular basis without the customer present
  • To let customers reuse a saved payment method without entering their card details at every checkout. The payment gateway stores the card number; CartThrob stores a token/reference and limited display information, such as the last four digits.

CartThrob’s subscription system requires a payment gateway that can both create a vault token and charge that token later. This ensures you do not need to store credit card details on your server.

Gateway Subscription checkout Notes
Authorize.net (CIM) Supported The Authorize.net account must have CIM enabled.
Stripe Supported The classic Stripe/Card Element integration supports saved-token rebilling.
Stripe Payments Supported The Stripe Payment Element integration supports saved-token rebilling.
Offline Payments Manual/test only Implements the token contract but does not collect funds from a remote payment provider; use only for an intentional manual or test workflow.
PayPal Standard Not supported Does not implement CartThrob’s recurring-token contract.
PayPal Advanced Not supported Does not implement CartThrob’s recurring-token contract.
Mollie Not supported The bundled integration does not implement the recurring-token contract.
Opayo Europe Direct / Offsite (Sage) Not supported Neither bundled integration implements the recurring-token contract.
Dummy Gateway Not supported Does not implement CartThrob’s recurring-token contract.

When a cart contains a Subscription product, CartThrob rejects an unsupported gateway before contacting the payment provider. Do not hard-code PayPal Standard, PayPal Advanced, or Dummy into a Subscription checkout form.

Configure the gateway credentials, required token/vault services, checkout fields and rebilling schedule. Before going live, verify a renewal and a card change with your own configured gateway. See Update Subscription Form for explicit new/shared-card modes, requirements and supported gateways. A successful card setup alone is not proof of a successful later renewal.

The Subscription CP’s saved-card choices include only member-owned Vaults on a subscription-capable gateway. The same eligibility check applies when an administrator types a Vault ID or submits the Subscriber Charge form. Offline Payments remains available for intentional manual/test assignments.

Automatic card reassignment stays on the existing payment gateway. Deleting a card prefers an eligible same-gateway primary, then a same-gateway backup; a card on another processor is not a fallback. Marking a saved card primary only reassigns Open/Hold Subscriptions already using that gateway, and leaves detached, end-dated, closed, pending and payment-review agreements alone. These actions do not add a frontend saved-card switching form.

If you would like support for additional gateway providers, please contact us.

Permissions System

CartThrob permissions are front-end access grants. They are separate from ExpressionEngine roles, member groups, and Control Panel permissions.

A Permission Item defines a type of access, such as Video Library. An Assigned Permission links that Permission Item to a member. The assignment can be created by a successful purchase, by a Subscription Plan, or manually in Permissions Manager. Template tags then check the member’s assignment when deciding whether to display protected content.

Changing a member’s ExpressionEngine roles does not create, change, or remove their CartThrob permission assignments. This allows members to purchase several independent types of access without changing their ExpressionEngine account privileges.

The assignment remains until it is manually removed or CartThrob explicitly synchronizes or removes the linked access. When Subscriptions creates an assignment, it records the Subscription ID so the access can be associated with that Subscription.

Use the permission tags according to the type of check you need:

  • has_permission checks whether the member has the requested CartThrob permission assignment.
  • has_subscription_permission checks for the assignment through an Open or unexpired Subscription.

See the bundled Permissions Manager documentation for setup, assignment, and template examples.

Billing status and access

Two separate records decide whether a member can see subscription content:

  • an assignment, which records that the member was granted a Permission;
  • the Subscription, whose status, End Date and cancellation outcome decide whether that grant still counts.

An assignment on its own does not prove a current, paid subscription.

Which permission tag should I use?

Tag What it checks When to use it
has_permission Does the member have an assignment for this Permission? It does not check whether a linked Subscription is active, expired or refunded. Access controlled by the assignment itself, such as a one-time purchase or a manual grant. It never expires on its own.
has_subscription_permission Does the member have this Permission through a Subscription that still qualifies? Subscription status, End Date and cancellation refunds all count, as well as the assignment. Content that should be available only while the member’s subscription entitlement lasts, including the paid time remaining after a cancellation.

Use has_subscription_permission for subscription content. Assignments created by a Subscription stay in place when it is cancelled, closed or placed on Hold. They change only when the member changes Plan, when a Plan’s permission list changes, or when the Subscription is saved in the Control Panel. So with has_permission, a member whose subscription has ended can keep seeing the content. That isn’t a fault in the Subscription; it is what an assignment-based check does.

For what each status means and exactly when access ends, see Subscription statuses and access.

Example: a removed assignment comes back

A monthly Video Library subscriber has the Video Library Permission.

  1. An administrator deletes that assignment in Permissions Manager. The protected content is now denied.
  2. Later, the administrator edits the Plan’s permission list, for example adding Downloads and keeping Video Library. Synchronization recreates the member’s assignments, including Video Library.
  3. If the subscription still qualifies, the member can see the Video Library again.
  4. If the subscription has ended, has_permission would allow the restored assignment, but has_subscription_permission denies it.

A cancelled subscription with paid time remaining still qualifies. A cancellation with a completed refund does not.

Deleting an assignment is therefore not a permanent block. Saving a Plan without changing its Permissions doesn’t recreate assignments, and normal renewals don’t either. Permissions Manager has no per-member “deny” setting.

Billing intervals

A billing schedule is an interval length and an interval unit, for example 1 and months. A trial schedule uses the same two settings.

  • Units: days, weeks, months or years, written in lowercase. These are the only units accepted wherever terms are set:

    Singular forms (month) and abbreviations (M) are not accepted.

  • Length: a whole number of 1 or more. A Subscription whose interval length is below 1 is skipped by the rebill command and reported in the log.
  • Calendar months and years keep the same day of the month, using the last day of shorter months. A Subscription started on January 31 renews on February 28, then March 31.

Offering Multiple Billing Schedules

Create a separate Plan for each payment schedule you offer, even when every option grants the same product or permissions. For example, a nine-month program could use one monthly Plan with nine total occurrences, one Plan billed every three months with three total occurrences, and one full-price Plan with one total occurrence. Assign the same permissions to all three Plans when they should grant the same access.

The payment collected during checkout counts as the first occurrence. Total Occurrences includes that initial payment, so a value of 1 collects at checkout and does not schedule another payment. Leaving Total Occurrences blank or entering 0 means unlimited billing occurrences.

Subscription Settings Fieldtype

Use a Subscription Settings field on a product entry to set its recurring price and billing schedule. Leaving Total Occurrences blank or entering 0 means unlimited billing occurrences.

On a product, Trial Price sets the first payment only; later payments use the regular subscription price and interval. The fieldtype has no trial interval settings, so Trial Occurrences does not create repeated trial payments. Use a Plan when you need a separate trial billing schedule.

Shipping and Tax in the Examples

The custom-donation example (subscription_custom) sets no_shipping="yes" and no_tax="yes". The general subscription-product example (subscription_products) keeps normal shipping and tax rules because subscription products can include physical goods. This also means the shipped Monthly Donation product can collect shipping unless you configure an exemption for it. For a donation product, use a mapped product-level shipping exemption, or add no_shipping="yes" to add_to_cart_form in a donation-only version of the template. Tax exemptions are a separate choice; neither exemption disables discounts.

The Plan example (index) sets no exemptions either, so a Plan bought from the demo collects your store’s normal shipping and tax.

Creating and Cloning Plans

Create a Plan from Subscriptions > Plans when you need a new billing schedule. You can also use an existing Plan as the starting point:

  1. Open the existing Plan.
  2. Open the Save menu and select Clone to New Plan.
  3. Review the prefilled Create Plan form. The name starts with Copy of, and the editable Plan settings and Permissions are copied from the source.
  4. Change the name or any other settings as needed, then select Save.

Opening the clone form does not create a Plan. The new Plan receives its own ID only after the Create Plan form is saved successfully, and the source Plan is not changed. Plans do not have a separate title or URL title; the Plan name is the label shown in the Control Panel and returned by Plan-related template tags.

Cloning a Plan does not copy any Subscriptions. Customers remain attached to their existing Plan unless they purchase another Plan or complete a plan change.

The Allow customer to modify subscription? setting controls whether a customer can use change_plan_form and update_subscription_details. It defaults to enabled for new Plans. A Subscription receives its own stored value when it is created, and both tags enforce the value stored on that Subscription.

Changing this setting on a Plan does not retroactively change existing Subscriptions. Edit an existing Subscription separately when you need to change that customer’s access to Plan modification. Upgrade-specific changes are covered in the changelog.

Editing Plan Permissions

Changing the list of Permissions on a Plan synchronizes the permission assignments of every Subscription that uses the Plan, including Closed Subscriptions. Saving a Plan without changing its Permissions does not synchronize anything. Synchronization changes the assignments only; it does not reopen a Subscription or change its billing.

Because Closed Subscriptions are included, a former subscriber can receive a newly added permission, or get back one an administrator deleted. Synchronization never reopens a Subscription. has_subscription_permission still denies a former subscriber unless their Subscription qualifies, but has_permission would allow them. See Which permission tag should I use?

Synchronization also replaces permissions customized on an individual Subscription. Review per-Subscription exceptions before changing a Plan’s permissions, and reapply them afterward when needed. Saving an individual Subscription in the Control Panel also applies its Plan’s permissions, unless specific permissions are submitted with the save.

This is intended behavior. A Plan’s permission list defines what its Subscriptions grant, while each Subscription’s status and dates decide whether that grant currently gives access.

Other Subscription values are edited on the individual Subscription. Editing a Plan is different from moving a customer to another Plan with the Change Plan Form.

Changing Plans

See Change Plan Form before offering upgrades or downgrades. The customer must own the Subscription and its Allow customer to modify subscription? value must be enabled. Both difference flags default to no: a change collects no immediate payment and issues no refund. The new plan takes effect immediately and its billing schedule starts from the change date, on the new Plan’s regular terms: a Plan’s trial is for new purchases only. Enable the difference flags when you intend to charge or refund calculated unused credit differences. Credits and refunds are calculated from the last paid Purchased Item, so they are zero unless Purchased Items is configured. Unused time is prorated on a fixed basis of 30 days per month and 365 days per year. Uncertain payment outcomes stay pending for store review rather than allowing a second payment attempt.

Payment claims and review

In CartThrob Subscriptions 6, a Pending status can indicate an unresolved rebill, manual charge, balance-account cancellation charge, or paid plan change. A linked Processing Order is also treated as an active payment claim. Cancellation refunds use a separate saved marker on the Subscription and may remain Open while the customer finishes the term they already paid for. The Control Panel prevents editing a Subscription while either kind of claim is unresolved.

Automatic rebilling, Charge Next Billing, cancellation payments, and plan changes remain blocked until the payment is resolved. The main Subscriptions list provides Needs review in its Payments filter and a Review label, and the affected Subscription opens to a read-only evidence panel. Verify the result with the gateway before changing the Subscription or attempting payment again. See Payment Review and Recovery for the processor-check steps, local resolution controls, and manual-refund workflow.

Pending has also been used by older Subscription workflows, so the status alone does not prove that a historical row represents a payment incident. It also does not identify an Open cancellation refund under review. Inspect the linked Order, the Subscription error, and the saved payment evidence.

Logging and diagnostics

When upgrading templates or investigating a Subscription problem, see Logging and diagnostics.

Template debugging explains rendered choices; the Developer Log flags migration work and operational errors, file logs carry the relevant IDs, and the Control Panel action log records successful administrator changes. Payment reviews still require their own resolution.