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

Rebilling

Setting Up Rebilling

Renewals are charged only when the Subscriptions rebill command runs. Nothing is billed by page visits, so schedule the command before you take real subscription orders.

Before scheduling rebilling, install and enable CartThrob Permissions Manager (cartthrob_permissions_manager) so Subscriptions can run correctly.

Rebill Command

Run the command from your site with ExpressionEngine’s command-line tool:

php system/ee/eecli.php cartthrob:subscriptions:rebill

The full command for your installation, including its system path, is shown under Rebill Configuration on Subscriptions > Settings.

Each run charges every Subscription that is due and retries Subscriptions on Hold whose retry interval has passed. It also finalizes Subscriptions whose End Date has passed: those with no saved card (for example, cancelled without a refund) are closed, and those that still have a saved card are placed on Hold. See Subscription statuses and access. Use Payments > Overdue on the Subscriptions list to see what the next run will process.

Two command line options are available:

--service / (-s) (boolean)

Run as a persistent service loop instead of a one-time terminal/cron execution.

--time / (-t) (integer)

The number of seconds to pause between iterations when running in service mode. Default is 86400.

Scheduling with cron

Running the command once a day is a common default. For example, to run it at 02:15 every day:

15 2 * * * cd /path/to/site && php system/ee/eecli.php cartthrob:subscriptions:rebill >/dev/null 2>&1

A failed payment is retried by the first run after the Rebill Retry Interval has passed. With a daily schedule and the default 24-hour interval, a retry can therefore wait until the second daily run, about 48 hours later. Run the command more often (for example every few hours), or set a slightly shorter interval, if you want retries close to 24 hours apart.

The schedule doesn’t decide when access ends. After a cancellation without a refund, access ends at the End Date even if the command hasn’t run yet; the command only changes the status to Closed afterward. See Open with no saved card.

Running as a systemd service

CartThrob Subscriptions includes a basic .service file for Linux hosts using systemd. You can find it at cartthrob_subscriptions/lib/systemd/system. Run it with the --service option instead of scheduling it with cron.

Rebill action URL (optional)

If you cannot run commands on a schedule, Subscriptions also provides an HTTP rebill action that a scheduled request can call. Enter a long, random value in Rebill Action Key on Subscriptions > Settings, then call the action URL with key=<your key>. Requests without the correct key receive a 404, and the URL is disabled while the key is blank. Treat the key as a secret.

The URL is your site’s index.php with the action’s ID and your key, for example https://example.com/index.php?ACT=75&key=<your key>. The ID differs between sites: it is the action_id of the row in the exp_actions table with class Cartthrob_subscriptions and method rebill_action. The key can be sent as a query-string or form value.

Rebill settings

These settings are on Add-ons > CartThrob Subscriptions > Settings.

Setting Default Effect
Maximum Rebill Attempts 4 The number of consecutive declined renewal payments allowed, counting the first. The payment that reaches this limit closes the Subscription and sends rebill_final_failure. Earlier declines place the Subscription on Hold. The effective minimum is 2: values of 0 and 1 also allow two attempts. Required; unlimited retries are not supported. See Maximum Rebill Attempts.
Rebill Retry Interval 24 Minimum hours after a failed automatic payment before the next rebill command retries it. Must be at least 1. Saving the Subscription in the Control Panel restarts the wait.
Charge tax on subscription rebills? Yes Recalculates tax for renewals. Item tax exemptions still apply.
Charge shipping on subscription rebills? Yes Recalculates shipping for renewals. Item shipping exemptions still apply.
Add discounts to subscription rebills? Yes Applies current eligible Discounts rules to renewals.
Rebill Action Key blank Enables the rebill action URL.

Only a confirmed decline counts as an attempt. A renewal that cannot be calculated or prepared is placed on Hold without using an attempt. See Subscription statuses and access.

Renewal amounts

Automatic rebilling uses the Subscription’s stored regular price, or its trial price while a trial payment is due. It recalculates one subscription item with quantity one; other items from the original checkout are not included. The rebill settings for discounts, shipping and tax control whether those calculations apply. Item tax and shipping exemptions still apply, and the customer’s saved address is used with the previous Order as a fallback for missing address details.

With Add discounts enabled, automatic rebilling recalculates the current eligible rules in CartThrob’s Discounts channel. Coupon codes entered during the original checkout are not automatically applied again to renewals.

In the Control Panel, Charge Next Billing starts with the stored regular or applicable trial base price. The entered Price is the manual charge amount; this action does not automatically recalculate tax, shipping, or discounts through the rebill plugins. Review the amount before submitting.

Recovery after missed billing dates

In Subscriptions 6, when a Subscription on Hold recovers after missing multiple billing dates, one successful renewal payment resumes service. CartThrob skips the missed dates and sets the next bill to the first future date on the existing calendar schedule. It does not automatically collect a separate payment for each missed period.

For example, a monthly Subscription anchored to the 31st that recovers on June 2 is next billed on June 30, then July 31. The recovery payment is the normal renewal amount; it is not prorated for the time remaining before the next scheduled bill.

To email the customer when a renewal succeeds, is declined, or finally fails, map a template to the matching rebill event. See Notifications, which also explains that these notices are addressed to the member’s current email.

Payment claims and review

CartThrob Subscriptions 6 saves a payment claim before it contacts a gateway for an automatic rebill, manual charge, balance-account cancellation charge, paid plan change, or automatic cancellation refund. A charge claim uses a Subscription with Pending status and a linked Order with Processing status. Paid plan changes use their own pending payment record.

A cancellation refund keeps its evidence on the original Subscription and preserves the original paid Order and payment reference. The Subscription may remain Open while the refund needs review so the customer keeps access through the term they already paid for. This Open status does not mean another payment or refund is safe.

