Checkout Does Not Show Correct Selling Plan "Due Later" Amount When Implementing Try Before You Buy

Hi,

I’m trying to implement “Try before you buy” functionality with the headless store. To achieve this I’m using Selling Plan Group with products associated with the created Selling Plan.

I’m following these guidelines: https://shopify.dev/docs/apps/selling-strategies/purchase-options/deferred/deferred-purchase-options

I am able to successfully create a Selling Plan Group and Selling Plan, add products to it (which is reflected in Shopify’s admin panel). Then, when I’m adding the product to the cart which works fine. Later in the checkout, I can see that the plan is added to the line items I’ve chosen, which is also correct. Meaning, my line items have “14-day free trial” description.

But, the problem is at the checkout where value of “Total due today” has full $ amount, while “Total due later” is $0.00. This should be other way around, since the “Try before you buy” functionality I’m trying to implement suppose to charge buyer after trial period (14 days in this case).

This is Admin API Selling Plan Group GraphQL call I’m using (exactly the same as the one from the docs in the above link under “Try before you buy”, but with products added):

mutation {
  sellingPlanGroupCreate(
    input: {
      name: "Try before you buy"
      merchantCode: "try-before-you-buy"
      options: [
        "Try before you buy"
      ]
      position: 1
      sellingPlansToCreate: [
        {
          name: "14-day free trial"
          category: TRY_BEFORE_YOU_BUY
          options: [
            "Try free for 14 days"
          ]
          billingPolicy: {
            fixed: {
              checkoutCharge: {type: PRICE, value: {fixedValue: 0}}
              remainingBalanceChargeTrigger: TIME_AFTER_CHECKOUT
              remainingBalanceChargeTimeAfterCheckout: "P14D"
            }
          }
          deliveryPolicy: {fixed: {fulfillmentTrigger: ASAP}}
          inventoryPolicy: {reserve: ON_SALE}
        }
      ]
    }
    resources: { productIds: ["gid://shopify/Product/XXX"], productVariantIds: [] }
  ) {
    sellingPlanGroup {
      id
      sellingPlans(first: 1) {
        edges {
          node {
            id
          }
        }
      }
    }
    userErrors {
      field
      message
    }
  }
}

The most important part of the call is that the billing policy has fixed value of 0 for checkout charge. This I think should cause the “Total due today” amount to not be included in the “Total due today”, but included in “Total due later”. I also tried it with other amounts for the checkout charge to check if it changes anything. It does not.

It looks to me that’s something wrong in the way the selling plan is created, or there’s some extra step to be done. I would greatly appreciate if someone could point out to me if I’m missing something.

Take care,

Marcin

Hi,

Is it possible that your variant is not properly associated with the selling plan? I used the sellingPlanGroupAddProductVariants mutation to associate variants to the selling plan and it’s working properly from my end. I’m just wondering if your product has a different selling plan attached.

Hello Jason,

Thank you for your reply.

The problem with the cart amount actually disappeared after I checked back to the checkout page a couple of hours later. Now, adding products works as expected. The line item has not only selling plan name displayed, but also $0.00 price and information about what the full amount is and when it’s going to be charged. So it’s correct now and no extra action was needed.

From what I’ve seen the product or variant association works immediately. Whether adding products while creating plan with sellingPlanGroupCreate call mentioned above, or using sellingPlanGroupAddProducts / sellingPlanGroupAddProductVariants that you’ve mentioned. It means sellingPlanGroup call shows the products and variants associated right away. The checkout also shows selling plan name under line items.

The checkout however needed couple of hours to reflect the changes for the price. So, I’m assuming there’s some time Shopify needs to apply the plan for the pricing. I haven’t seen any mention of this in the docs, so it would be helpful if anyone could confirm that this delay might happen, because the configuration turned out to be just fine. If that’s the case, it would be helpful to have this information in the docs to avoid confusion.

Thanks.