Skip to content
On this page
Reference Reference 4 min read Updated Sep 28, 2026

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.

SettingWhat it doesDefault
TitleName for your reference, up to 30 characters. Buyers never see it.Empty
StatusActive rules run in checkout. Draft rules don’t.Draft
Condition Match TypeOnly apply when All Conditions Pass, or Only apply when Any Condition Passes.Any
ConditionsThe conditions that trigger the rule. A rule with none always applies. Every condition.None
ActionsWhat happens when the rule applies. At least one is needed for the rule to do anything.None

Actions at a glance

ActionWhat the buyer seesNeeds block progress permission
Hide payment methodA payment method disappears from the payment stepNo
Show Error MessageAn error message, and they can’t continueYes
Modify Cart: Add ProductA product added to the order summaryNo
Modify Cart: Set Product QuantityA cart line’s quantity changesNo
Validate Via APINothing, unless your API returns errors or payment actionsYes, 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.

FieldWhat it doesDefault
Payment Method name containsThe 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.

FieldWhat it doesDefault
PositionWhere the message appears.Empty
MessageThe text shown to the buyer. Plain text.Empty

Position options:

OptionShown at
Top of the checkoutThe top of the checkout page
Shipping Address 1The first address line
Shipping Address 2The second address line
First NameThe shipping first name
Last NameThe shipping last name
EmailThe email field
PhoneThe 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

FieldWhat it doesDefault
Product VariantThe variant to add. If the selection has several variants, the first is used.Empty
QuantityHow many to add. Empty or invalid values add 1.Empty (adds 1)
Prevent adding duplicate productsSkips the add when the variant is already in the cart.On
Limit total quantity in cartTurns on a cart quantity cap for this variant. Shows Quantity limit enabled or No quantity limit.Off
Maximum quantity allowedWith 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

FieldWhat it doesDefault
ProductThe product and variant whose cart line to change. The variant must already be in the cart.Empty
QuantityThe 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.

FieldWhat it doesDefault
API URLYour HTTPS endpoint. Called with POST and a JSON body.Empty
API HeadersShown in the editor but not currently sent with the request.Empty
Input QueryGraphQL-style list of fields to send, for example { deliveryAddress { zip } }. Empty sends all checkout data.Empty
  • The request carries Content-Type: application/json and X-checkout-session-token.
  • The response must include an actions array. Entries in an optional errors array 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.

Related guides

Still stuck? Open the app and use Support to chat with the team, or contact us. Don't have the app yet? Install Checkout Ninja.