While a payment is unresolved, CartThrob blocks automatic rebilling, Charge Next Billing, cancellation, plan changes, and Control Panel edits to that Subscription. This prevents another operation from detaching the claim or charging the account while the first result may already have succeeded.

Payment result Subscription behavior
Confirmed charge with completed local records CartThrob completes the requested renewal, balance cancellation, or plan change and releases the claim.
Confirmed cancellation refund with completed local records CartThrob reduces the original Order’s remaining recorded total, stores the separate refund reference on the Subscription, and closes the Subscription.
Explicitly declined cancellation refund CartThrob records the failed attempt. Renewal stays stopped, the saved card is detached, and the customer keeps only the paid time remaining. The original paid Order is unchanged.
Confirmed charge decline or path-specific confirmed charge failure CartThrob records the failed Order where applicable, restores the prior Subscription state, and allows the normal retry policy to apply.
Refund cannot be prepared CartThrob does not contact the gateway, cancel the Subscription, or save an unresolved refund claim.
Refund must be completed manually CartThrob first stops without contacting the gateway. From the same Cancel screen, Prepare manual refund can save a guarded manual workflow before the merchant uses the processor.
Timeout, generic failure, unknown result, missing refund reference, or local completion failure CartThrob keeps the durable claim for review. Charge claims remain Pending. Cancellation-refund claims can remain Open through the saved paid-through date. If a distinct confirmed refund reference was saved, a later cancellation request can retry local completion without contacting the gateway again. Other review results are not retried automatically.

Only a confirmed rebill charge decline or failure consumes a Maximum Rebill Attempts attempt. Cancellation refunds do not use that counter. Calculation, preparation, locking, or other internal errors place the Subscription on Hold without consuming a customer payment attempt.

Use Needs review in the Payments filter on the main Subscriptions list to find Pending charge claims, Open cancellation-refund claims, and active reviews that have reached a Closed status. A Review label identifies affected rows, and the Subscription opens to a read-only evidence panel. A Pending Subscription status by itself is not a review flag. See Payment Review and Recovery.

Control Panel payment responses

The Charge Next Billing, Cancel Subscription, and Edit Subscription screens distinguish a short-lived operation lock from a saved payment claim. Use the message and the Subscription state together when deciding what to do next.

Control Panel response What happened What to do
Subscription Charged, Subscription Cancelled, or Subscription Updated The requested action completed and its local records were saved. No recovery is required. Review the Subscription and linked Order if you need to confirm the resulting dates, status, or amount.
This subscription is temporarily busy. Wait a moment and try again. Another request holds the short-lived operation lock, or CartThrob could not acquire that lock. The blocked request did not start a gateway payment or change the Subscription. Wait for the other request to finish, reload the Subscription, and try once more. If the next response says a payment is pending review, follow the review procedure instead of retrying again.
A payment or refund for this subscription needs review. Resolve it before charging, refunding, cancelling, or editing this subscription. CartThrob found durable payment evidence: an active saved operation or review marker, a Processing Order, a pending paid plan change, an unresolved cancellation refund, or unresolved payment reconciliation. The earlier operation may already have succeeded. A Pending Subscription status alone does not trigger this response. Do not charge, refund, cancel, edit, or reopen the Subscription. Verify the gateway result and follow Payment Review and Recovery.
This refund could not be prepared. The subscription has not been cancelled. Please contact the store. Required Order, Vault, gateway, currency, amount, or ownership data could not be verified before dispatch. Correct the stored data or configuration. The gateway was not contacted by this request.
The refund was declined. The subscription will not renew. Access continues only until the paid-through date. The gateway explicitly declined the refund. Renewal stays stopped, and the customer keeps only the paid time remaining. Verify the decline with the processor. Refund the customer in the processor if one is still owed. Do not charge the Subscription again.
This cancellation refund needs review. The refund may already have completed. Please contact the store before trying again. The refund result is uncertain, the refund reference is unusable, or local completion failed after a confirmed refund. Do not issue a separate refund. Verify the provider result and contact support. When CartThrob saved a distinct confirmed refund reference, another cancellation request retries only the local completion and does not contact the gateway again.
PayPal Standard refunds must be completed in PayPal., PayPal Advanced refunds must be completed in PayPal., or the gateway-does-not-support-refunds message CartThrob stopped before dispatch because the selected gateway uses a manual-refund policy or has no callable refund method. Choose Prepare manual refund before leaving CartThrob. Then issue the exact refund in the processor and record either Manual refund completed or Refund not issued through Payment Review.
An explicit gateway decline The gateway confirmed that it declined the payment. CartThrob records the failed attempt where applicable and restores the prior Subscription status and Order link. Correct the payment problem. A later manual attempt or the normal automatic retry policy may try again. Treat generic failure or transport errors as uncertain instead.
A form validation, inactive Subscription, missing Vault token, missing member, zero amount, or charge-preparation error CartThrob stopped before contacting the gateway. No payment claim needs review unless CartThrob also saved explicit review evidence or the linked Order is Processing. Correct the reported data or configuration problem, reload the record, and submit again.

The Edit Subscription screen can also show Subscription Will Not Renew as a warning when the current record cannot renew. That warning describes the saved Subscription; it does not mean the attempted edit ran. Field validation errors leave the submitted values on the form so they can be corrected.

Resolve a payment under review

Use Payment Review and Recovery for the processor-check procedure, evidence fields, resolution controls, manual-refund workflow, and legacy/incomplete cases. Do not change a Subscription’s status or submit another payment merely to clear a review. Resolve the incident from Subscriptions; CartThrob’s generic Mark handled and Complete paid order — no charge actions do not complete Subscription bookkeeping.