basalt / subscriptions/src / PaymentRequiredError
Class: PaymentRequiredError
Defined in: subscriptions/src/subscriptions.ts:54
A plan change would grant a paid plan without anything being charged: the subscription is not backed by a gateway subscription, so there is nothing to swap (and prorate) at the gateway. Start a checkout() for the paid plan instead — or, when payment really is collected elsewhere (manual invoicing, reference payments, a sales-led deal), say so with swap(..., { allowUnpaid: true }).
Extends
Constructors
Constructor
> new PaymentRequiredError(plan): PaymentRequiredError
Defined in: subscriptions/src/subscriptions.ts:56
Parameters
plan
string
Returns
PaymentRequiredError
Overrides
Properties
code
> readonly code: string
Defined in: core/src/errors.ts:25
Inherited from
details?
> readonly optional details?: Record<string, unknown>
Defined in: core/src/errors.ts:28
Structured payload passed to the constructor, exactly as given (never sanitised here).
Inherited from
status
> readonly status: 402 = 402
Defined in: subscriptions/src/subscriptions.ts:55