You can now write JavaScript that runs
inside Shopify checkout
— synchronously, on every order, enforced by Shopify itself. Where scripts react to events after they happen, Functions let you set rules that apply
before
the order is placed.
Three things you can build:
How it works
Head to the new
Functions Console
in the app and click
Add new
. Pick a family — it decides which checkout data your code receives (cart, customer, addresses, tags, selling plans, time and more) — and write a plain JavaScript function body. The editor gives you full autocomplete for your input data, adjustable
variables
so values like thresholds can be changed without touching code, and built-in
version history
— every save is committed, and you can view diffs and restore any previous version.
A few things worth knowing:
  • No credits used
    — functions run on Shopify's infrastructure, so they don't consume DataJet credits. They're included on the Advanced plan and higher, and free on development stores.
  • Fail-open by design
    — if your code ever throws, checkout continues unaffected. Broken code never blocks your buyers.
  • Merchant-friendly configuration
    — on the dashboard, each function exposes a simple form for adjusting its variables, so anyone on the team can tweak a limit without opening the editor.
  • Build with AI
    — the AI Assistant can create and update functions for you; just describe the rule you need.
Not sure where to start? We've collected ready-to-use examples — order limits, PO Box blocking, B2B payment rules, free-shipping perks for loyal customers, and more.
The number of simultaneously active functions depends on your plan (Advanced: 1, Pro: 5, DataJet: 25). See the Functions documentation for full details.