The Cart Calculation service now supports an external fee service when charges and fees need to be added to the cart calculation. You can now use a fee service to add additional charges to the items (for example, a deposit fee on bottles) or to the payment methods (such as a surcharge upon paying with a credit card). A fee service is available from a YaaS development partner and can be subscribed to as a private package. Reply on Hybris Experts if you are interested in using this fee service. If you want to use the fee service, define the URL for the fee service in the Site service, using the schema definition in the Schema service. For more information about the Site service configuration, see the Configuration page.
To support fees on the cart items, the Cart service passes the item YRN attribute to the Cart Calculation service along with the rest of the item details and the Cart Calculation service uses the item's YRN to call the fee service to retrieve the fee (if applicable). The fee can be an absolute amount (€5) or a percentage (5%), and can be per-item quantity or a flat fee.
Fees can also be applied to the payment method. This lets the merchant configure an additional fee based on the payment method that the customer selects (for example, credit card, debit, or cash on delivery). The Checkout service now accepts the selected payment method as an attribute to the checkout request, passes the payment method YRN to the Cart Calculation service, and the Cart Calculation service uses the YRN to call the fee service to retrieve the fee (if applicable).
In the calculation response the subtotal fee and total fee attributes are new. The addition of the fee calculation also alters the tax and order total.
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.