Checkout rule actions reference
In short
A checkout rule can run four kinds of action: Hide payment method, Show Error Message, Modify Cart (Add Product or Set Product Quantity) and Validate Via API. When a rule's conditions match, all of its actions run, and actions from every matching rule run together. Rules only run when the Rules Executor block is in your checkout.
✓ Applies to
- Deluxe plan only (checkout rules aren't included in Advanced)
- Rules under Rules in the app, run by the Rules Executor block in Shopify Plus checkout
✕ Doesn't apply to
- Custom Block visibility. Blocks use conditions but have no actions
Rule settings
These fields sit above the actions on every rule.
| Setting | What it does | Default |
|---|---|---|
| Title | Name for your reference, up to 30 characters. Buyers never see it. | Empty |
| Status | Active rules run in checkout. Draft rules don’t. | Draft |
| Condition Match Type | Only apply when All Conditions Pass, or Only apply when Any Condition Passes. | Any |
| Conditions | The conditions that trigger the rule. A rule with none always applies. Every condition. | None |
| Actions | What happens when the rule applies. At least one is needed for the rule to do anything. | None |
Actions at a glance
| Action | What the buyer sees | Needs block progress permission |
|---|---|---|
| Hide payment method | A payment method disappears from the payment step | No |
| Show Error Message | An error message, and they can’t continue | Yes |
| Modify Cart: Add Product | A product added to the order summary | No |
| Modify Cart: Set Product Quantity | A cart line’s quantity changes | No |
| Validate Via API | Nothing, unless your API returns errors or payment actions | Yes, for errors to block |
“Block progress permission” means you’ve allowed the Rules Executor block to block checkout progress in Shopify’s checkout editor. How to add it.
Hide payment method
Hides payment methods by name while the rule matches.
| Field | What it does | Default |
|---|---|---|
| Payment Method name contains | The text to match against payment method names. Pick from the list or type a name. Matching is “contains” and ignores case. | Empty |
- Use one payment method per action. For several methods, add several Hide payment method actions.
- The hide is carried out by Checkout Ninja’s payment customization. When no hide rule matches, all methods show again.
Show Error Message
Shows an error and blocks the buyer from continuing while the rule matches. Guide.
| Field | What it does | Default |
|---|---|---|
| Position | Where the message appears. | Empty |
| Message | The text shown to the buyer. Plain text. | Empty |
Position options:
| Option | Shown at |
|---|---|
| Top of the checkout | The top of the checkout page |
| Shipping Address 1 | The first address line |
| Shipping Address 2 | The second address line |
| First Name | The shipping first name |
| Last Name | The shipping last name |
| The email field | |
| Phone | The phone field |
If a message set to Email or Phone doesn’t appear by the field, switch it to Top of the checkout. It blocks checkout either way.
Modify Cart - Add Product / Update Product Quantity
Changes the cart. Choose one of two modes. Guide.
Add Product
| Field | What it does | Default |
|---|---|---|
| Product Variant | The variant to add. If the selection has several variants, the first is used. | Empty |
| Quantity | How many to add. Empty or invalid values add 1. | Empty (adds 1) |
| Prevent adding duplicate products | Skips the add when the variant is already in the cart. | On |
| Limit total quantity in cart | Turns on a cart quantity cap for this variant. Shows Quantity limit enabled or No quantity limit. | Off |
| Maximum quantity allowed | With the limit on, the product is only added while its cart quantity is below this number. | Empty |
Turning off Prevent adding duplicate products makes the rule add the product every time it runs while it matches. The app warns you with Warning: Risk of Duplicate Products. Use it only with a quantity limit.
Set Product Quantity
| Field | What it does | Default |
|---|---|---|
| Product | The product and variant whose cart line to change. The variant must already be in the cart. | Empty |
| Quantity | The quantity to set. Empty, 0 or invalid values set 1. | Empty (sets 1) |
Validate Via API
Sends checkout data to your endpoint and applies its response. Full contract.
| Field | What it does | Default |
|---|---|---|
| API URL | Your HTTPS endpoint. Called with POST and a JSON body. | Empty |
| API Headers | Shown in the editor but not currently sent with the request. | Empty |
| Input Query | GraphQL-style list of fields to send, for example { deliveryAddress { zip } }. Empty sends all checkout data. | Empty |
- The request carries
Content-Type: application/jsonandX-checkout-session-token. - The response must include an
actionsarray. Entries in an optionalerrorsarray block checkout. - Responses are cached for 5 minutes per URL and identical data.
How rules run
- The Rules Executor loads your active rules when the checkout opens. It reads 10 rules from your store, drafts included, then drops drafts.
- It re-evaluates every rule whenever the checkout changes, such as the cart, address, email, discounts or selected payment option, after a 300 ms pause.
- While it evaluates, it holds checkout progress for that moment, if you’ve allowed it to block progress.
- Actions from all matching rules are collected and applied together.
Frequently asked
Can one rule have several actions? +
Yes. Click Add New Action to add more. They all run when the rule's conditions match.
What happens if two rules match at the same time? +
Both rules' actions run. Error messages from both are shown, and payment methods targeted by either rule are hidden.
What if a rule has no conditions? +
It always applies, so its actions run on every checkout.
Do draft rules run? +
No. Only rules with Status set to Active are loaded by the Rules Executor.