Skip to content

CheckoutModule

Module in @evolve-framework/commercetools

Placing an order on commercetools: orderPlace, and with revision (on by default) orderRevise and orderCancel for an unpaid order.

import { CheckoutModule } from "@evolve-framework/commercetools";

Serves the Checkout part of the GraphQL API: orderCancel, orderPlace, orderRevise.

new CheckoutModule(options: CheckoutModuleOptions)
OptionTypeDescription
clientFactoryClientFactory

The commercetools client its requests to the project go through, built with ClientFactory.create.

payments?PaymentRegistry

The payment providers checkout can use, which is what orderPlace reads an order's payment block from.

revision?boolean

Compose orderRevise and orderCancel, which reopen and close an unpaid order. On by default: commercetools rebuilds a cart from an order in one call. An engine that cannot do that composes them out rather than answering one of them badly.

orderCreationStrategy?"before-payment" | "after-payment"

When the order is created relative to the payment. Under payment first the money moves against a cart and the order is created from the provider's callback, so nothing exists to gate or to convert a quote into.

quotes?boolean

Compose paying for a quote. On by default. Incompatible with payment first, which is refused at boot.

approvals?boolean

Declare that this deployment composes OrderApprovalModule. A module cannot see its siblings, so this is stated rather than detected; it exists so payment first and approvals cannot be configured together.

Extends AbstractModule<CommercetoolsLoaderContext>.

The same module on medusa and sfcc.