Install the totals collector module
To begin using the totals collector module with the checkout starter kit, ensure that you have completed the getting started and configuration steps.
For more ideas on how you can use the totals collector module, refer to totals collector use cases.
Prerequisites
- Adobe Commerce on cloud infrastructure or on-premises: 2.4.5+
- PHP 8.1+
- The magento/module-adobe-commerce-webhooks module (required by the totals collector).
Installation
Adobe Commerce as a Cloud Service is preconfigured with all the required modules for the checkout starter kit. Cloud Service users can proceed by configuring an App Builder project or configuring Commerce.
Before installing Commerce modules, ensure that you have the required credentials in auth.json with access to the Adobe Commerce repository.
To enable out-of-process quote totals collection (for example, discounts from an external service) in Adobe Commerce, install the magento/module-out-of-process-totals-collector module using the following command:
Copied to your clipboardcomposer require magento/module-out-of-process-totals-collector --with-dependencies
Configuration
This step requires the Adobe Commerce HTTP Client to authenticate the Commerce instance.
After installation, register a webhook so that Adobe Commerce can call your App Builder application when quote totals are collected. The webhook runs after the core discount totals collector; your endpoint returns a JSON Patch response that is applied to the quote totals and items.
For webhook registration details and payload/response format, see totals collector use cases.
