New Shopify Certification now available: Liquid Storefronts for Theme Developers

## Wrong price after sellingPlanGroupUpdate mutation with pricingPolicies

Solved
Shopify Partner
4 0 1

Hi,

I've a product's variant that costs 3.5€ associated to one sellingPlanGroup. This sellingPlanGroup has 2 sellingPlans: one with monthly billing cycle (3.5€ per month) and one with annual prepaid billing cycle (3.5€ x 12 = 42€). If I update the sellingPlan's pricingPolicies in order to apply some discount, then the final price is wrong.

E.g. I would like to add 10€ (fixed value) "discount" to the annual plan (so from 42€ to 32€), but the new subtotal is 31.90€. You can find screenshots below.

Accepted Solution (1)
Shopify Staff
85 9 22

This is an accepted solution.

It turns out that what you're observing is due to the fixed discount not be evenly divisible by the number of deliveries. In your example, when we divide the 10€ by 12 we get 0,83333... which we round up to 0,84€ per month. 0,84 X 12 is 10,08€, which is why the total price is shown as 31,92€, instead of 32€.

Note that in general Shopify does a very good job of handling round-off issues. Unfortunately, fixed amount discounts for subscriptions can't be easily handled.

Please let me know if you have further questions.

To learn more visit the Shopify Help Center or the Community Blog.

Replies 3 (3)
Shopify Staff
85 9 22

Thanks very much for reporting this. I've created a ticket and assigned it for resolution. Sorry for the inconvenience.

To learn more visit the Shopify Help Center or the Community Blog.

Shopify Partner
4 0 1

Hi @LarryReid!
Thank you for your answer. Will you write here once the ticket is resolved?

Shopify Staff
85 9 22

This is an accepted solution.

It turns out that what you're observing is due to the fixed discount not be evenly divisible by the number of deliveries. In your example, when we divide the 10€ by 12 we get 0,83333... which we round up to 0,84€ per month. 0,84 X 12 is 10,08€, which is why the total price is shown as 31,92€, instead of 32€.

Note that in general Shopify does a very good job of handling round-off issues. Unfortunately, fixed amount discounts for subscriptions can't be easily handled.

Please let me know if you have further questions.

To learn more visit the Shopify Help Center or the Community Blog.