# API prices are not applied in checkout when logged out then logged in again

**URL:** <https://forum.shopware.com/t/api-prices-are-not-applied-in-checkout-when-logged-out-then-logged-in-again/108050>\
**Category:** Programming (EN)\
**Created:** [16. Oktober 2025 um 06:00 UTC](https://forum.shopware.com/t/api-prices-are-not-applied-in-checkout-when-logged-out-then-logged-in-again/108050 "2025-10-16T06:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lpwe](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lpwe](https://forum.shopware.com/u/lpwe)\
**Post date:** [16. Oktober 2025 um 06:00 UTC](https://forum.shopware.com/t/api-prices-are-not-applied-in-checkout-when-logged-out-then-logged-in-again/108050/1 "2025-10-16T06:00:07Z")

</div>

Hi,

I have a plugin that is requesting product prices from an API.

When the user logs in, goes to the PDP, we see the API price(s). We are putting the product into the cart, the sum at the cart is correct, offcanvas as well. We go to cart or checkout, the prices are correct API prices, we can buy the items.

However when the user is logging out and then logging in again, the prices are the correct API prices everywhere, **except for the checkout**. There we see standard shop prices again.

When I change the quantity of any one product (or delete one), suddenly all products are recalculated again and the expected API prices are applied. What am I missing? Some link seems to be broken in this chain when we are logging out. In my opinion that doesn’t seem like consistent behaviour - I’m not even sure if it is not a tiny little bug.

Do you have any idea where I should be looking in order to keep the API prices intact, even when we log out?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![lpwe](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lpwe](https://forum.shopware.com/u/lpwe)\
**Post date:** [16. Oktober 2025 um 14:29 UTC](https://forum.shopware.com/t/api-prices-are-not-applied-in-checkout-when-logged-out-then-logged-in-again/108050/2 "2025-10-16T14:29:50Z")

</div>

```auto
class MyCartProcessor implements CartProcessorInterface
{
    public function __construct(
        private readonly AbstractCartPersister $cartPersister,
    ) {}

    public function process(CartDataCollection $data, Cart $original, Cart $toCalculate, SalesChannelContext $context, CartBehavior $behavior): void
    {
        $this->cartPersister->save($original, $context);
    }
}

```

this seems to do the trick.

---

<div class="post-metadata">

**Author:** ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)\
**Post date:** [16. Oktober 2025 um 14:41 UTC](https://forum.shopware.com/t/api-prices-are-not-applied-in-checkout-when-logged-out-then-logged-in-again/108050/3 "2025-10-16T14:41:18Z")

</div>

I would suggest that you rather mark the products as modified before the default product cart processor.

Kind regards

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [15. November 2025 um 14:42 UTC](https://forum.shopware.com/t/api-prices-are-not-applied-in-checkout-when-logged-out-then-logged-in-again/108050/4 "2025-11-15T14:42:09Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
