Clearing the storefront cart

Learn how to clear the storefront cart when a customer returns to the storefront after completing a purchase.

📘

Platform:

  • Custom stores using the Recharge-hosted Checkout

Overview

Recharge recommends clearing the customer's cart on an external ecommerce platform or site after processing a subscription order. This proactively prevents any customer confusion by ensuring there are no items left in the cart when a customer returns to your storefront.


Step 1 - Receive checkout/processed webhook

Listen for the checkout/processed webhook which confirms an order is successfully processed. Use this to confirm that the customer's cart can be cleared on the storefront.


Step 2 -Clear storefront cart

After receiving the webhook, pull the cart ID from the response payload passed to Recharge during the checkout process. Match the cart ID to the platform cart ID and perform the necessary API calls on the platform to clear the cart


Need Help? Contact Us