Cart and Checkout Validation Functions add billingAddress and poNumber . You can now enforce billing-country blocks or PO-number requirements for B2B orders at checkout without relying on client-side UI extensions.
Billing address and PO number checks could only be implemented in checkout UI extensions (client-side). There was no reliable way to enforce them on the server side.
Compliance rules such as blocking specific billing countries or requiring PO numbers on B2B orders can now be enforced in the function itself, without relying on UI extensions.
billingAddress and poNumber existin all Shopify Function input graphs, but outside Cart and Checkout Validation they return null .
billingAddressBilling address. Available in all Function input graphs. Outside Cart and Checkout Validation, null.
poNumberPO (purchase order) number. Available in all Function input graphs. Outside Cart and Checkout Validation, null.
| Target | Applies to |
|---|---|
$.cart.billingAddress.{field} |
All standard address subfields of the billing address |
$.cart.poNumber |
PO number |
※ {field} The list of individual subfield names that can be specified is not included in this article. It only states "all standard address subfields."
| Item | Legacy | API 2026-04 and later |
|---|---|---|
| Billing address validation | UI extension Implemented client-side | Function $.cart.billingAddress.{field} validates |
| PO number validation | UI extension Implemented client-side | Function $.cart.poNumber validates |
| Enforcement | Relies on client-side UI | Enforced by server-side validation functions |
| Expected use cases | — | Blocking prohibited billing countries, requiring PO numbers for B2B orders, etc. |
| Impact on existing functions | — | No breaking changes Add validation optionally |
Existing Functions continue to work as-is. Validation for these new targets can beadded optionally.
When a function returns validation for these targets, checkout surfaces them as field-level errors on the billing address or PO number.
This validation is available from API version 2026-04 onward. You must bump your function's target API version.
billingAddress and poNumber are added to every Shopify Function input graph. The fields themselves are accessible from any function.
Both fields return outside of Cart and Checkout Validation null . Don't build other Function types around expected values here.
$.cart.billingAddress.{field}(all standard address subfields) and $.cart.poNumber. Returning validation against these produces field-level errors.
Blocking restricted billing countries or requiring a PO number for B2B can now be enforced in functions without relying on client-side UI extensions. Since there are no breaking changes, you can adopt this just by adding validation to your existing functions.
$.cart.poNumber return an error if it's empty and block checkout completion.poNumber outside of Cart and Checkout Validation, null.$.cart.billingAddress.{field} an error on the field.billingAddress Note that outside of validation, null behaves differently.$.cart.billingAddress.{field} Validate the standard address subfields with the function, and return errors on the fields that have issues.