Skip to content

basalt / subscriptions/src / CheckoutRequiredError

Class: CheckoutRequiredError ​

Defined in: subscriptions/src/gateway.ts:45

Thrown by checkout-first gateways (Paddle, Lemon Squeezy) from createSubscription: they cannot create a paid subscription server-side — the customer has to pay on the hosted checkout first, and the subscription id only exists once they have. Returning the checkout/transaction id as if it were a subscription used to activate the plan unpaid and store a ref that cancel()/swap() could never address. Use Subscriptions.checkout().

Extends ​

Constructors ​

Constructor ​

> new CheckoutRequiredError(gateway): CheckoutRequiredError

Defined in: subscriptions/src/gateway.ts:47

Parameters ​

gateway ​

string

Returns ​

CheckoutRequiredError

Overrides ​

BasaltError.constructor

Properties ​

code ​

> readonly code: string

Defined in: core/src/errors.ts:25

Inherited from ​

BasaltError.code


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 ​

BasaltError.details


status ​

> readonly status: 501 = 501

Defined in: subscriptions/src/gateway.ts:46

Released under the MIT License.