Function: createCheckout()
function createCheckout(deps: CreateCheckoutDeps): Checkout;Defined in: server/checkout/factory.ts:56
The single composition root for the checkout module (proposal §Factory &
injected deps). One call wires every service over one shared deps bag —
there are no per-aggregate factories; a consumer that needs only part of the
surface simply ignores the services it doesn't call.
At init it runs assertCheckoutSchemaGenerated(repos) so a Prisma client
missing a checkout model fails loudly here, not at the first query (§Startup
safety). Provider recovery-path validation runs both at registration and
here across every method-specific rail, so a mutable or incompletely wired
poll/postback adapter fails before serving traffic.
The repositories' actor accessor is the single source for both audit columns
and explicit lifecycle actor fields. clock drives all expiry/status
timestamps, and priceCart is threaded to CartService.
Parameters
| Parameter | Type |
|---|---|
deps | CreateCheckoutDeps |