Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Selling Plan pricing policy fixed price is off by a few cents

Selling Plan pricing policy fixed price is off by a few cents

mt686
Shopify Partner
56 9 19

When creating a selling group and selling plan with a fixed pricing policy, the price is consistently off by a few cents, but sometimes correct. If set to "1000.00", when adding the product to cart on the online store it is $999.96. When set to "1002.00", the price when added to cart is correct. And when it's set to "1003.00" it's then off by 8 cents when added to cart. Depending on the fixed price set on the selling plan, it's consistently off by the same amount of cents, or correct, depending on which price you set. 

Here's an example Mutation:

    mutation sellingPlanGroupCreate($input: SellingPlanGroupInput!) {
        sellingPlanGroupCreate(input: $input) {
          sellingPlanGroup {
            id
          }
          userErrors {
            field
            message
          }
        }
    }

 And The Variables: 

{
            "input":{
            "name": "Name",
            "merchantCode": "subscribe",
            "options": ["Delivery every"],
            "position": 1,
            "sellingPlansToCreate": [
              {
                "name": "Name",
                "options": "somw billing",
                "position": 1,
                "category": "SUBSCRIPTION",
                "billingPolicy": {
                  "recurring": {
                    "interval": "YEAR",
                    "intervalCount": 1
                  }
                },
                "deliveryPolicy": {
                  "recurring": {
                    "interval": "MONTH",
                    "intervalCount": 1,
                    "preAnchorBehavior": "ASAP",
                    "intent": "FULFILLMENT_BEGIN"
                  }
                },
                "pricingPolicies": [
                  {
                    "fixed": {
                      "adjustmentType": "PRICE",
                      "adjustmentValue": {
                        "fixedValue": "1000.00"
                      }
                    }
                  }
                ]
              }
            ]
          }
        }

And The 200 OK response: 

{"data":{"sellingPlanGroupCreate":{"sellingPlanGroup":{"id":"gid:\/\/shopify\/SellingPlanGroup\/77048643861"},"userErrors":[]}},"extensions":{"cost":{"requestedQueryCost":10,"actualQueryCost":10,"throttleStatus":{"maximumAvailable":1000.0,"currentlyAvailable":990,"restoreRate":50.0}}}}

 

The response is correct, and if you query the selling plan it shows the correct fixed price on the pricing policy. The error occurs on the online store when you add the product and selling plan to cart. Using the example mutation above to create the selling plan, when added to cart, it is priced at $999.96 every time. Again, when set to different fixed prices some will be correct and some will be off consistently by a certain cents amount. 

Replies 3 (3)

JuanHoyos
Shopify Staff
43 4 6

Thanks for the thorough report, @mt686! We have filed it as an issue with pre-paid subscriptions for our team to address on a timely basis.

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

mt686
Shopify Partner
56 9 19

Thank you! Please keep me updated on the fix, as it is blocking for me and my client. Is there any current work around? 

mt686
Shopify Partner
56 9 19

Hey @JuanHoyos , 

Checking in again. Been at least a couple weeks since I found and reported this issue with support. Still blocking our app production, so was wondering if there's any updates or date on a fix? 


Thanks