Provider-agnostic payment infrastructure for NestJS with support for Stripe, Paddle, LemonSqueezy, and Mollie.
⚠️ Environment Variables (Most Important)Choose one provider and configure its required variables.
Stripe
Variable
Required
Default
Description
STRIPE_API_KEY
yes
-
Stripe secret API key
STRIPE_WEBHOOK_SECRET
yes
-
Stripe webhook signing secret
Paddle
Variable
Required
Default
Description
PADDLE_API_KEY
yes
-
Paddle API key
PADDLE_WEBHOOK_SECRET
yes
-
Paddle webhook secret key
PADDLE_ENVIRONMENT
no
production
Paddle environment (production or sandbox)
LemonSqueezy
Variable
Required
Default
Description
LEMONSQUEEZY_API_KEY
yes
-
LemonSqueezy API key
LEMONSQUEEZY_WEBHOOK_SECRET
yes
-
LemonSqueezy webhook signing secret
LEMONSQUEEZY_STORE_ID
yes
-
LemonSqueezy store ID
Mollie
Variable
Required
Default
Description
MOLLIE_API_KEY
yes
-
Mollie API key
MOLLIE_WEBHOOK_SECRET
no
-
Mollie webhook secret for verification
Import Optionsimport { PaymentModule } from '@breadstone/archipel-platform-payments' ; Provider-specific imports:
import { StripeClient, STRIPE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-payments/stripe' ;
import { PaddleClient, PADDLE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-payments/paddle' ;
import { LemonSqueezyClient, LEMONSQUEEZY_CONFIG_ENTRIES } from '@breadstone/archipel-platform-payments/lemonsqueezy' ;
import { MollieClient, MOLLIE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-payments/mollie' ; Quick Startimport { PaymentModule } from '@breadstone/archipel-platform-payments' ;
import { StripeClient, STRIPE_CONFIG_ENTRIES } from '@breadstone/archipel-platform-payments/stripe' ;
@ Module ( {
imports: [
PaymentModule. register ( {
paymentClient: StripeClient,
configEntries: STRIPE_CONFIG_ENTRIES ,
} ) ,
] ,
} )
export class AppModule { } Features
Provider-agnostic : Switch between Stripe, Paddle, LemonSqueezy, or Mollie without changing business logic
Subpath imports : Each provider lives in its own subpath — install only the SDK you need
Normalized types : All providers return the same INormalizedPrice, INormalizedSubscription, etc.
Feature gating : FeatureGuard + @RequiresFeature() for quota-based access control
Usage tracking : FeatureUsageInterceptor records feature consumption automatically
Strict error propagation : Methods like fetchPrices propagate errors to the caller instead of silently returning empty results. Wrap calls in try/catch if you need fallback behavior
Available Providers
Subpath
Class
SDK
@breadstone/archipel-platform-payments/stripe
StripeClient
stripe
@breadstone/archipel-platform-payments/paddle
PaddleClient
@paddle/paddle-node-sdk
@breadstone/archipel-platform-payments/lemonsqueezy
LemonSqueezyClient
@lemonsqueezy/lemonsqueezy.js
@breadstone/archipel-platform-payments/mollie
MollieClient
@mollie/api-client
Development
yarn nx build platform-payments
yarn nx test platform-payments
yarn nx lint platform-payments