Error messaging for 3rd Party Carrier Service

New Member
1 0 0

We are creating our own shipping and using the REST admin CarrierService API to supply the shipping options at checkout (

I've seen examples where the shipping provider detects that a user's basket has changed and is able to send a response such that a message is displayed to the user on checkout explaining this (see attached). I can't find anything in the documentation for this though. If I send an empty array back, the messaging suggests that they need to remove items from their cart which isn't necessarily true.

Here is our scenario:

1) A user add an item to their basket, goes to the cart and chooses their shipping options. Let's say that shipping is £5 per item so the shipping is £5.
2) We store that and send the user to checkout where the CarrierService calls our endpoint and we return £5.
3) The user goes back and adds another product to their basket but, instead of navigating to the cart and updating their shipping choice, they go directly to checkout by manually pointing their browser to /checkout/

Their shipping should now be £10 but we have £5 stored because they skipped the "select your shipping" step. We can detect this since the basket items / quantities have changed. How can we send a response to the carrier service call that instructs the user that they must go back and reselect shipping because their basket has changed?