SellingPlan Billing Policy For Deposits Not Applied Correctly

A merchant notified us of an issue when using our TBYB app.

They opted to use our deposit option and noticed a discrepancy between 2 checkout scenarios:

Checkout 1 (TBYB only)

  1. 1 TBYB item
  2. Correct itemization (deposit due immediately and full product price due later)

Checkout 2 (Mixed cart)

  1. 2 non-TBYB items
  2. 1 TBYB item
  3. Incorrect itemization (deposit is higher than expected and deferred payment is lower than expected)

In the mixed bag checkout, the “Due today” amount should be $99.95.

The deferred payment should be $60.

The difference is $9.95 which is what they configured as their desired deposit amount when the SellingPlan was created.

Here is our SellingPlanInput for the sellingPlanGroupCreate mutation:

[{
  name: plan.name,
  description: plan.description,
  options: ["default"],
  billingPolicy: {
    fixed: {
      checkoutCharge: {
        type: "PRICE",
        value: {
          fixedValue: plan.prepay,
        },
      },
      remainingBalanceChargeTimeAfterCheckout: trial_days_iso,
      remainingBalanceChargeTrigger: "TIME_AFTER_CHECKOUT",
    },
  },
  category: "TRY_BEFORE_YOU_BUY",
  inventoryPolicy: {
    reserve: "ON_SALE",
  },
  deliveryPolicy: {
    fixed: {
      fulfillmentTrigger: "ASAP",
    },
  },
  pricingPolicies: {
    fixed: {
      adjustmentType: "FIXED_AMOUNT",
      adjustmentValue: {
        fixedValue: 0,
      },
    },
  },
}]

Would really appreciate some eyes on this @Liam-Shopify @KyleG-Shopify.

Hi @chrismgala

It sounds like the behavior you’re seeing could be related to how multiple due dates and deposits are managed:

When a mixed cart triggers a deferred payment, Shopify may be prorating or splitting tax amounts between the “due today” and “deferred” portions in a way that shifts the visible amounts. If the TBYB item has tax, the tax on the deferred
portion might be getting allocated to the checkout charge, inflating “due today.”

Similarly if shipping is present, its allocation across the deposit and deferred portions may not be intuitive in a mixed cart.

If you test with a tax-exempt customer and free shipping, are the amounts correct?