Weight based delivery with delivery customization API

We’re building a custom app for weight-based shipping, where delivery options and prices depend on the total checkout weight.

No issues calculating weight using checkout/create and update webhooks—the challenge is passing that data to our delivery customization API extension. While we can access the cart, there’s no clear way to identify the checkout session/ID from the extension.

Right now, we store the total checkout weight in our DB using the checkout ID from the webhook as the key. If we could access the checkout ID from the extension, that would solve everything—unless there’s a better approach?

This would allow us to dynamically hide or show delivery options based on weight.

Would love to hear your thoughts—any insights or alternative solutions you’d recommend? Appreciate any input!

Update for anyone who might find this helpful:

We ended up using the CarrierService API (GraphQL API) instead. By integrating our carriers’ APIs and calculating the weight via the callback URL we provided, we achieved the desired results.

Hope this helps!

Glad you figured this out Lukas, and thanks for returning here to post your solution :slight_smile:

1 Like