Skip to content
Last updated

Destination Mismatch

FieldValue
Type URIhttps://developer-next.ingrid.com/ingrid-api/errors/delivery/destination-mismatch
TitleDestination Mismatch
Recommended Status422 Unprocessable Entity

Description

The destination-mismatch error is returned when creating an order where the destination.countryCode or destination.postalCode do not match the values used when the delivery options were originally fetched. These fields are validated against the token's offer hash.

Note that other address fields such as street address and city can be freely updated between fetching options and creating the order — only countryCode and postalCode are validated.

Common Causes

  • The customer changed their postal code after delivery options were fetched
  • The customer switched to a different country during checkout
  • A frontend bug caused the destination fields to be overwritten

How to Resolve

  1. Re-fetch delivery options by calling POST /v1/delivery/options with the updated destination
  2. Present the updated delivery options to the customer (available carriers and prices may differ for the new destination)
  3. Retry order creation with the fresh token from the new options response

If your checkout flow allows the customer to edit their address after delivery options are shown, you should automatically re-fetch options whenever countryCode or postalCode changes.

Example Response

{
  "type": "https://developer-next.ingrid.com/ingrid-api/errors/delivery/destination-mismatch",
  "title": "Destination Mismatch",
  "status": 422,
  "detail": "The destination country or postal code does not match the offer. Options were fetched for SE/11530 but the order was submitted with SE/41301.",
  "trace_id": "abc-123-def-456"
}