Route configurations for protected endpoints
OptionalfacilitatorClients: anyOptional facilitator client(s) for payment processing
Optionalschemes: SchemeRegistration[]Optional array of scheme registrations for server-side payment processing
OptionalpaywallConfig: PaywallConfigOptional configuration for the built-in paywall UI
Optionalpaywall: PaywallProviderOptional custom paywall provider (overrides default)
Whether to sync with the facilitator on startup (defaults to true)
Express middleware handler
Express payment middleware for t402 protocol (configuration-based).
Use this when you want to quickly set up middleware with simple configuration. This function creates and configures the t402ResourceServer internally.