Is this possible? I can’t see shipping price on the cart object for a POS UI extension.
Is there a workaround or somewhere else we can look to see the shipping price that is attached to a POS cart? The workaround would have to succeed in every possible scenario and using grand total and subtotal and tax etc to derive the shipping price does not.
We could add an input for shipping but of course that would mean the merchant would naturally add shipping to the pos cart then have to add it again in the ui extension. Just want to make sure I’m not missing anything.
The docs assistant tells me it isn’t present.
Cart API
Hey @the_one
I had a look and you’re not missing anything. The POS Cart API doesn’t expose shipping price. The cart object gives you subtotal, taxTotal, grandTotal, line items, discounts, customer, and properties, but there’s no shipping field.
The grandTotal on the cart is described as “the final total amount including all items, taxes, and discounts” without mentioning shipping, so trying to back into the shipping cost from grandTotal - subtotal - taxTotal won’t reliably give you what you need.
Shipping data does exist on receipt extension targets via shippingLines on the Transaction object, but that’s post-transaction and currently in feature preview (invite-only). The Order API on post-purchase targets only gives you the order ID, name, and customer ID, so no help there either. There isn’t a workaround for this during cart building today. I’ve raised it with the relevant team internally.
1 Like