Inventory errors on Subscription Billing Attempt Create mutation

I have a contract with multiple line items that I am trying to run the subscriptionBillingAttemptCreate mutation on. The request initially succeeds, but I get a webhook shortly after that the billing attempt failed due to the following error:

INVENTORY_ALLOCATIONS_NOT_FOUND - No inventory location found or enabled

However, I’ve checked the product inventory on the line items and all of them appear correct. They all have an associated inventoryItem, the item is tracked, a location is assigned to the inventoryItem, the location is active, there is inventory available, and the inventoryPolicy is set to CONTINUE. Is there anything else that could potentially cause this error?

1 Like

Hi @brett_single

The INVENTORY_ALLOCATIONS_NOT_FOUND error is commonly due to a mismatch between the subscription contract line items and the available, enabled inventory locations. Double-check the below points:

  • Use the productVariant query to check the inventoryItem and its inventoryLevels at each location.
  • Use the location query to verify that the location is enabled and active.
  • Confirm that the product variant is published to the Online Store and available at the location.
  • Check that the subscription contract lines reference valid, published product variants.

Hi @Liam-Shopify

I double checked the InventoryItem & InventoryLevel on each item, and they are all in stock and available. The locations assigned to each item are enabled & active. The products themselves are published to the online storefront. There also aren’t any additional products on the billing cycle for the contract that I haven’t checked, so they are all valid & published variants.

I don’t see anything obvious on the products & inventory themselves that would cause this error. It’s entirely possible there is a legitimate reason for the error, but right now everything looks correct. I have a contract id & x-request-id for a billingAttemptCreate mutation where this is happening. Would you be able to pass those along to the appropriate team? Maybe there’s something else I’m missing here.

  • Contract ID: 78209024372
  • x-request-id: b02380b6-ea7c-468a-aeff-135d4e9ecb07-1754483857

Are you still seeing these errors @brett_single ?