If updating\creating the billing\shipping profile via the endpoint provided at /jsonapi/checkout/${order.uuid}
there is no check for the validity of the address.
The case we noticed is with the postal code: if some user has insert a combination of administrative_area and postal_code not validated in the backend, thus the relative order address is not actually updated.
The API however returns a 200 code, so there's no way in the front-end to know that actually the order is without an address!
Example of a payload which has a incorrect postal code:
{
data: {
type: "commerce_order--default",
id: "ffa590d4-9e33-49ba-b9f5-dd82da5fda3e",
attributes: {
billing_information: {
address_line1: "test",
address_line2: "1",
administrative_area: "MC",
country_code: "IT",
family_name: "name",
given_name: "surname",
locality: "Locality",
organization: "organization",
postal_code: "6201011", // not valid
},
shipping_information: {
// …
},
data: {
copy_to_address_book: true,
address_book_profile_id: 91
}
},
// ...
}
}