Skip to main content

Cart and checkout validation adds billing address and PO number error targets

As of API version 2026-04, you can validate billing addresses and purchase order (PO) numbers in Cart and Checkout Validation Functions. We've added billing address and PO Number to the function input graph and introduced new checkout field targets. This allows you to enforce compliance rules such as blocking prohibited billing countries and requiring PO numbers for B2B orders without relying upon client-side UI extensions.

What's changed

  • Input graph fields: billingAddress and poNumber are available on all Shopify Function input graphs. They return null outside of Cart and Checkout Validation.
  • Supported checkout field targets for error messages in Cart and Checkout Validation:
    • $.cart.billingAddress.{field} (all standard address subfields)
    • $.cart.poNumber

Impact

  • No breaking changes. Your existing functions continue to run. You can optionally add validations for these targets.
  • Checkout surfaces field-level errors for billing address and PO number when your function returns validations for these targets.

To learn more, see the developer documentation.

Was this section helpful?