Show discounted PIX price for products in the Minicart

Hi,

We made some changes to our store to display product prices under the PIX payment condition. The step we followed was to update the paymentSystemToCheckFirstInstallment property on the /api/checkout/pvt/configuration/orderForm endpoint. This caused all the shelves on the site to start displaying products at the PIX price (with an X% discount).

To illustrate:

  • The product naturally has a price of R$ 100.00, which is what was registered on the platform.
  • The PIX condition adds an additional 10% discount to that price, meaning the product on my shelf now shows as R$ 90.00.

And here’s the problem:

  • When I add this product to the cart (using minicart.v2), it shows the full price, without the PIX discount applied. After digging into how the minicart works, it has an item called unitPrice, but it doesn’t offer much flexibility to display the same value as the shelf does (via installments).

This creates confusion for the user, since they add a product that’s being displayed at R$ 90.00 and the minicart shows it at R$ 100.00.

What would be the solution to get my minicart aligned with the prices displayed on my shelf?

Ps: We’re using a structure built almost entirely with VTEX Blocks.

Hi @Trackdev,

Within the paymentConfiguration section of the orderForm configuration, there is a field called defaultPaymentSystemToApplyOnUserOrderForm. Could you try setting it with the following variables?

"installment": {{installmentnumber}},
"paymentSystemId": "{{paymentSystemId}}"

I believe this configuration will solve your problem. It basically sets a default payment method for the Checkout and, if you configure it with the PIX id, it will be selected in the minicart and at checkout until the customer chooses a different payment method.

Eduardo Luciano
Field Software Engineer | VTEX

Hey @eduardo.luciano,

I made the changes as you mentioned, but one aspect of this solution left me a bit uncertain. Would there be any way to modify the minicart.v2 to always display the PIX price, regardless of whether the user has already reached the checkout process and changed the payment method type? This would help us maintain consistency in the information shown before they get to checkout.

I bring this up because there’s a high bounce rate among potential customers who enter the store and, after changing the payment method in checkout and returning to the store, notice that the cart price increased by 10% to 20%.

Another point is that, even with this setting enabled, many customers (who visit the site for the first time) are still not seeing the PIX price in the minicart.v2 until they reach Checkout at least once and return to the store — only then does the minicart start displaying the discounted price based on the paymentSystemId.

Hey @Trackdev

That’s strange, this setting should be exactly what makes PIX always selected by default :thinking:

Currently, are there any restrictions on using this payment method?

Also, from your comment I’m assuming this change has already been made in a live environment, right? If so, could you share the store link? That way I can take a look directly and check on my end what else could be done beyond the suggestion I already gave you

Hey @eduardo.luciano,

As far as I know, there are no restrictions on this payment method — I even checked our panel and it has no additional settings (nor in the provider’s panel).

That’s right, the change was made in the public environment.

Sure, I can share it: https://toptherm.com.br/

I’m trying to do the same thing here — show the PIX value in place of the BY price. I made the OrderForm request in POSTMAN, I change “paymentSystemToCheckFirstInstallment”: 125 (to get PIX as payment), and when I do the POST it returns 204 No Content and the GET comes back without the change I made.

Did anyone get any feedback?

In my case, I’d like the system to apply and display the promotional price on the PDP, PLP, Minicart, and Checkout based on the active promotions for the SKU.
As an example below, we have two active promotions: one for -12% and another for -10% via boleto. What we expect is that the final displayed price reflects the combined discount from both promotions.

Fabiano, to calculate both, you have to do it via script. Is your site a CMS? Here I grabbed the FROM and FOR values + 10% of the pix without using VTEX’s own price controls.

Hey @guilherme.lucashome

This is IO, what’s up!

The main concern would be changing this in the minicart and checkout, to follow the single value across all screens.