Stripe Billing activation, renewal accounting, and cancellation for the shared subscription intent.
Implements the constrained fixed-price profile from
draft-stripe-subscription-00: one Customer, one recurring Price, one
quantity-one Subscription, and synchronously paid invoices mapped onto
locally persisted canonical periods.
Summary
Functions
Schedule cancellation at the end of the last durably paid billing period.
Return the public Stripe subscription challenge fields.
Validate and durably record a paid Stripe renewal invoice.
Validate Stripe subscription configuration at Plug initialization.
Activate a Stripe subscription and verify its synchronously paid first invoice.
Functions
@spec cancel(String.t(), map()) :: {:ok, MPP.Subscription.Record.t()} | {:error, MPP.Errors.t()}
Schedule cancellation at the end of the last durably paid billing period.
@spec challenge_method_details(MPP.Intents.Subscription.t()) :: map()
Return the public Stripe subscription challenge fields.
@spec process_invoice(String.t(), String.t(), map()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Validate and durably record a paid Stripe renewal invoice.
@spec validate_config!(map()) :: :ok
Validate Stripe subscription configuration at Plug initialization.
@spec verify(map(), MPP.Intents.Subscription.t()) :: {:ok, MPP.Receipt.t()} | {:error, MPP.Errors.t()}
Activate a Stripe subscription and verify its synchronously paid first invoice.