Change record status: 
Introduced in branch: 
1.0.x
Introduced in version: 
1.0.0-beta6
Description: 

Subscription Manager now supports two connector scheduling modes (#3618739: Add a charge-based connector mode with a local billing cycle engine). Self-scheduling connectors (all existing ones) let the remote billing service own the subscription lifecycle, unchanged. Charge-based connectors provide only a payment primitive — a reusable authorization (bank-debit mandate, vaulted card) charged arbitrary amounts on demand — and Subscription Manager owns the billing cycle.

For connector authors

  • Declare supported modes via the new supported_modes key on the SubscriptionManagerConnector attribute or annotation; it defaults to ['self_scheduling'], so existing connectors need no changes.
  • A charge-based connector additionally implements ChargeBasedConnectorInterface: charge($subscription, $amount, $currency, $context): ChargeResult (use $context['charge_uuid'] as the remote idempotency key), setupInstrument() (one hosted-flow method serving zero-amount signup, first setup, and replacement completion), and refund(). ChargeResult answers succeeded, pending (asynchronous rails), or failed. Optionally implement InstrumentReplacingConnectorInterface for the portal's instrument-replacement action.
  • Asynchronous rails resolve pending charges from their webhook handling via subscription_manager.cycle_engine's resolveCharge(), which advances the cycle anchor on success.

For site builders

Data model

New entity type subscription_charge; new subscription base fields (billing_interval, cycle_anchor, billing_day, amount_basis, currency, instrument_id, pending_plan_id, pending_amount_basis); new plan field scheduling_mode; new setting record_zero_amount_periods. All installed via updates 10015–10018.

Impacts: 
Site builders, administrators, editors
Module developers