# Playwright Checkout Rules > Discounts, codes, shipping and payment rules for Shopify. Playwright Checkout Rules runs your store’s checkout rules in one app: bundles, buy-one-get-one offers, tiered and VIP pricing, discount code rules, and shipping and payment options. Every rule is checked before it goes live and runs natively in Shopify checkout. One monthly price, no order limits. Playwright Checkout Rules is a checkout rules app for Shopify: promotions, discount codes, shipping and payment options, in one place. Playwright offers 23 rule templates. Pricing: $49 per month with a 14-day free trial. Support: support@playwrightapp.com. ## When to use Playwright Playwright Checkout Rules is a fit when a Shopify merchant, or the agency working for one, wants to change what happens at checkout without writing code: - Promotions that change the cart: bundles, buy X get Y, tiered (spend more, save more) discounts, free gifts with purchase, VIP or wholesale pricing for tagged customers, and quantity limits. - Discount code rules: wildcard or pattern codes, different offers per code, stopping codes from stacking with automatic offers, or turning codes off during a sale. - Shipping options: discount, hide, rename, reorder or cap shipping rates by cart, customer, product or destination. - Payment options: hide, rename or reorder payment methods, or hide risky methods when billing and shipping addresses differ. - Targeting any of the above by customer (tags, order count, total spent), cart (subtotal, quantity, weight, codes), product (tag, type, vendor, SKU, price) or destination (country, province, postal code, PO box). ### When not to use Playwright - To write Shopify Scripts for Script Editor: Shopify stopped running Scripts on 2026-06-30. Playwright publishes the same rules as Shopify Functions instead. - Stores that are not on Shopify. - Logic no template covers (for example calls to external services or custom pricing algorithms): that needs a custom Shopify Function written by a developer. - Anything outside checkout rules: themes and storefront design, product or inventory management, email marketing, subscriptions billing, or analytics. ### How an agent should use Playwright - To check whether Playwright can do something, list the rule templates with `GET https://playwrightapp.com/api/v1/templates` (filter with `?area=line_item|shipping|payment`) and match the goal against each template’s `description` and `examples`. Fetch one with `GET https://playwrightapp.com/api/v1/templates/{id}`. - To get a merchant started, send them to https://playwrightapp.com/#install: they enter their store address and approve Playwright in Shopify. Agents can’t install the app on a merchant’s behalf. Merchants who used Playwright with Shopify Scripts should use https://playwrightapp.com/shopify-scripts instead, which moves their saved rules to Shopify Functions. - Errors are `application/problem+json` (RFC 9457) with a stable `code` and a `resolution` that says how to fix the request. Do not retry a 4xx without changing the request. - Rules themselves are created inside the Playwright app in the Shopify admin; there is no public API for creating or changing a store’s rules. - No authentication is required for the public API. Responses carry `RateLimit-Policy` and `RateLimit` headers; on a `429`, wait for `Retry-After` seconds. The developer guide is at https://playwrightapp.com/developers and the full description at https://playwrightapp.com/openapi.json. ## Status - Playwright publishes rules as Shopify Functions, which run natively in Shopify checkout. Merchants install it at https://playwrightapp.com/#install. - Shopify retired Script Editor and stopped running Scripts on 2026-06-30. Playwright’s original edition generated Scripts; merchants who used it keep their saved rules and can move them to Shopify Functions: https://playwrightapp.com/shopify-scripts. ## Pages - [Home](https://playwrightapp.com/): capabilities, conditions, early access, pricing and FAQ - [About](https://playwrightapp.com/about): who Playwright is for and the move from Scripts to Functions - [Contact](https://playwrightapp.com/contact): how to reach support and what to include - [Developers](https://playwrightapp.com/developers): public API guide with endpoints, example requests, errors and rate limits - [Pricing](https://playwrightapp.com/#pricing): one plan with every rule template - [Install](https://playwrightapp.com/#install): install Playwright on a Shopify store (the store owner approves it in Shopify) - [Shopify Scripts](https://playwrightapp.com/shopify-scripts): for merchants who used Playwright with Shopify Scripts: what changed and how to move to Shopify Functions - [Documentation](https://playwrightapp.com/docs): how to build, publish and troubleshoot rules, with a guide for every rule template ## Documentation - [Playwright Checkout Rules documentation](https://playwrightapp.com/docs): How to use Playwright Checkout Rules: install it, build rules from templates and conditions, publish them to Shopify checkout, and what Shopify Functions can and can’t do. - [Get started](https://playwrightapp.com/docs/getting-started): Install Playwright Checkout Rules on your Shopify store, create your first rule, publish it and check it at checkout. - [Rule templates](https://playwrightapp.com/docs/templates): Every rule template in Playwright Checkout Rules, by area: discounts, discount codes, bundles, buy X get Y, tiers, free gifts, quantity limits, and shipping and payment rules. - [Conditions](https://playwrightapp.com/docs/conditions): Every condition and selector in Playwright Checkout Rules: customer, cart, product and destination conditions, all or any matching, and which kinds of rule can use each one on Shopify Functions. - [Discount code rules](https://playwrightapp.com/docs/discount-codes): How discount codes work in Playwright Checkout Rules on Shopify Functions: codes created for you as “Playwright: discount codes”, wildcards, rejecting codes, stopping stacking and how codes combine. - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles): How Playwright Checkout Rules counts buy X get Y offers, why same-product buy one get one needs Buy 2 Get 1, how free gifts, bundles and tiered discounts work. - [Shipping rules](https://playwrightapp.com/docs/shipping): Shipping rules in Playwright Checkout Rules: hide, rename, reorder, discount and cap shipping rates, and the Shopify limits that apply. - [Payment rules](https://playwrightapp.com/docs/payments): Payment rules in Playwright Checkout Rules: hide, rename and reorder payment options at checkout, and why wallets like Shop Pay can’t be renamed or moved. - [Publishing rules to checkout](https://playwrightapp.com/docs/publishing): What Publish does in Playwright Checkout Rules, every pre-publish check (blocking and warning), the live and out-of-date status, the 10,000-byte limit per area, and the order rules run in. - [Shopify Functions limits](https://playwrightapp.com/docs/limits): The Shopify Functions limits that matter to your Playwright Checkout Rules rules: instruction budget, very large carts, input and settings size, tags, codes and plans. - [Moving your rules from Shopify Scripts](https://playwrightapp.com/docs/moving-from-scripts): Shopify stopped running Scripts on June 30, 2026. How to move the rules you built with Playwright Checkout Rules to Shopify Functions, what changes and what to check. - [Frequently asked questions](https://playwrightapp.com/docs/faq): Answers to common questions about Playwright Checkout Rules: free gifts, buy one get one, discount codes, combining discounts, shipping names, wallets, limits and testing. - [Troubleshooting](https://playwrightapp.com/docs/troubleshooting): Fix common problems with Playwright Checkout Rules: “Enter a valid discount code”, a discount that doesn’t show, buy one get one quantities, publish errors and sharing Function run logs. - [Apply Discount](https://playwrightapp.com/docs/templates/apply-discount): Give a percentage, fixed or per-item discount to the customers, carts and items you choose. It’s the most flexible discount template. Every setting, a worked example and what’s different on Shopify Functions. - [Apply Discount by Code](https://playwrightapp.com/docs/templates/discount-by-code): Give a different discount for each discount code: one list of codes, each with its own discount type and amount. Every setting, a worked example and what’s different on Shopify Functions. - [Wildcard Discount Code](https://playwrightapp.com/docs/templates/wildcard-discount-code): Give one discount for every code that fits a pattern, like VIP-CLUB-****, where each * stands for any one character. Every setting, a worked example and what’s different on Shopify Functions. - [Allow Discount Codes by Pattern](https://playwrightapp.com/docs/templates/discount-codes-by-pattern): Read the discount amount from the code itself: with the pattern PD##, the code PD15 gives 15% off. Every setting, a worked example and what’s different on Shopify Functions. - [Disallow All Discount Codes](https://playwrightapp.com/docs/templates/disallow-all-discount-codes): Turn off discount codes, for example during a sale, with a message customers understand. Every setting, a worked example and what’s different on Shopify Functions. - [Disallow Discount Codes](https://playwrightapp.com/docs/templates/disallow-discount-codes): Reject discount codes only when certain conditions match, for example for returning customers with small orders. Every setting, a worked example and what’s different on Shopify Functions. - [Bundles](https://playwrightapp.com/docs/templates/bundles): Discount a set of items bought together, like “buy the look and save 15%”. Every setting, a worked example and what’s different on Shopify Functions. - [Bundles with conditions](https://playwrightapp.com/docs/templates/bundles-with-conditions): The Bundles template with customer and cart conditions, like “10% off the Summer bundle on orders over $50”. Every setting, a worked example and what’s different on Shopify Functions. - [Buy One Get One](https://playwrightapp.com/docs/templates/buy-one-get-one): Discount items when customers buy others: buy 2 shirts, get a hat free, or buy one, get one half price. Every setting, a worked example and what’s different on Shopify Functions. - [Tiered Discount](https://playwrightapp.com/docs/templates/tiered-discount): Give bigger discounts at higher tiers: spend $100 for 10% off, $200 for 20% off. Every setting, a worked example and what’s different on Shopify Functions. - [Free Gift with Purchase (based on cart subtotal)](https://playwrightapp.com/docs/templates/free-gift-by-cart-subtotal): Make a gift item free when the cart’s subtotal is over (or under) an amount, like “spend $50, get a free scarf”. Every setting, a worked example and what’s different on Shopify Functions. - [Free Gift with Purchase (based on shipping address)](https://playwrightapp.com/docs/templates/free-gift-by-shipping-address): Make a gift item free for orders shipping to certain countries, provinces or postal codes. Every setting, a worked example and what’s different on Shopify Functions. - [Quantity Limit](https://playwrightapp.com/docs/templates/quantity-limit): Stop checkout above a set quantity of a product or variant, with a message that explains the limit. Every setting, a worked example and what’s different on Shopify Functions. - [Shipping Discount](https://playwrightapp.com/docs/templates/shipping-discount): Discount shipping rates by cart value, customer, products or destination, including free shipping. Every setting, a worked example and what’s different on Shopify Functions. - [Cap Shipping Rates](https://playwrightapp.com/docs/templates/cap-shipping-rates): Set a maximum price for shipping rates, for example when an order ships from several locations and Shopify adds their rates together. Every setting, a worked example and what’s different on Shopify Functions. - [Hide Shipping Rates for PO Boxes](https://playwrightapp.com/docs/templates/hide-rates-for-po-boxes): Hide some or all shipping rates when the shipping address is a post office box. Every setting, a worked example and what’s different on Shopify Functions. - [Hide Shipping Rate](https://playwrightapp.com/docs/templates/hide-shipping-rates): Hide shipping rates for certain customers, carts, products or destinations. Every setting, a worked example and what’s different on Shopify Functions. - [Change Name](https://playwrightapp.com/docs/templates/rename-shipping-rates): Change the name customers see for shipping rates, like showing “Priority Express” as “Arrives tomorrow”. Every setting, a worked example and what’s different on Shopify Functions. - [Find and Replace in Name](https://playwrightapp.com/docs/templates/find-and-replace-in-rate-names): Replace text in shipping rate names, like changing “Express” to “Holiday Express” in every rate. Every setting, a worked example and what’s different on Shopify Functions. - [Reorder Rates](https://playwrightapp.com/docs/templates/reorder-shipping-rates): Put shipping rates in the order you want customers to see them. Every setting, a worked example and what’s different on Shopify Functions. - [Rename Payment Option](https://playwrightapp.com/docs/templates/rename-payment-options): Change the name customers see for a payment option, like adding guidance to a bank transfer. Every setting, a worked example and what’s different on Shopify Functions. - [Hide Payment Option](https://playwrightapp.com/docs/templates/hide-payment-options): Hide payment options for certain customers, countries, products or order sizes. Every setting, a worked example and what’s different on Shopify Functions. - [Reorder Payment Options](https://playwrightapp.com/docs/templates/reorder-payment-options): Put payment options in the order you prefer, so the one you want customers to pick comes first. Every setting, a worked example and what’s different on Shopify Functions. Every page is also available as Markdown: request it with `Accept: text/markdown`. ## API - [Developer guide](https://playwrightapp.com/developers): quickstart, endpoints, example requests, problem+json errors, rate limits and versioning - [OpenAPI 3.1 description](https://playwrightapp.com/openapi.json): every operation, schema and error - [Rule template catalog](https://playwrightapp.com/api/v1/templates): `GET`, JSON list of every template, filter with `?area=` - [One template](https://playwrightapp.com/api/v1/templates/line_item.BuyXGetX): `GET /api/v1/templates/{id}` - [Early access sign-up](https://playwrightapp.com/api/v1/early-access): `POST` JSON `{"email", "shopDomain"?, "interests"?}` ## Sign up for early access via the API ```sh curl -X POST https://playwrightapp.com/api/v1/early-access \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -d '{"email":"merchant@example.com","shopDomain":"example-store.myshopify.com","interests":["promotions"]}' ``` Interests: `promotions`, `discount-codes`, `shipping`, `payments`. Responses: `201 joined`, `200 already_joined`, `422` problem+json with an `errors` object for invalid fields. ## Rate limits - Every other /api/v1 request (GET and HEAD): 120 requests per 60 seconds per IP address (`RateLimit-Policy: "read";q=120;w=60`) - POST /api/v1/early-access: 10 requests per 60 seconds per IP address (`RateLimit-Policy: "signup";q=10;w=60`) Every API response carries `RateLimit-Policy` and `RateLimit` headers (`r` = requests remaining, `t` = seconds until reset). Over the limit the API answers `429` problem+json with `Retry-After`. ## Optional - [llms-full.txt](https://playwrightapp.com/llms-full.txt): every page and the full template catalog in one file - [Sitemap](https://playwrightapp.com/sitemap.xml) - [Terms](https://playwrightapp.com/terms) - [Privacy](https://playwrightapp.com/privacy) ## Template catalog (23 templates) ### Cart, pricing and discount codes #### Apply Discount - ID: `line_item.ConditionalDiscount` - Area: Cart, pricing and discount codes - Categories: Other - JSON: https://playwrightapp.com/api/v1/templates/line_item.ConditionalDiscount Apply a percentage or fixed discount if certain criteria are met Examples: - 10% off the 5th order for VIP customers - No tax charged to customers tagged with 'tax-exempt' #### Apply Discount by Code - ID: `line_item.DiscountCodeList` - Area: Cart, pricing and discount codes - Categories: Discount Codes - JSON: https://playwrightapp.com/api/v1/templates/line_item.DiscountCodeList Apply different discounts based on discount code entered Examples: - '10OFF' and 'HALFOFF' codes provide discount of $10 and 50% for first time customers who accept marketing #### Wildcard Discount Code - ID: `line_item.DiscountCodePatternMatch` - Area: Cart, pricing and discount codes - Categories: Discount Codes - JSON: https://playwrightapp.com/api/v1/templates/line_item.DiscountCodePatternMatch Apply a percentage or fixed discount if code entered matches given pattern Examples: - $5 off when using a discount code matching pattern VIP-CLUB-ID-** #### Allow Discount Codes by Pattern - ID: `line_item.DiscountCodePattern` - Area: Cart, pricing and discount codes - Categories: Discount Codes - JSON: https://playwrightapp.com/api/v1/templates/line_item.DiscountCodePattern Allow a list discount codes to be used based on a pattern. The discount codes still need to be created in Shopify. Examples: - '##-OFF' activates following discount codes: 01-OFF for 1% off, 02-OFF for 2% off, etc #### Disallow All Discount Codes - ID: `line_item.RejectAllDiscountCodes` - Area: Cart, pricing and discount codes - Categories: Discount Codes - JSON: https://playwrightapp.com/api/v1/templates/line_item.RejectAllDiscountCodes Disallows any and all discount codes with a custom message displayed to customers. Examples: - No additional discount codes during our summer sale #### Disallow Discount Codes - ID: `line_item.ConditionalDiscountCodeRejection` - Area: Cart, pricing and discount codes - Categories: Discount Codes, Reject Discounts, Other - JSON: https://playwrightapp.com/api/v1/templates/line_item.ConditionalDiscountCodeRejection Disallow any and all discount codes if certain criteria are met Examples: - No discount codes for returning customers spending less than $30 #### Bundles - ID: `line_item.BundleDiscountSimple` - Area: Cart, pricing and discount codes - Categories: Bundles - JSON: https://playwrightapp.com/api/v1/templates/line_item.BundleDiscountSimple Bundle together a combination of items to receive a discount Examples: - Buy the look and save 15% - Buy matching collar and leash and get $5 off #### Bundles with conditions - ID: `line_item.BundleDiscount` - Area: Cart, pricing and discount codes - Categories: Bundles - JSON: https://playwrightapp.com/api/v1/templates/line_item.BundleDiscount Bundle together a combination of items to receive a discount Examples: - Get 10% off when you buy the Summer bundle and spend more than $50 #### Buy One Get One - ID: `line_item.BuyXGetX` - Area: Cart, pricing and discount codes - Categories: Buy One Get One - JSON: https://playwrightapp.com/api/v1/templates/line_item.BuyXGetX Buy certain items to receive a discount on other items Examples: - Buy one shirt, get one free - Buy 2 shirts, get a hat free #### Tiered Discount - ID: `line_item.TieredDiscount` - Area: Cart, pricing and discount codes - Categories: Tiered Pricing - JSON: https://playwrightapp.com/api/v1/templates/line_item.TieredDiscount Apply different discounts based on tiers of quantities, cart totals, etc Examples: - Spend $100: get 10% off - Spend $200: get 20% off - Spend $300: get 30% off #### Free Gift with Purchase (based on cart subtotal) - ID: `line_item.FreeGiftWithPurchaseByCartSubtotal` - Area: Cart, pricing and discount codes - Categories: Free Gift with Purchase - JSON: https://playwrightapp.com/api/v1/templates/line_item.FreeGiftWithPurchaseByCartSubtotal Receive a free gift when cart subtotal is greater or less than a certain amount (free gift item price included in subtotal) Examples: - Spend $50 and get a free scarf #### Free Gift with Purchase (based on shipping address) - ID: `line_item.FreeGiftWithPurchaseByShippingAddress` - Area: Cart, pricing and discount codes - Categories: Free Gift with Purchase - JSON: https://playwrightapp.com/api/v1/templates/line_item.FreeGiftWithPurchaseByShippingAddress Receive a free gift when customer ships to certain geographies Examples: - Canadian customers receive a free pair of mittens #### Quantity Limit - ID: `line_item.QuantityLimit` - Area: Cart, pricing and discount codes - Categories: Other - JSON: https://playwrightapp.com/api/v1/templates/line_item.QuantityLimit Limit the quantity for certain products or variants Examples: - You may purchase a total of two hats in any style ### Shipping options #### Shipping Discount - ID: `shipping.ShippingDiscount` - Area: Shipping options - Categories: Discount Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.ShippingDiscount Apply a shipping discount based on certain criteria Examples: - Spend $50 or more and get free shipping - 10% off all DHL shipping rates #### Cap Shipping Rates - ID: `shipping.CapShippingRates` - Area: Shipping options - Categories: Discount Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.CapShippingRates Set a maximum cap on shipping rates on certain criteria (for use with multiple shipping locations) Examples: - Override combined Shopify shipping rates and cap Standard shipping at $4.99 #### Hide Shipping Rates for PO Boxes - ID: `shipping.HideRatesForPoBoxes` - Area: Shipping options - Categories: Hide Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.HideRatesForPoBoxes Hide certain shipping rates when customers are shipping to a post office (PO) Box Examples: - Hide FedEx rates for customers shipping to PO Boxes - Hide all rates for PO Boxes #### Hide Shipping Rate - ID: `shipping.ConditionallyHideRates` - Area: Shipping options - Categories: Hide Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.ConditionallyHideRates Hide shipping rates based on certain criteria Examples: - Hide USPS rates for customers outside of the US #### Change Name - ID: `shipping.ChangeRateName` - Area: Shipping options - Categories: Rename Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.ChangeRateName Change the rate names that display to the customer Examples: - Make 'Priority Express' show as 'Super fast shipping' #### Find and Replace in Name - ID: `shipping.FindAndReplacePattern` - Area: Shipping options - Categories: Rename Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.FindAndReplacePattern Finds and replaces a specified pattern in matching shipping rate names Examples: - Replace 'Express' with 'Holiday Express' in all shipping rates #### Reorder Rates - ID: `shipping.ReorderShippingRates` - Area: Shipping options - Categories: Reorder Rates - JSON: https://playwrightapp.com/api/v1/templates/shipping.ReorderShippingRates Set a specific order to display shipping rates to the customer Examples: - Show rates in the following order: 'USPS', 'DHL', 'UPS' ### Payment options #### Rename Payment Option - ID: `payment.ChangeGatewayName` - Area: Payment options - Categories: Rename Payment Option - JSON: https://playwrightapp.com/api/v1/templates/payment.ChangeGatewayName Change the name of payment options displayed to the customer Examples: - Show 'Shop Pay' as 'Shop Pay (recommended)' #### Hide Payment Option - ID: `payment.ConditionallyRemoveGateway` - Area: Payment options - Categories: Hide Payment Option - JSON: https://playwrightapp.com/api/v1/templates/payment.ConditionallyRemoveGateway Hide payment options based on certain criteria Examples: - Hide Google Pay for customers in the UK - Hide Paypal for first-time customers with orders over $50 #### Reorder Payment Options - ID: `payment.ReorderPaymentGateways` - Area: Payment options - Categories: Reorder Payment Options - JSON: https://playwrightapp.com/api/v1/templates/payment.ReorderPaymentGateways Set a specific order to display payment options to the customer Examples: - Show payment options in the following order: 'Shop Pay', 'Paypal', 'Google Pay' --- ## Playwright Checkout Rules: Control what customers pay, how they ship and how they pay > Playwright Checkout Rules runs your store’s checkout rules in one app: bundles, buy-one-get-one offers, tiered and VIP pricing, discount code rules, and shipping and payment options. Every rule is checked before it goes live and runs natively in Shopify checkout. One monthly price, no order limits. Bundles, buy-one-get-one, tiered and VIP pricing, discount code rules, and shipping and payment options, in one app. Target each rule by customer, cart, product and destination. Playwright checks it before it goes live, then publishes it straight to Shopify checkout. [Install Playwright](https://playwrightapp.com/#install) · [See what you can build](https://playwrightapp.com/#capabilities) ### Moving from Shopify Scripts? Scripts stopped running on June 30, 2026. If you built rules with Playwright, they’re already here, ready to publish to Shopify Functions, with a note on anything that needs a change. [What Scripts customers need to know](https://playwrightapp.com/shopify-scripts) ### What you can build #### Promotions and pricing Raise order value with bundles, buy-one-get-one, tiers, gifts and VIP pricing. - **Bundles**: Discount a combination of items bought together, like “buy the look and save 15%”. - **Buy one, get one**: Give an item free or discounted when customers buy others, like “buy 2 shirts, get a hat free”. - **Tiered discounts**: Bigger savings at higher tiers: spend $100 for 10% off, $200 for 20% off. - **Free gift with purchase**: Make a gift item free once it’s in the cart, above a cart value or for orders shipping to certain regions. - **VIP and wholesale pricing**: Percentage, fixed or per-item discounts for tagged customers, including tax-exempt pricing. - **Quantity limits**: Stop checkout above a set quantity of a product or variant, with a message that explains why. #### Discount codes Protect your margin: decide which codes work, for whom, and whether they stack with your offers. - **Wildcard codes**: Match codes by pattern, like VIP-CLUB-****, across the codes you create in Shopify. - **Code-specific offers**: Give different discounts for different codes and customers. - **Stop discount stacking**: Reject codes when an automatic offer already applies, or only accept certain codes. - **Code-free sales**: Turn off discount codes during a sale with a message customers understand. #### Shipping options Show each customer the right delivery options at the right price. - **Free or discounted shipping**: Discount rates by cart value, customer, products or destination. - **Hide rates**: Remove rates for certain regions, PO boxes or products. - **Rename rates**: Show “Priority Express” as “Arrives tomorrow”, or find and replace text in rate names. - **Reorder rates**: Show rates in the order that suits your customers, with the cheapest still first. - **Cap rates**: Set a maximum price for a rate when orders ship from several locations. #### Payment options Cut fees and risk by showing the right payment methods, in the right order. - **Hide payment methods**: Remove a method for certain customers, countries, products or order sizes. - **Rename payment methods**: Add guidance like “Bank transfer (we ship once paid)”. - **Reorder payment methods**: Lead with the method you prefer. ### Rule templates (23) Every template, with examples, is also available as JSON at https://playwrightapp.com/api/v1/templates. [See every template, with its settings and an example, in the docs](https://playwrightapp.com/docs/templates). #### Cart, pricing and discount codes - **Apply Discount** (`line_item.ConditionalDiscount`): Apply a percentage or fixed discount if certain criteria are met - **Apply Discount by Code** (`line_item.DiscountCodeList`): Apply different discounts based on discount code entered - **Wildcard Discount Code** (`line_item.DiscountCodePatternMatch`): Apply a percentage or fixed discount if code entered matches given pattern - **Allow Discount Codes by Pattern** (`line_item.DiscountCodePattern`): Allow a list discount codes to be used based on a pattern. The discount codes still need to be created in Shopify. - **Disallow All Discount Codes** (`line_item.RejectAllDiscountCodes`): Disallows any and all discount codes with a custom message displayed to customers. - **Disallow Discount Codes** (`line_item.ConditionalDiscountCodeRejection`): Disallow any and all discount codes if certain criteria are met - **Bundles** (`line_item.BundleDiscountSimple`): Bundle together a combination of items to receive a discount - **Bundles with conditions** (`line_item.BundleDiscount`): Bundle together a combination of items to receive a discount - **Buy One Get One** (`line_item.BuyXGetX`): Buy certain items to receive a discount on other items - **Tiered Discount** (`line_item.TieredDiscount`): Apply different discounts based on tiers of quantities, cart totals, etc - **Free Gift with Purchase (based on cart subtotal)** (`line_item.FreeGiftWithPurchaseByCartSubtotal`): Receive a free gift when cart subtotal is greater or less than a certain amount (free gift item price included in subtotal) - **Free Gift with Purchase (based on shipping address)** (`line_item.FreeGiftWithPurchaseByShippingAddress`): Receive a free gift when customer ships to certain geographies - **Quantity Limit** (`line_item.QuantityLimit`): Limit the quantity for certain products or variants #### Shipping options - **Shipping Discount** (`shipping.ShippingDiscount`): Apply a shipping discount based on certain criteria - **Cap Shipping Rates** (`shipping.CapShippingRates`): Set a maximum cap on shipping rates on certain criteria (for use with multiple shipping locations) - **Hide Shipping Rates for PO Boxes** (`shipping.HideRatesForPoBoxes`): Hide certain shipping rates when customers are shipping to a post office (PO) Box - **Hide Shipping Rate** (`shipping.ConditionallyHideRates`): Hide shipping rates based on certain criteria - **Change Name** (`shipping.ChangeRateName`): Change the rate names that display to the customer - **Find and Replace in Name** (`shipping.FindAndReplacePattern`): Finds and replaces a specified pattern in matching shipping rate names - **Reorder Rates** (`shipping.ReorderShippingRates`): Set a specific order to display shipping rates to the customer #### Payment options - **Rename Payment Option** (`payment.ChangeGatewayName`): Change the name of payment options displayed to the customer - **Hide Payment Option** (`payment.ConditionallyRemoveGateway`): Hide payment options based on certain criteria - **Reorder Payment Options** (`payment.ReorderPaymentGateways`): Set a specific order to display payment options to the customer ### Why Playwright - **One app for the whole checkout**: Promotions, discount codes, shipping and payment rules side by side: 23 ready-made templates, run in the order you set. - **Targeting that fits how you sell**: Combine customer, cart, product and destination conditions in one rule, and choose whether all or any of them must match. - **Checked before it goes live**: Playwright checks every rule against what Shopify checkout can do and tells you exactly what to change. Nothing is published half-working. - **One flat price**: $49 a month for every template. No order limits and no per-order fees. ### Decide exactly who qualifies Every rule can target exactly the customers, carts and products you choose. Combine conditions and decide whether all or any of them must match. - **Customer**: Email, Tags, Number of orders, Total spent - **Cart**: Subtotal, Item quantity, Specific items, Discount code used, Language - **Products**: Tag, Type, Vendor, SKU, Price, On sale, Subscription, Gift card - **Destination**: Country and province, Postal code, PO box, Full address Shopify shares different details with each part of checkout, so a few conditions work only in some kinds of rule: discount codes in discount rules, street address and PO box in shipping and payment rules. Playwright tells you before you publish. [Which rules can use each condition](https://playwrightapp.com/docs/conditions#on-functions). ### Install Playwright on your store Enter your store’s address. Shopify asks you to approve Playwright, then you build rules right in your Shopify admin. - Every rule template for promotions, codes, shipping and payment - Each rule checked before it goes live - One monthly price, no order limits or per-order fees - Billed through Shopify, cancel any time Install form: https://playwrightapp.com/#install. Already installed? Enter the same address to open Playwright. Installing needs the store owner or a staff member to approve Playwright in Shopify, so an agent can send them the link but can’t install it for them. ### Pricing Start free and upgrade when you need more rules. Billed through Shopify, cancel any time. #### Free: $0 forever - One rule in each area: discounts, shipping and payments - Every rule template and condition - No order limits #### Pro: $49 per month · 14-day free trial - Unlimited rules in every area - Every rule template and condition - No order limits or per-order fees - Email support Free with every feature on development and Plus sandbox stores. ### Questions #### What does Playwright do? Playwright runs your store’s checkout rules from one app: bundles, buy-one-get-one offers, tiered and VIP pricing, discount code rules, and shipping and payment options. You pick a template, set who it applies to, and publish it to Shopify checkout. #### How is Playwright different from Shopify’s built-in discounts? Shopify’s built-in discounts each handle one offer. Playwright puts promotions, discount code rules, and shipping and payment options in one place, lets one rule combine customer, cart, product and destination conditions, runs your rules in the order you set, and checks each one before it goes live. #### Do I need a developer? No. You choose a template, set who and what it applies to, and publish. Agencies use Playwright to set up rules for clients without custom development. #### What happened to Shopify Scripts? Shopify stopped running Scripts created in Script Editor on June 30, 2026, and replaced them with Shopify Functions. Playwright now publishes your rules as Shopify Functions, so they run in checkout without Script Editor. #### I built rules with Playwright for Scripts. What happens to them? They’re still saved in your Playwright account, and the Scripts edition still opens so you can see and edit them. Shopify no longer runs Scripts, though, so move to Shopify Functions to put your rules back in checkout. The Shopify Scripts page explains how. #### How much does it cost? Playwright has a free plan with one rule in each area (discounts, shipping and payments). Pro is $49 a month for unlimited rules, with a 14-day free trial. There are no order limits or per-order fees, and development and Plus sandbox stores get every feature free. #### How do I get help? Email support@playwrightapp.com. Include your store address and what you’re trying to set up. [More answers in the documentation](https://playwrightapp.com/docs/faq) ### Links - [Home](https://playwrightapp.com/) - [About](https://playwrightapp.com/about) - [Contact](https://playwrightapp.com/contact) - [Developers and API docs](https://playwrightapp.com/developers) - [Moving from Shopify Scripts](https://playwrightapp.com/shopify-scripts) - [Pricing](https://playwrightapp.com/#pricing) - [Install](https://playwrightapp.com/#install) - [Documentation](https://playwrightapp.com/docs) - [Public API (OpenAPI 3.1)](https://playwrightapp.com/openapi.json) - [Rule template catalog (JSON)](https://playwrightapp.com/api/v1/templates) - [llms.txt](https://playwrightapp.com/llms.txt) - [Terms](https://playwrightapp.com/terms) - [Privacy](https://playwrightapp.com/privacy) - Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## About Playwright Checkout Rules > Playwright Checkout Rules is a checkout rules app for Shopify: promotions, discount codes, shipping and payment options, in one place. Playwright Checkout Rules is a checkout rules app for Shopify brands. Merchants and the agencies that support them use it to run promotions and checkout customizations — bundles, buy-one-get-one offers, tiered and VIP pricing, discount code rules, and the shipping and payment options customers see — and to change them without waiting on a developer. Playwright launched in 2021 as a visual builder for Shopify Script Editor. Instead of writing Ruby, merchants picked a template, set the conditions that decide who qualifies, and combined as many rules as they needed into one script. Shopify retired Script Editor on June 30, 2026, and replaced it with Shopify Functions. Playwright now publishes the same templates and conditions as Shopify Functions, so rules run natively in Shopify checkout. Merchants who built rules for Scripts keep them and can move them across. Have a question about Playwright, a rule you can’t figure out, or a feature you need? Email support@playwrightapp.com. ### Links - [Home](https://playwrightapp.com/) - [About](https://playwrightapp.com/about) - [Contact](https://playwrightapp.com/contact) - [Developers and API docs](https://playwrightapp.com/developers) - [Moving from Shopify Scripts](https://playwrightapp.com/shopify-scripts) - [Pricing](https://playwrightapp.com/#pricing) - [Install](https://playwrightapp.com/#install) - [Documentation](https://playwrightapp.com/docs) - [Public API (OpenAPI 3.1)](https://playwrightapp.com/openapi.json) - [Rule template catalog (JSON)](https://playwrightapp.com/api/v1/templates) - [llms.txt](https://playwrightapp.com/llms.txt) - [Terms](https://playwrightapp.com/terms) - [Privacy](https://playwrightapp.com/privacy) - Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Contact Playwright Checkout Rules > Email support@playwrightapp.com for help with Playwright, billing questions or moving your rules from Shopify Scripts. The fastest way to reach us is email: support@playwrightapp.com. For help with a rule, include your store’s myshopify.com address, which rule you’re working on, and what you expected to happen. Screenshots of your rule settings help us answer in one reply. For billing questions, include your store address. Subscriptions are billed through Shopify, so charges appear on your Shopify invoice. Moving from Shopify Scripts? The Shopify Scripts page walks you through it; email us if a rule doesn’t move the way you expect. Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) ### Move your store to Shopify Functions Built rules with Playwright for Shopify Scripts? See https://playwrightapp.com/shopify-scripts. ### Links - [Home](https://playwrightapp.com/) - [About](https://playwrightapp.com/about) - [Contact](https://playwrightapp.com/contact) - [Developers and API docs](https://playwrightapp.com/developers) - [Moving from Shopify Scripts](https://playwrightapp.com/shopify-scripts) - [Pricing](https://playwrightapp.com/#pricing) - [Install](https://playwrightapp.com/#install) - [Documentation](https://playwrightapp.com/docs) - [Public API (OpenAPI 3.1)](https://playwrightapp.com/openapi.json) - [Rule template catalog (JSON)](https://playwrightapp.com/api/v1/templates) - [llms.txt](https://playwrightapp.com/llms.txt) - [Terms](https://playwrightapp.com/terms) - [Privacy](https://playwrightapp.com/privacy) - Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Shopify Scripts are retired. Your Playwright rules don’t have to be. > Shopify stopped running Scripts on June 30, 2026. Playwright still keeps your Script rules, and you can move them to Shopify Functions so they run in checkout again. If you built discounts, shipping rules or payment rules with Playwright for Shopify Scripts, here’s what changed, what still works, and how to get your rules back into checkout. ### What changed Shopify stopped running Scripts created in Script Editor on June 30, 2026. Scripts no longer change prices, shipping options or payment options at checkout, on any plan. Shopify replaced Scripts with Shopify Functions: small programs that run inside Shopify’s checkout. Every app that changed checkout with Scripts has had to move. ### What we’ve kept running Playwright for Scripts is still here. Your rules are saved, you can sign in and edit them, and Playwright still writes the script for each one. Shopify won’t run those scripts any more, so the rules don’t affect orders until you move them to Shopify Functions. ### Move to Playwright for Shopify Functions We recommend every Scripts customer moves. It’s the new version of Playwright, with the same templates and conditions, and your rules come with you. - **Your rules come with you**: Everything you built for Scripts opens in the Functions version, ready to publish. - **Publish, don’t paste**: Rules go straight to Shopify checkout. There’s no code to copy into Script Editor. - **Checked before it goes live**: Playwright checks each rule against what Shopify Functions can do and tells you what to change. - **Same price**: One plan with every rule template, billed through Shopify. ### How to move 1. Install Playwright Checkout Rules from the Shopify App Store. 2. Approve the permissions Shopify asks for: discounts, shipping and payment customizations, and checkout validation. 3. Open your rules in the app. They’re already there, ready for Shopify Functions. 4. Select Publish. Playwright tells you about any rule that needs a change first. Move form: https://playwrightapp.com/shopify-scripts#move (button: Move to Shopify Functions). ### What works differently on Shopify Functions Most rules move as they are. Shopify Functions can’t see a few things Scripts could, so rules that use them need a change before they’re published: - Whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - Cart weight and line item properties. - Comparing billing and shipping addresses. - Where a shipping rate comes from (Shopify or a carrier). Select rates by name instead. - Partial tag matches, like “tags containing VIP”. List the full tags instead. A few things also look slightly different: renamed shipping rates show the carrier name first, an order gets one shipping discount, and Shopify doesn’t let apps rename or move wallets like Shop Pay, Apple Pay or Google Pay. Discount code rules move too, and you no longer create the codes by hand: when you publish, Playwright creates every code your discount rules check for in Shopify. Shopify only accepts codes that exist, so for a wildcard or pattern like VIP-CLUB-**** list the exact codes in the rule, or create them in Shopify. Questions about moving, or a rule that doesn’t move the way you expect? Email support@playwrightapp.com with your store address and the rule’s name. ### Links - [Home](https://playwrightapp.com/) - [About](https://playwrightapp.com/about) - [Contact](https://playwrightapp.com/contact) - [Developers and API docs](https://playwrightapp.com/developers) - [Moving from Shopify Scripts](https://playwrightapp.com/shopify-scripts) - [Pricing](https://playwrightapp.com/#pricing) - [Install](https://playwrightapp.com/#install) - [Documentation](https://playwrightapp.com/docs) - [Public API (OpenAPI 3.1)](https://playwrightapp.com/openapi.json) - [Rule template catalog (JSON)](https://playwrightapp.com/api/v1/templates) - [llms.txt](https://playwrightapp.com/llms.txt) - [Terms](https://playwrightapp.com/terms) - [Privacy](https://playwrightapp.com/privacy) - Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Playwright Checkout Rules developer guide: public API > The Playwright public API: look up Shopify checkout rule templates and sign people up for early access. JSON over HTTPS, no API key, OpenAPI 3.1, problem+json errors and RateLimit headers. Playwright’s public API answers two questions for developers, agencies and AI agents: which checkout rules can Playwright build, and how does someone join early access to the Shopify Functions edition. It is a small, read-mostly JSON API over HTTPS. There are no API keys to create and no sandbox to set up: every GET request works from a browser, curl or an agent right away, and repeating a sign-up is safe. Base URL: `https://playwrightapp.com/api/v1` · OpenAPI 3.1: https://playwrightapp.com/openapi.json ### Quickstart 1. List the rule templates with GET /api/v1/templates. Add ?area=line_item, ?area=shipping or ?area=payment to narrow the list. 2. Match a merchant’s goal against each template’s description and examples to decide whether Playwright can do it. 3. Fetch one template by id with GET /api/v1/templates/{id}. 4. When a person asks to join early access, POST their own email address to /api/v1/early-access. ### Authentication None. The public API needs no API key, token or account, and read endpoints allow requests from any origin (CORS). Rules for a specific store are created inside the Playwright app in the Shopify admin and are not available through this API. ### Endpoints Every operation, with its operationId in the OpenAPI document: | Request | What it does | operationId | Rate limit | | --- | --- | --- | --- | | `GET /api/v1` | Describe the API | `getApiIndex` | 120 per 60s | | `GET /api/v1/templates` | List rule templates | `listTemplates` | 120 per 60s | | `GET /api/v1/templates/{id}` | Get one rule template | `getTemplate` | 120 per 60s | | `POST /api/v1/early-access` | Join early access | `joinEarlyAccess` | 10 per 60s | ### Example requests #### List the shipping templates (first one shown) ```sh curl -i 'https://playwrightapp.com/api/v1/templates?area=shipping' ``` ```http HTTP/2 200 Content-Type: application/json RateLimit-Policy: "read";q=120;w=60 RateLimit: "read";r=119;t=60 { "templates": [ { "id": "shipping.ShippingDiscount", "area": "shipping", "name": "Shipping Discount", "description": "Apply a shipping discount based on certain criteria", "examples": [ "Spend $50 or more and get free shipping", "10% off all DHL shipping rates" ], "categories": [ "Discount Rates" ] } ], "count": 7 } ``` #### Get one template ```sh curl 'https://playwrightapp.com/api/v1/templates/line_item.BuyXGetX' ``` ```http HTTP/2 200 Content-Type: application/json { "template": { "id": "line_item.BuyXGetX", "area": "line_item", "name": "Buy One Get One", "description": "Buy certain items to receive a discount on other items", "examples": [ "Buy one shirt, get one free", "Buy 2 shirts, get a hat free" ], "categories": [ "Buy One Get One" ] } } ``` #### Join early access (only with the person’s consent) ```sh curl -X POST 'https://playwrightapp.com/api/v1/early-access' \ -H 'Content-Type: application/json' -H 'Accept: application/json' \ -d '{"email":"merchant@example.com","shopDomain":"example-store.myshopify.com","interests":["promotions","shipping"]}' ``` ```http HTTP/2 201 Content-Type: application/json RateLimit-Policy: "signup";q=10;w=60 RateLimit: "signup";r=9;t=60 { "status": "joined", "message": "You’re on the list. We’ll email merchant@example.com when early access opens." } ``` #### An error ```sh curl 'https://playwrightapp.com/api/v1/templates/line_item.Nope' ``` ```http HTTP/2 404 Content-Type: application/problem+json { "type": "https://playwrightapp.com/openapi.json#/x-problem-types/template_not_found", "title": "Template not found", "status": 404, "detail": "There is no rule template with id \"line_item.Nope\".", "instance": "/api/v1/templates/line_item.Nope", "code": "template_not_found", "resolution": "List valid ids with GET https://playwrightapp.com/api/v1/templates. Ids look like \"line_item.BuyXGetX\" and are case-sensitive." } ``` #### Over the rate limit ```sh curl -i 'https://playwrightapp.com/api/v1/templates' ``` ```http HTTP/2 429 Content-Type: application/problem+json Retry-After: 42 RateLimit-Policy: "read";q=120;w=60 RateLimit: "read";r=0;t=42 { "type": "https://playwrightapp.com/openapi.json#/x-problem-types/rate_limited", "title": "Too many requests", "status": 429, "detail": "This client has used all 120 requests allowed every 60 seconds under the \"read\" policy.", "instance": "/api/v1/templates", "code": "rate_limited", "resolution": "Wait 42 seconds (the Retry-After header) before sending another request, and pace requests using the RateLimit header. Limits are listed at https://playwrightapp.com/developers#rate-limits." } ``` ### Errors Errors use RFC 9457 problem details with Content-Type application/problem+json. Each problem has a stable, machine-readable code and a resolution that says how to fix the request. Don’t retry a 4xx error without changing the request; a 429 or 500 can be retried later. #### Error codes | Status | code | Meaning | | --- | --- | --- | | 404 | `not_found` | No API operation exists at this path. | | 404 | `template_not_found` | No rule template has this id. | | 405 | `method_not_allowed` | The path exists but does not support this HTTP method. The Allow header lists the methods it does support. | | 400 | `invalid_parameter` | A query parameter has a value the API does not accept. | | 400 | `malformed_body` | The request body could not be parsed as JSON or form data. | | 413 | `payload_too_large` | The request body exceeds the size limit. | | 415 | `unsupported_media_type` | The request body must be application/json or application/x-www-form-urlencoded. | | 422 | `validation_failed` | One or more fields are missing or invalid. The `errors` object maps each field to a message. | | 429 | `rate_limited` | The client used up its rate limit. Wait for the number of seconds in Retry-After, then pace requests using the RateLimit header. | | 500 | `internal_error` | Something went wrong on our side. | ### Rate limits Requests are limited per client IP address. Every response carries the IETF RateLimit-Policy and RateLimit headers, so you can pace requests before you hit the limit: - `RateLimit-Policy`: the quota for this endpoint: the policy name, q requests per w seconds. - `RateLimit`: what is left: r requests remaining, t seconds until the window resets. - `Retry-After`: on a 429 response only: seconds to wait before the next request. | Policy | Limit | Applies to | | --- | --- | --- | | `"read";q=120;w=60` | 120 requests per 60 seconds, per IP address | Every other /api/v1 request (GET and HEAD) | | `"signup";q=10;w=60` | 10 requests per 60 seconds, per IP address | POST /api/v1/early-access | Over the limit, the API answers 429 Too Many Requests with a rate_limited problem. Wait for Retry-After seconds, then continue at a pace the RateLimit header allows. CORS clients can read all three headers. ### Versioning and deprecation The version is part of the URL: this is v1, served at /api/v1. New fields and new operations can be added to v1 at any time, so ignore fields you don’t recognise. Breaking changes ship as a new version under a new path. Before a v1 operation is retired, its responses carry Deprecation and Sunset headers with the dates, and the change is announced on this page and in the OpenAPI document. ### Machine-readable resources - [OpenAPI 3.1 document](https://playwrightapp.com/openapi.json): every operation, schema, error code and header - [API index](https://playwrightapp.com/api/v1): links to each operation - [llms.txt](https://playwrightapp.com/llms.txt): when and how AI agents should use Playwright - [llms-full.txt](https://playwrightapp.com/llms-full.txt): every page and the full template catalog in one file - Every page on this site is also available as Markdown: send `Accept: text/markdown`. ### Support Questions about the API, or need an operation it doesn’t have yet? Email support@playwrightapp.com. ### Links - [Home](https://playwrightapp.com/) - [About](https://playwrightapp.com/about) - [Contact](https://playwrightapp.com/contact) - [Developers and API docs](https://playwrightapp.com/developers) - [Moving from Shopify Scripts](https://playwrightapp.com/shopify-scripts) - [Pricing](https://playwrightapp.com/#pricing) - [Install](https://playwrightapp.com/#install) - [Documentation](https://playwrightapp.com/docs) - [Public API (OpenAPI 3.1)](https://playwrightapp.com/openapi.json) - [Rule template catalog (JSON)](https://playwrightapp.com/api/v1/templates) - [llms.txt](https://playwrightapp.com/llms.txt) - [Terms](https://playwrightapp.com/terms) - [Privacy](https://playwrightapp.com/privacy) - Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Playwright Checkout Rules documentation > How to use Playwright Checkout Rules: install it, build rules from templates and conditions, publish them to Shopify checkout, and what Shopify Functions can and can’t do. Playwright Checkout Rules runs your store’s checkout rules from one app in your Shopify admin: discounts and promotions, discount code rules, quantity limits, and the shipping and payment options customers see. These guides cover every template, condition and setting, and what Shopify checkout does with them. ### How rules work 1. **Pick a template.** It decides what the rule does: a bundle, a buy X get Y offer, a code rule, a shipping discount, a hidden payment option. See [Templates](https://playwrightapp.com/docs/templates). 2. **Set conditions and settings.** Conditions decide who and what the rule applies to: customer, cart, product and destination. See [Conditions](https://playwrightapp.com/docs/conditions). Then select **Save Rule**. 3. **Publish.** Playwright checks every rule against what Shopify Functions can do, tells you what to change, and publishes the rules that can run to Shopify checkout. See [Publishing](https://playwrightapp.com/docs/publishing). Rules live in three areas, each with its own tab in Playwright: **Line Item Rules** (prices, bundles, discount codes and quantity limits), **Shipping Rules** and **Payment Rules**. Within an area, rules run one after another, so a later rule sees the cart as earlier rules left it. ### Where your rules run Playwright publishes your rules as Shopify Functions, which run inside Shopify’s checkout. For each area it keeps a few discounts or customizations in your Shopify admin, named so you can find them: | Rules | In your Shopify admin | | --- | --- | | Discounts, bundles, buy X get Y, tiers, free gifts and code rules | The automatic discount “Playwright: discount rules”, plus the code discount “Playwright: discount codes” when rules check for codes | | Quantity limits | The checkout validation “Playwright: quantity limits” | | Shipping discounts and rate caps | The automatic discount “Playwright: shipping discounts” | | Hiding, renaming and reordering shipping rates | The delivery customization “Playwright: shipping rules” | | Payment rules | The payment customization “Playwright: payment rules” | > **Change rules in Playwright.** Don’t edit or delete these in Shopify: change the rule in Playwright and publish again. If one is deleted in Shopify, Playwright shows “Your discount rules are missing from Shopify checkout”; select **Publish** and it creates it again. ### Guides - **[Getting started](https://playwrightapp.com/docs/getting-started)**: Install Playwright, create a first rule, publish it and check it at checkout. - **[Templates](https://playwrightapp.com/docs/templates)**: All 23 rule templates, each with every setting, an example and what’s different on Shopify Functions. - **[Conditions](https://playwrightapp.com/docs/conditions)**: Customer, cart, product and destination conditions, all or any matching, and which rules can use each. - **[Discount codes](https://playwrightapp.com/docs/discount-codes)**: Codes created for you, wildcards, rejecting codes, stopping stacking and how codes combine. - **[BOGO and bundles](https://playwrightapp.com/docs/bogo-and-bundles)**: How buy X get Y counts, same-product buy one get one, free gifts, bundles and tiers. - **[Shipping](https://playwrightapp.com/docs/shipping)**: Hide, rename, reorder, discount and cap shipping rates. - **[Payments](https://playwrightapp.com/docs/payments)**: Hide, rename and reorder payment options. - **[Publishing](https://playwrightapp.com/docs/publishing)**: What Publish does, every pre-publish check, live status, the size limit and rule order. - **[Limits](https://playwrightapp.com/docs/limits)**: Shopify Functions limits: instructions, large carts, size, tags, codes and plans. - **[Moving from Scripts](https://playwrightapp.com/docs/moving-from-scripts)**: Move your Scripts rules to Shopify Functions and what changes. - **[FAQ](https://playwrightapp.com/docs/faq)**: Quick answers to common questions. - **[Troubleshooting](https://playwrightapp.com/docs/troubleshooting)**: What to check when a rule doesn’t do what you expect. ### Get help Email [support@playwrightapp.com](mailto:support@playwrightapp.com) with your store’s myshopify.com address, the rule’s name and what you expected to happen. Screenshots of the rule’s settings help us answer in one reply. ### Related - [Getting started](https://playwrightapp.com/docs/getting-started) - [Rule templates](https://playwrightapp.com/docs/templates) - [FAQ](https://playwrightapp.com/docs/faq) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Get started > Install Playwright Checkout Rules on your Shopify store, create your first rule, publish it and check it at checkout. Install Playwright Checkout Rules, build a first rule and see it at checkout. It takes a few minutes. ### Install Playwright 1. Go to [Install Playwright](https://playwrightapp.com/#install) and enter your store’s address, like `your-store.myshopify.com`. 2. Shopify asks you to approve Playwright and the permissions it needs: discounts, shipping and payment customizations, and checkout validation. 3. Playwright opens in your Shopify admin. Installing needs the store owner, or a staff member allowed to approve apps. Already installed? Enter the same address to open Playwright. Your subscription is billed through Shopify: see [Pricing](https://playwrightapp.com/#pricing). ### The three rule areas Switch between areas with the tabs at the top of Playwright. Each area has its own templates, its own rules and its own **Publish** button. - **Line Item Rules**: Prices and discount codes: discounts, bundles, buy X get Y, tiers, free gifts, code rules and quantity limits. - **Shipping Rules**: The shipping rates customers see: discount, cap, hide, rename and reorder them. See [Shipping rules](https://playwrightapp.com/docs/shipping). - **Payment Rules**: The payment options customers see: hide, rename and reorder them. See [Payment rules](https://playwrightapp.com/docs/payments). ### Create your first rule This example gives customers tagged `VIP` 10% off, with the [Apply Discount](https://playwrightapp.com/docs/templates/apply-discount) template. 1. Open **Line Item Rules** and choose **Apply Discount (advanced)** from the templates. 2. Give the rule a name, like “VIP 10% off”. 3. Under **Eligible Customers**, choose **Customer Tags**, then **Does**, **Match one of**, and enter `VIP`. 4. Leave **Eligible Carts in Checkout** and **Eligible Line Items in Cart** at **All**. 5. Under **Discount to apply**, choose **Percentage Discount**, enter `10` and the message “VIP 10% off”. 6. Select **Save Rule**. The rule appears in your list, marked **Active**. > **Test safely.** While you try a rule out, add a customer tag condition that only your own test customer has, like `playwright-test`. Remove it when you’re ready for everyone. ### Publish Select **Publish Line Item Rules** at the top of the page, or **Publish** in the status banner. Playwright saves what’s on screen, checks every rule, and publishes the ones that can run on Shopify Functions. A banner then says how many rules were published and lists any it left out, with the reason. Once everything is live, the banner reads “Your discount rules are live in Shopify checkout”. See [Publishing](https://playwrightapp.com/docs/publishing). ### Check it at checkout 1. Open your online store and sign in as a customer tagged `VIP` (customer conditions need Shopify to know who the customer is). 2. Add an item to the cart and go to checkout. 3. The discount shows next to the item with your message, “VIP 10% off”. Rules that use destination conditions apply once the shipping address is entered at checkout. Nothing showing? See [Troubleshooting](https://playwrightapp.com/docs/troubleshooting#discount-missing). ### Change, pause or remove a rule - Select a rule in the list to edit it, then **Save Rule** and publish again. Saved changes aren’t live until you publish. - Select the **Active** badge in the rule’s form to make it **Inactive**. Inactive rules are kept but not published. - Use the duplicate and delete buttons next to each rule in the list. ### Related - [Rule templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Rule templates > Every rule template in Playwright Checkout Rules, by area: discounts, discount codes, bundles, buy X get Y, tiers, free gifts, quantity limits, and shipping and payment rules. Every rule in Playwright Checkout Rules starts from a template: it decides what the rule does, and you set who and what it applies to. There are 23 templates in three areas. ### Line Item Rules Prices, discount codes and quantities. Every rule here except Quantity Limit publishes as one Shopify discount. - **[Apply Discount](https://playwrightapp.com/docs/templates/apply-discount)**: Give a percentage, fixed or per-item discount to the customers, carts and items you choose. It’s the most flexible discount template. - **[Apply Discount by Code](https://playwrightapp.com/docs/templates/discount-by-code)**: Give a different discount for each discount code: one list of codes, each with its own discount type and amount. - **[Wildcard Discount Code](https://playwrightapp.com/docs/templates/wildcard-discount-code)**: Give one discount for every code that fits a pattern, like VIP-CLUB-****, where each * stands for any one character. - **[Allow Discount Codes by Pattern](https://playwrightapp.com/docs/templates/discount-codes-by-pattern)**: Read the discount amount from the code itself: with the pattern PD##, the code PD15 gives 15% off. - **[Disallow All Discount Codes](https://playwrightapp.com/docs/templates/disallow-all-discount-codes)**: Turn off discount codes, for example during a sale, with a message customers understand. - **[Disallow Discount Codes](https://playwrightapp.com/docs/templates/disallow-discount-codes)**: Reject discount codes only when certain conditions match, for example for returning customers with small orders. - **[Bundles](https://playwrightapp.com/docs/templates/bundles)**: Discount a set of items bought together, like “buy the look and save 15%”. - **[Bundles with conditions](https://playwrightapp.com/docs/templates/bundles-with-conditions)**: The Bundles template with customer and cart conditions, like “10% off the Summer bundle on orders over $50”. - **[Buy One Get One](https://playwrightapp.com/docs/templates/buy-one-get-one)**: Discount items when customers buy others: buy 2 shirts, get a hat free, or buy one, get one half price. - **[Tiered Discount](https://playwrightapp.com/docs/templates/tiered-discount)**: Give bigger discounts at higher tiers: spend $100 for 10% off, $200 for 20% off. - **[Free Gift with Purchase (based on cart subtotal)](https://playwrightapp.com/docs/templates/free-gift-by-cart-subtotal)**: Make a gift item free when the cart’s subtotal is over (or under) an amount, like “spend $50, get a free scarf”. - **[Free Gift with Purchase (based on shipping address)](https://playwrightapp.com/docs/templates/free-gift-by-shipping-address)**: Make a gift item free for orders shipping to certain countries, provinces or postal codes. - **[Quantity Limit](https://playwrightapp.com/docs/templates/quantity-limit)**: Stop checkout above a set quantity of a product or variant, with a message that explains the limit. ### Shipping Rules The delivery options customers see and what they cost. - **[Shipping Discount](https://playwrightapp.com/docs/templates/shipping-discount)**: Discount shipping rates by cart value, customer, products or destination, including free shipping. - **[Cap Shipping Rates](https://playwrightapp.com/docs/templates/cap-shipping-rates)**: Set a maximum price for shipping rates, for example when an order ships from several locations and Shopify adds their rates together. - **[Hide Shipping Rates for PO Boxes](https://playwrightapp.com/docs/templates/hide-rates-for-po-boxes)**: Hide some or all shipping rates when the shipping address is a post office box. - **[Hide Shipping Rate](https://playwrightapp.com/docs/templates/hide-shipping-rates)**: Hide shipping rates for certain customers, carts, products or destinations. - **[Change Name](https://playwrightapp.com/docs/templates/rename-shipping-rates)**: Change the name customers see for shipping rates, like showing “Priority Express” as “Arrives tomorrow”. - **[Find and Replace in Name](https://playwrightapp.com/docs/templates/find-and-replace-in-rate-names)**: Replace text in shipping rate names, like changing “Express” to “Holiday Express” in every rate. - **[Reorder Rates](https://playwrightapp.com/docs/templates/reorder-shipping-rates)**: Put shipping rates in the order you want customers to see them. ### Payment Rules The payment options customers see, their names and their order. - **[Rename Payment Option](https://playwrightapp.com/docs/templates/rename-payment-options)**: Change the name customers see for a payment option, like adding guidance to a bank transfer. - **[Hide Payment Option](https://playwrightapp.com/docs/templates/hide-payment-options)**: Hide payment options for certain customers, countries, products or order sizes. - **[Reorder Payment Options](https://playwrightapp.com/docs/templates/reorder-payment-options)**: Put payment options in the order you prefer, so the one you want customers to pick comes first. ### Template names in the app In Playwright, a few templates have “(advanced)” after their name: Apply Discount, Apply Discount by Code, Allow Discount Codes by Pattern, Disallow Discount Codes and Tiered Discount. They offer more conditions, and these docs leave the suffix off. **Bundles with conditions** is called “Bundles (advanced)” in the app. The Scripts-only template “Hide Payment Option (when billing and shipping addresses differ)” isn’t listed: Shopify Functions can’t see the billing address when choosing payment methods, so it can’t run. ### Related - [Conditions](https://playwrightapp.com/docs/conditions) - [Getting started](https://playwrightapp.com/docs/getting-started) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Conditions > Every condition and selector in Playwright Checkout Rules: customer, cart, product and destination conditions, all or any matching, and which kinds of rule can use each one on Shopify Functions. Conditions decide who and what a Playwright Checkout Rules rule applies to. Combine customer, cart, product and destination conditions in one rule, and choose whether all or any of them must match. ### All or any Most templates have three places for conditions: **Eligible Customers**, **Eligible Carts in Checkout** and, in shipping and payment rules, **Eligible Line Items in Cart**. Each can be “All” (no condition), one condition, or a **Multi-Select** of up to three. - The rule’s first setting, **All or any criteria**, decides whether all of its conditions must match or any one of them. Places left at “All” aren’t counted, and a rule with no conditions applies to every cart. - **Multi-Select - Meets all criteria** matches when all of its conditions do; **Multi-Select - Meets any criteria** when any does. Use them to mix: “tagged VIP” **and** (“in Canada” **or** “in the US”). - In shipping and payment rules, the item condition is checked against the cart’s items, and **Line item qualify condition** decides whether **any** item or **every** item must match. - In discount rules, the item condition picks which items get the discount, and doesn’t decide whether the rule applies. ### Which rules can use each condition Shopify gives each part of checkout different information, so a few conditions only work in some kinds of rule. Playwright checks every rule before you publish and leaves out any rule that uses a condition Shopify can’t check there, with the reason. The kinds of rule are: - **Discount rules**: Line item rules other than quantity limits: discounts, discount code rules, bundles, buy X get Y, tiers and free gifts. Published as “Playwright: discount rules”. - **Quantity limits**: The Quantity Limit template. Published as “Playwright: quantity limits”. - **Shipping discounts**: Shipping Discount and Cap Shipping Rates. Published as “Playwright: shipping discounts”. - **Shipping option rules**: Shipping rules that hide, rename or reorder rates. Published as “Playwright: shipping rules”. - **Payment rules**: Every payment rule. Published as “Playwright: payment rules”. “Yes” works as set up, “Limited” works with the note below it, “No” isn’t published, and “–” isn’t offered in that kind of rule. #### Customer conditions | Condition | Discount rules | Quantity limits | Shipping discounts | Shipping option rules | Payment rules | | --- | --- | --- | --- | --- | --- | | Customer Email | Yes | Yes | Yes | Yes | Yes | | Customer Tags | Yes | Yes | Yes | Yes | Yes | | Customer Order Count | Yes | Yes | Yes | Yes | Yes | | Customer Total Spend | Yes | Yes | Yes | Yes | Yes | | Customer Accepts Marketing | No | No | No | No | No | #### Cart conditions | Condition | Discount rules | Quantity limits | Shipping discounts | Shipping option rules | Payment rules | | --- | --- | --- | --- | --- | --- | | Cart/Item/Discount subtotal | Yes | Yes | Yes | Yes | Yes | | Cart/Item/Line quantity | Yes | Yes | Yes | Yes | Yes | | Cart Has Items | Yes | Yes | Yes | Yes | Yes | | Cart Total Weight | No | No | No | No | No | | Cart Has Discount Code | Limited | No | Limited | No | No | | Cart Has No Discount Code | Yes | No | Yes | No | No | | Discounted Cart Subtotal (applied by discount code) | No | No | No | No | No | | Language | Yes | Yes | No | Yes | Yes | | Discounted Cart Subtotal (after this rule's discount) | Yes | Yes | – | – | – | | Exclude Discount Codes | Limited | No | – | – | – | #### Destination conditions | Condition | Discount rules | Quantity limits | Shipping discounts | Shipping option rules | Payment rules | | --- | --- | --- | --- | --- | --- | | Country/Province Qualifier | Yes | Yes | Yes | Yes | Yes | | Country Code Qualifier | Yes | Yes | Yes | Yes | Yes | | Postal or ZIP code | Yes | Yes | Yes | Yes | Yes | | PO Box Qualifier | No | No | Yes | Yes | Yes | | Full Address Qualifier | No | No | Yes | Yes | Yes | | Compare to billing address | No | No | No | No | No | #### Product conditions | Condition | Discount rules | Quantity limits | Shipping discounts | Shipping option rules | Payment rules | | --- | --- | --- | --- | --- | --- | | Product ID | Yes | Yes | Yes | Yes | Yes | | Product Type | Yes | Yes | Yes | Yes | Yes | | Product Vendor | Yes | Yes | No | Yes | Yes | | Product Tag | Yes | Yes | Yes | Yes | Yes | | Variant SKU | Yes | Yes | No | No | Yes | | Variant ID | Yes | Yes | Yes | Yes | Yes | | Has Properties | No | No | No | No | No | | Item Price | Yes | Yes | Yes | Yes | Yes | | Gift Card Selector | Yes | Yes | No | No | Yes | | Sale Item Selector | Yes | Yes | No | No | No | | Discounted Item Selector (discount by scripts) | Yes | Yes | No | No | No | | Subscription Item Selector | Yes | Yes | No | No | Yes | #### Shipping rate selectors | Condition | Discount rules | Quantity limits | Shipping discounts | Shipping option rules | Payment rules | | --- | --- | --- | --- | --- | --- | | All | – | – | Yes | Yes | – | | Rate Name | – | – | Yes | Yes | – | | Rate Code | – | – | Yes | Yes | – | | Rate Source | – | – | No | No | – | | Rate Price | – | – | Yes | Yes | – | | Rate Discounted | – | – | Yes | Yes | – | #### Payment option selectors | Condition | Discount rules | Quantity limits | Shipping discounts | Shipping option rules | Payment rules | | --- | --- | --- | --- | --- | --- | | All | – | – | – | – | Yes | | Payment Option Name | – | – | – | – | Yes | ### Customer conditions Who is checking out. Customer conditions need Shopify to know who the customer is, for example because they’re signed in to their account. - **Customer Email**: The customer’s email address does (or doesn’t) match, contain, start with or end with what you enter. Use “End with one of” and `@yourcompany.com` for staff. The customer’s side is compared as entered, so capital letters can matter. - Works in: every kind of rule. - **Customer Tags**: The customer has (or doesn’t have) one of the tags you list. On Shopify Functions, use **Match one of** and list whole tags. - Works in: every kind of rule. - “Contain one of”, “Start with one of” and “End with one of” aren’t available on Shopify Functions: tags match whole tags only. - **Customer Order Count**: How many orders the customer has placed, compared with a number. “Less than 1” means a first order. - Works in: every kind of rule. - **Customer Total Spend**: How much the customer has spent on past orders, in dollars, compared with an amount. - Works in: every kind of rule. - **Customer Accepts Marketing**: Whether the customer accepts marketing. Not available on Shopify Functions: tag those customers and use Customer Tags instead. - Not available on Shopify Functions. - Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. ### Cart conditions What’s in the cart, what it costs and which discount code was entered. - **Cart/Item/Discount subtotal**: Compares an amount, in dollars: the **cart’s current subtotal**, the subtotal of the items the rule selects, or how much the cart or the selected items have been discounted. In line item rules, “current” means after the discounts of earlier rules. - Works in: every kind of rule. - **Cart/Item/Line quantity**: Compares a quantity: the cart’s total quantity, the total of the selected items, or the quantity on any (or every) line of the selected items. - Works in: every kind of rule. - **Cart Has Items**: The cart has a quantity or subtotal of items matching a product condition you set inside it, like “at least 2 items tagged `gift-set`”. - Works in: every kind of rule. - **Cart Total Weight**: The cart’s total weight. Not available on Shopify Functions. - Not available on Shopify Functions. - Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: A discount code the customer entered does (or doesn’t) match, contain, start with or end with what you list. Exact codes in a line item rule are created in Shopify for you. See [Discount code rules](https://playwrightapp.com/docs/discount-codes). - Works in: discount rules, shipping discounts. - Not in quantity limits, shipping option rules, payment rules: Only discount rules and shipping discounts can see which discount code was entered. - Note: Only the first entered discount code is checked. - **Cart Has No Discount Code**: The customer hasn’t entered a discount code. - Works in: discount rules, shipping discounts. - Not in quantity limits, shipping option rules, payment rules: Only discount rules and shipping discounts can see which discount code was entered. - **Discounted Cart Subtotal (applied by discount code)**: The subtotal after discount codes. Not available on Shopify Functions, which can’t see a code’s value. - Not available on Shopify Functions. - Shopify Functions only see the discount code itself, not its type or value. - **Language**: The language of the customer’s checkout does (or doesn’t) match, start with or end with what you list, like `fr` or `en-CA`. - Works in: discount rules, quantity limits, shipping option rules, payment rules. - Not in shipping discounts: Language conditions aren’t available to shipping price rules on Shopify Functions. - **Discounted Cart Subtotal (after this rule's discount)**: Line item rules only: the rule’s discount is kept only if the cart’s subtotal **after** the rule meets the condition. Use it so a discount never takes a cart below an amount. - Works in: discount rules, quantity limits. - **Exclude Discount Codes**: Line item rules only: decides what happens when a customer enters a code and this rule applies. **Apply discount code only** skips the rule; **Reject discount code and apply script** rejects the code with your message and gives the rule’s discount. With **Reject all codes, except the following**, the codes you list are kept and the rule’s discount applies too; **Accept all codes, except the following** rejects only the codes you list. See [Stop discount stacking](https://playwrightapp.com/docs/discount-codes#stacking). - Works in: discount rules. - Not in quantity limits: Only discount rules and shipping discounts can see which discount code was entered. - Note: Codes are only rejected when Shopify allows it (codes from automatic-discount conflicts are kept). ### Destination conditions Where the order ships. They match once the customer enters a shipping address at checkout. - **Country/Province Qualifier**: The shipping address is (or isn’t) in the countries and provinces or states you list, by two-letter code: `CA` with `ON, QC`. - Works in: every kind of rule. - **Country Code Qualifier**: The shipping address’s country is (or isn’t) one of the two-letter codes you list, like `US` or `GB`. - Works in: every kind of rule. - **Postal or ZIP code**: The shipping postal code does (or doesn’t) match, contain, start with or end with what you list. “Start with one of” and `90` covers 90000 to 90999. - Works in: every kind of rule. - **PO Box Qualifier**: The shipping address is (or isn’t) a PO box. Shipping and payment rules only: discount rules can’t see street addresses. - Works in: shipping discounts, shipping option rules, payment rules. - Not in discount rules, quantity limits: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: The shipping address matches one of the addresses you list, by street lines, city, province, country and postal code, partly or exactly. Shipping and payment rules only. The phone number can’t be checked. - Works in: shipping discounts, shipping option rules, payment rules. - Not in discount rules, quantity limits: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Whether the billing and shipping addresses match. Not available on Shopify Functions. - Not available on Shopify Functions. - Shopify Functions can’t compare billing and shipping addresses here. ### Product conditions Which items a rule acts on (“Eligible Line Items in Cart”), and, in shipping and payment rules, which items in the cart make the rule apply. - **Product ID**: The product’s ID is (or isn’t) one you list. Find it in the product’s address in your Shopify admin. - Works in: every kind of rule. - **Product Type**: The product type is (or isn’t) one you list. - Works in: every kind of rule. - **Product Vendor**: The product’s vendor is (or isn’t) one you list. - Works in: discount rules, quantity limits, shipping option rules, payment rules. - Not in shipping discounts: Vendor conditions aren’t available to shipping price rules on Shopify Functions. - **Product Tag**: The product has (or doesn’t have) one of the tags you list. On Shopify Functions, use **Match one of** and list whole tags. - Works in: every kind of rule. - “Contain one of”, “Start with one of” and “End with one of” aren’t available on Shopify Functions: tags match whole tags only. - **Variant SKU**: The variant’s SKU does (or doesn’t) match, contain, start with or end with what you list. - Works in: discount rules, quantity limits, payment rules. - Not in shipping discounts, shipping option rules: SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - **Variant ID**: The variant’s ID is (or isn’t) one you list. - Works in: every kind of rule. - **Has Properties**: The item has custom properties you list. Not available on Shopify Functions. - Not available on Shopify Functions. - Line item properties aren’t available to Shopify Functions. - **Item Price**: The item’s price is at least, or at most, an amount in dollars. - Works in: every kind of rule. - **Gift Card Selector**: The item is (or isn’t) a gift card. - Works in: discount rules, quantity limits, payment rules. - Not in shipping discounts, shipping option rules: Gift card conditions aren’t available to shipping rules on Shopify Functions. - **Sale Item Selector**: The item is (or isn’t) on sale: it has a compare-at price above its price. - Works in: discount rules, quantity limits. - Not in shipping discounts, shipping option rules: Sale-price conditions aren’t available to shipping rules on Shopify Functions. - Not in payment rules: Sale-price conditions aren’t available to payment rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: An earlier Playwright line item rule did (or didn’t) discount the item. - Works in: discount rules, quantity limits. - Not in shipping discounts, shipping option rules, payment rules: Shipping and payment rules can’t see the discounts your line item rules gave. - **Subscription Item Selector**: The item is (or isn’t) bought on a subscription. - Works in: discount rules, quantity limits, payment rules. - Not in shipping discounts, shipping option rules: Subscription conditions aren’t available to shipping rules on Shopify Functions. ### Shipping rate selectors Which shipping rates a shipping rule changes. - **All**: Every shipping rate. - Works in: shipping discounts, shipping option rules. - **Rate Name**: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Works in: shipping discounts, shipping option rules. - **Rate Code**: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Works in: shipping discounts, shipping option rules. - **Rate Source**: Rates from a given source, such as Shopify or a carrier. Not available on Shopify Functions: select rates by name or code instead. - Not available on Shopify Functions. - The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. - **Rate Price**: Rates above or below a price, in dollars. - Works in: shipping discounts, shipping option rules. - **Rate Discounted**: Rates an earlier shipping rule did or didn’t discount. - Works in: shipping discounts, shipping option rules. ### Payment option selectors Which payment options a payment rule changes. - **All**: Every payment option. - Works in: payment rules. - **Payment Option Name**: Options whose name does (or doesn’t) match, contain, start with or end with what you enter, as customers see it at checkout. Names are compared without regard to capital letters. - Works in: payment rules. ### Tips - Tags must match whole tags. List every tag you mean, like `VIP` and `VIP-gold`, rather than “contains VIP”. - Amounts are in dollars (your store’s currency), except the shipping price cap, which is in cents. - Country and province codes are two letters: `US`, `CA`, `ON`, `NY`. - Lists like tags or IDs take room in your published rules. Each area has a [size limit](https://playwrightapp.com/docs/limits#size). ### Related - [Rule templates](https://playwrightapp.com/docs/templates) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) - [Shopify Functions limits](https://playwrightapp.com/docs/limits) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Discount code rules > How discount codes work in Playwright Checkout Rules on Shopify Functions: codes created for you as “Playwright: discount codes”, wildcards, rejecting codes, stopping stacking and how codes combine. Playwright Checkout Rules decides which codes work, for whom, and whether they stack with your offers. On Shopify Functions, codes must exist in Shopify, and Playwright creates the exact codes your rules check for. ### Code templates and conditions - [Apply Discount by Code](https://playwrightapp.com/docs/templates/discount-by-code) - [Wildcard Discount Code](https://playwrightapp.com/docs/templates/wildcard-discount-code) - [Allow Discount Codes by Pattern](https://playwrightapp.com/docs/templates/discount-codes-by-pattern) - [Disallow All Discount Codes](https://playwrightapp.com/docs/templates/disallow-all-discount-codes) - [Disallow Discount Codes](https://playwrightapp.com/docs/templates/disallow-discount-codes) Any discount rule can also check codes with the **Cart Has Discount Code**, **Cart Has No Discount Code** and **Exclude Discount Codes** cart conditions. See [Cart conditions](https://playwrightapp.com/docs/conditions#cart). ### Codes must exist in Shopify Shopify only passes a code to Playwright when it exists as a discount in Shopify. Any other code is turned away by Shopify (“Enter a valid discount code”) before your rules run. Shopify Scripts worked the same way, and merchants created each code by hand. ### Codes Playwright creates for you When you publish line item rules, Playwright collects every exact code they check for and puts them on one code discount in Shopify, “Playwright: discount codes”. That means the codes in: - [Apply Discount by Code](https://playwrightapp.com/docs/templates/discount-by-code) rows; - [Wildcard Discount Code](https://playwrightapp.com/docs/templates/wildcard-discount-code) patterns without a *; - **Cart Has Discount Code** conditions set to **Does** and **Match one of**. When a customer enters one of those codes, the code discount runs your line item rules with that code, and the automatic discount steps aside, so the cart is never discounted twice. - Codes are compared without regard to capital letters, and each is created once. - A code that already belongs to another discount in Shopify is left as it is, and keeps working with your rules. The publish result lists these as “Already discount codes in Shopify, so left as they are”. - When you remove a code from your rules and publish, Playwright deletes it from the code discount. When no rule checks for codes, the code discount is removed. - Codes you add to the code discount by hand in Shopify are removed the next time you publish. Add them to a rule instead. - Shopify adds and deletes codes in the background, so a new code can take a little while to work. ### Wildcards and patterns need exact codes Playwright can’t create every code a wildcard could match, so these settings can’t create codes: - [Wildcard Discount Code](https://playwrightapp.com/docs/templates/wildcard-discount-code) patterns with a *, like `VIP-CLUB-****`; - [Allow Discount Codes by Pattern](https://playwrightapp.com/docs/templates/discount-codes-by-pattern) patterns, like `PD##`; - **Cart Has Discount Code** set to “Contain one of”, “Start with one of” or “End with one of”. For each one, either list the exact codes in the rule (Playwright creates them), or create each code as a discount in Shopify. A code you create in Shopify gives its own discount too, so set its value with that in mind. The rule still publishes, with a warning that names the pattern. ### Rejecting codes [Disallow All Discount Codes](https://playwrightapp.com/docs/templates/disallow-all-discount-codes) rejects every code; [Disallow Discount Codes](https://playwrightapp.com/docs/templates/disallow-discount-codes) rejects codes when its conditions match. The customer sees your message, or a default one if you leave it empty. - Codes are only rejected when Shopify allows it: Shopify doesn’t let apps reject every code. - Codes your own rules check for (the codes on “Playwright: discount codes”) are never rejected. While one of them is entered, the automatic discount, which does the rejecting, steps aside. - Rules see only the first code a customer enters. ### Stop discount stacking To stop a code being used on top of a Playwright offer, add the **Exclude Discount Codes** cart condition to the offer’s rule: - **Apply discount code only**: when a code is entered, the offer doesn’t apply and the code does. - **Reject discount code and apply script**: the code is rejected with your message and the offer applies. - List codes that are exceptions: **Reject all codes, except the following** keeps the listed codes alongside the offer; **Accept all codes, except the following** rejects only the listed ones. ### How codes combine - Playwright’s line item discounts (automatic and code) are product discounts. They combine with order discounts and shipping discounts, but not with other product discounts. When another product discount applies to the same items, Shopify’s combination rules decide which one the customer gets. - Playwright’s shipping discount combines with product and order discounts, but an order gets only one shipping discount. - Shopify lets customers enter up to 5 product or order codes and one shipping code. Playwright’s rules check the first code entered. ### Codes in shipping rules Shipping discounts can check codes with **Cart Has Discount Code**, but Playwright only creates codes for line item rules. Create the codes in Shopify, or check the same exact codes in a line item rule too, which creates them. Shipping option rules (hide, rename, reorder) and payment rules can’t see codes. ### Related - [A code shows “Enter a valid discount code”](https://playwrightapp.com/docs/troubleshooting#invalid-code) - [Cart conditions](https://playwrightapp.com/docs/conditions#cart) - [Publishing](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Buy X get Y, free gifts, bundles and tiers > How Playwright Checkout Rules counts buy X get Y offers, why same-product buy one get one needs Buy 2 Get 1, how free gifts, bundles and tiered discounts work. How Playwright Checkout Rules counts the items in multi-item offers, so you can set them up to give exactly what you mean. ### How Buy One Get One counts The [Buy One Get One](https://playwrightapp.com/docs/templates/buy-one-get-one) template has a “buy” selection, a “get” selection, and three numbers: **Buy number**, **Get number** and **Maximum sets**. 1. Playwright counts the units in the cart that match the “buy” selection. 2. Sets = that count ÷ **Buy number**, rounded down, and no more than **Maximum sets** (0 means no limit). 3. It discounts sets × **Get number** units that match the “get” selection, cheapest first. 4. The cart also needs at least **Buy number** units in total. | Buy 2 shirts, get 1 hat | Shirts in cart | Hats in cart | Hats discounted | | --- | --- | --- | --- | | Buy number 2, Get number 1 | 1 | 1 | 0 | | | 2 | 1 | 1 | | | 4 | 1 | 1 (only one hat) | | | 4 | 2 | 2 | | Maximum sets 1 | 4 | 2 | 1 | ### Buy one, get one on the same product When “buy” and “get” select the same items, a unit can count as bought and as discounted. For “buy one, get one free” on the same product, use **Buy number 2** and **Get number 1**: the customer adds 2 and one of them is free. > **Don’t use Buy 1 Get 1 on the same items.** With Buy number 1 and Get number 1 on the same items, every unit makes a set and every unit is discounted: at 100%, the whole product is free. Shopify Scripts did the same. | Same product in cart | Buy 2 Get 1 at 100% | Buy 1 Get 1 at 100% | | --- | --- | --- | | 1 | None free | 1 free (all of them) | | 2 | 1 free | 2 free (all of them) | | 3 | 1 free | 3 free (all of them) | | 4 | 2 free | 4 free (all of them) | The rule in general: to give “buy N, get M” on the same items, set **Buy number** to N + M and **Get number** to M. “Buy 2, get 1 free” is Buy 3 Get 1. The customer needs all N + M units in the cart, because Shopify Functions can’t add items for them. ### Free gifts [Free Gift with Purchase (based on cart subtotal)](https://playwrightapp.com/docs/templates/free-gift-by-cart-subtotal) and [Free Gift with Purchase (based on shipping address)](https://playwrightapp.com/docs/templates/free-gift-by-shipping-address) make one unit of a gift item free once it’s in the cart. - Shopify Functions can’t add items to a cart. The customer adds the gift; Playwright makes it free. Say so on the product page, in the cart or in your promotion. - The gift’s own price counts toward the subtotal. For “spend $50, get a $10 scarf free”, set the amount to $60. - One gift per order, at 100% off unless you change the discount. ### Bundles [Bundles](https://playwrightapp.com/docs/templates/bundles) and [Bundles with conditions](https://playwrightapp.com/docs/templates/bundles-with-conditions) discount items bought together. Each bundle item is a product ID, variant ID, SKU, product type or product tag with a required quantity. - Every bundle item must be in the cart in at least its quantity. - **Apply discount to full bundles only** checked: only the units that make complete bundles are discounted. With a bundle of 1 shirt and 1 hat, a cart of 3 shirts and 1 hat gets 1 shirt and the hat discounted. - Unchecked: once there’s one full bundle, every matching unit is discounted. The same cart gets all 3 shirts and the hat discounted. - Items an earlier rule discounted don’t count toward a bundle. Product tags match whole tags. ### Tiered discounts [Tiered Discount](https://playwrightapp.com/docs/templates/tiered-discount) gives the biggest discount among the tiers the cart reaches. Tiers can measure a customer tag, the cart subtotal, the cart’s quantity, the subtotal or quantity of the selected items, or each line’s own quantity. - Subtotal tiers are whole dollars: `100` means $100. - Customer tag tiers match whole tags. - Each tier has its own message, shown with the discount. ### Using several offers together Rules run in order, and each sees the cart as earlier rules left it. All of Playwright’s line item discounts reach Shopify as one product discount, and they don’t combine with other product discounts. See [Rule order](https://playwrightapp.com/docs/publishing#rule-order) and [How codes combine](https://playwrightapp.com/docs/discount-codes#combining). ### Related - [Buy One Get One template](https://playwrightapp.com/docs/templates/buy-one-get-one) - [The shopper needs 2 in the cart](https://playwrightapp.com/docs/troubleshooting#needs-two) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Shipping rules > Shipping rules in Playwright Checkout Rules: hide, rename, reorder, discount and cap shipping rates, and the Shopify limits that apply. Show each customer the right delivery options at the right price. Playwright Checkout Rules shipping rules hide, rename, reorder, discount and cap the shipping rates Shopify offers at checkout. ### Shipping templates - [Shipping Discount](https://playwrightapp.com/docs/templates/shipping-discount) - [Cap Shipping Rates](https://playwrightapp.com/docs/templates/cap-shipping-rates) - [Hide Shipping Rates for PO Boxes](https://playwrightapp.com/docs/templates/hide-rates-for-po-boxes) - [Hide Shipping Rate](https://playwrightapp.com/docs/templates/hide-shipping-rates) - [Change Name](https://playwrightapp.com/docs/templates/rename-shipping-rates) - [Find and Replace in Name](https://playwrightapp.com/docs/templates/find-and-replace-in-rate-names) - [Reorder Rates](https://playwrightapp.com/docs/templates/reorder-shipping-rates) ### Choosing rates Every shipping template has a **Rates to Change** setting. Choose: - **All**: Every shipping rate. - **Rate Name**: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter, without regard to capital letters. Use the name customers see at checkout. - **Rate Code**: Rates by the code a carrier or shipping app gives them. - **Rate Price**: Rates above or below a price. - **Rate Discounted**: Rates an earlier shipping rule did or didn’t discount. - **Multi-Select**: Up to three of these, where all or any must match. **Rate Source** isn’t available on Shopify Functions. Local pickup options are never changed. ### Hide rates [Hide Shipping Rate](https://playwrightapp.com/docs/templates/hide-shipping-rates) hides the selected rates when its conditions match. [Hide Shipping Rates for PO Boxes](https://playwrightapp.com/docs/templates/hide-rates-for-po-boxes) does the same for PO box addresses. ### Rename rates [Change Name](https://playwrightapp.com/docs/templates/rename-shipping-rates) gives the selected rates a new name, and [Find and Replace in Name](https://playwrightapp.com/docs/templates/find-and-replace-in-rate-names) replaces text in their names (exactly as typed, capital letters included). - Shopify always shows the carrier’s name before a renamed rate. - Later rules see the new name. - A name that would be longer than 255 characters isn’t changed. ### Reorder rates [Reorder Rates](https://playwrightapp.com/docs/templates/reorder-shipping-rates) moves the rates you list into your order, matching whole names without regard to capital letters. Rates you don’t list keep their order. Keep your cheapest rate first, so customers never find a more expensive rate selected for them by default. ### Discount and cap rates [Shipping Discount](https://playwrightapp.com/docs/templates/shipping-discount) takes a percentage or a fixed amount off each selected rate; 100% is free shipping. [Cap Shipping Rates](https://playwrightapp.com/docs/templates/cap-shipping-rates) lowers any selected rate above a cap to the cap. Enter the cap in **cents**: `499` is $4.99. - Both show at checkout as a shipping discount. - Shopify gives an order one shipping discount, so “Playwright: shipping discounts” doesn’t combine with your other shipping discounts. It does combine with product and order discounts. - Shipping discounts can check discount codes that exist in Shopify. See [Codes in shipping rules](https://playwrightapp.com/docs/discount-codes#shipping-codes). ### What Shopify doesn’t allow - Renamed rates keep the carrier’s name in front. - One shipping discount per order. - Shipping rules can’t see the rate’s source, SKUs, gift cards, sale prices, subscriptions, or the discounts your line item rules gave. Shipping discounts also can’t use vendor or language conditions. See [Which rules can use each condition](https://playwrightapp.com/docs/conditions#on-functions). - Shipping option rules can’t see discount codes. ### Related - [Destination conditions](https://playwrightapp.com/docs/conditions#destination) - [Payment rules](https://playwrightapp.com/docs/payments) - [Rule order](https://playwrightapp.com/docs/publishing#rule-order) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Payment rules > Payment rules in Playwright Checkout Rules: hide, rename and reorder payment options at checkout, and why wallets like Shop Pay can’t be renamed or moved. Show the right payment options in the right order. Playwright Checkout Rules payment rules hide, rename and reorder the payment options customers see at checkout. ### Payment templates - [Rename Payment Option](https://playwrightapp.com/docs/templates/rename-payment-options) - [Hide Payment Option](https://playwrightapp.com/docs/templates/hide-payment-options) - [Reorder Payment Options](https://playwrightapp.com/docs/templates/reorder-payment-options) ### Choosing payment options Choose **All**, or **Payment Option Name**: options whose name does (or doesn’t) match, contain, start with or end with what you enter, without regard to capital letters. Use the name customers see at checkout, like `Cash on Delivery (COD)` or `Bank Deposit`. ### Wallets can’t be renamed or moved Shopify doesn’t let apps rename or move wallets such as Shop Pay, Apple Pay and Google Pay. Options shown with a logo keep their names too. Playwright still renames and moves the other options, and says so before you publish. Wallets can be hidden. ### What payment rules can’t see - Discount codes, sale prices, and the discounts your line item rules gave. - The billing address. The Scripts template that hid options when billing and shipping addresses differ can’t run on Shopify Functions. - See [Which rules can use each condition](https://playwrightapp.com/docs/conditions#on-functions) for every condition. Shopify also limits some payment changes by plan and region. Shopify’s documentation notes, for example, that changes to credit card payment methods don’t apply on stores outside Shopify Plus in the United States and Canada. Playwright doesn’t check your plan, so check Shopify’s help center for yours. ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [Conditions](https://playwrightapp.com/docs/conditions) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Publishing rules to checkout > What Publish does in Playwright Checkout Rules, every pre-publish check (blocking and warning), the live and out-of-date status, the 10,000-byte limit per area, and the order rules run in. Saved rules don’t change checkout until you publish them. When you publish, Playwright Checkout Rules checks each rule against what Shopify Functions can do and publishes the ones that can run. ### What Publish does Each area has its own **Publish** button: **Publish Line Item Rules**, **Publish Shipping Rules** or **Publish Payment Rules**. When you select it, Playwright: 1. saves the rules on screen; 2. checks every active rule (inactive rules are left out); 3. publishes the rules that pass to the area’s Shopify discounts and customizations, creating, updating or removing them as needed; 4. for line item rules that check for discount codes, creates those codes in Shopify (see [Discount code rules](https://playwrightapp.com/docs/discount-codes)); 5. shows what was published, what was left out and why. Publishing replaces what’s live for that area with every active rule that passes the checks. Rules that don’t pass are left out, and the others are still published. ### The pre-publish checks While you edit, Playwright lists what it found under “How your rules run on Shopify Functions”, and the publish result repeats it. There are two kinds of note: - **Blocking**: The rule “won’t be published”: it uses something Shopify Functions can’t check or do. Change the setting the message names and publish again. - **Warning**: The rule is published, but it behaves a little differently from Shopify Scripts, or there’s something you should know. Nothing to fix unless the difference matters to you. #### Blocking messages Every message that keeps a rule from being published: - Customer tags can only be matched exactly on Shopify Functions. Change “Contain one of” to “Match one of” and list the full tags. - Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - Product tags can only be matched exactly on Shopify Functions. Change “Contain one of” to “Match one of” and list the full tags. - Line item properties aren’t available to Shopify Functions. - Cart weight isn’t available to Shopify Functions. - Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - Shopify Functions can’t compare billing and shipping addresses here. - Shopify Functions only see the discount code itself, not its type or value. - Only discount rules and shipping discounts can see which discount code was entered. - Vendor conditions aren’t available to shipping price rules on Shopify Functions. - SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - Gift card conditions aren’t available to shipping rules on Shopify Functions. - Sale-price conditions aren’t available to shipping rules on Shopify Functions. - Shipping and payment rules can’t see the discounts your line item rules gave. - Subscription conditions aren’t available to shipping rules on Shopify Functions. - Language conditions aren’t available to shipping price rules on Shopify Functions. - The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. - Sale-price conditions aren’t available to payment rules on Shopify Functions. - Shopify Functions can’t see the billing address when choosing payment methods, so this rule can’t run. #### Warnings Every message about a rule that is published but runs differently. Messages about codes show example codes; yours show your own. - Only the first entered discount code is checked. - Codes are only rejected when Shopify allows it (codes from automatic-discount conflicts are kept). - Shopify Functions can’t change quantities. Customers over the limit see a message and can’t check out until they reduce the quantity. - An order can only get one shipping discount, so this doesn’t combine with other shipping discounts. - Functions can’t add the gift: it is only discounted when the buyer has added it. - The cap shows as a shipping discount, and an order can only get one shipping discount. - Shopify always shows the carrier name before a renamed shipping rate. - Keep your cheapest rate first: customers shouldn’t find a more expensive rate selected for them by default. - Shopify doesn’t allow renaming Shop Pay, Apple Pay, Google Pay or other wallets. - Shopify doesn’t allow moving wallets such as Shop Pay, Apple Pay and Google Pay. - Playwright creates “SUMMER10” as a discount code in Shopify when you publish, so you don’t need to create it. - Shopify only accepts codes that exist, and Playwright can’t create every code that matches “VIP-CLUB-****”. List the exact codes instead (Playwright creates them for you), or create each code as a discount in Shopify. - Shipping rules only see codes that exist in Shopify. Create “SUMMER10” as a discount in Shopify, or use the exact codes in a discount rule too (Playwright creates the codes discount rules check for). - Functions see only the discount code text, not its type, value or minimum. - The buy and get items are the same, so “Buy 1, Get 1” makes every unit free. For buy 1 get 1 free on the same product, set Buy 2 and Get 1. #### Problems that stop a publish These stop the area from publishing, or leave a rule out, until you fix them: - **Too many tags**: Your rules use 101 product tags; Shopify Functions can check at most 100. The same limit applies to customer tags. Tag conditions count a tag twice when it has capital letters, once as typed and once in lower case. - **Too large**: “These rules are too large to publish together (…). Remove or combine some rules and publish again.” See [Size limit](#size-limit). - **Permissions**: “Playwright needs permission to manage discounts and checkout customizations. Open Playwright from your Shopify admin to approve the new permissions.” - **A rule that can’t be read**: “This rule’s settings couldn’t be read. Open the rule, check its settings and save it again.” ### Live or out of date Above your rules, a banner compares what you’ve saved with what’s live in Shopify checkout: - **Your discount rules are live in Shopify checkout**: Checkout runs exactly your saved rules. (Shipping and payment say “shipping rules” and “payment rules”.) - **You have changes that aren’t live yet**: You’ve saved changes since you last published, or a publish didn’t finish. Select **Publish**. - **Publish your discount rules to run them in Shopify checkout**: Nothing from this area has been published yet. - **Your discount rules are missing from Shopify checkout**: A discount or customization Playwright published was deleted in Shopify, so checkout doesn’t run those rules. Select **Publish** and Playwright creates it again. - **Publish to remove your discount rules from Shopify checkout**: You deleted every rule in the area, but the rules you published last are still in Shopify. Select **Publish** to remove them. The banner also shows when you last published. ### Size limit Shopify passes each Function at most 10,000 bytes (about 10 kB) of settings, so the active rules of one area must fit in that space together. Long lists take the most room: product and variant IDs, tags, codes, postal codes and addresses. If an area is too large, Playwright doesn’t publish it and says how large it is. Remove rules you no longer need, make old ones inactive, or combine rules, for example one rule with a Multi-Select instead of three similar rules. ### Rule order Rules in an area run one after another, from the top of the list. Each rule sees the cart as earlier rules left it: a later rule’s “current subtotal” is after earlier discounts, **Discounted Item Selector** finds items an earlier rule discounted, and bundle items an earlier rule discounted don’t count toward a bundle. Rules run in the order the list shows. To change it, drag a rule up or down: Playwright saves the new order, and checkout uses it once you publish. Shipping rules are published to two Functions (one for prices, one for hiding, renaming and reordering), and both run every shipping rule in order. So a shipping discount after a rename sees the new name. ### Taking rules out of checkout Make a rule **Inactive** (or delete it) and publish again. When an area no longer has rules of a kind, Playwright removes its discount or customization from Shopify. To take a whole area out of checkout, delete its rules (or make them all inactive) and publish. Playwright removes the area’s discounts and customizations from Shopify and shows “Your discount rules are removed from checkout”. ### Related - [Which rules can use each condition](https://playwrightapp.com/docs/conditions) - [Shopify Functions limits](https://playwrightapp.com/docs/limits) - [Troubleshooting](https://playwrightapp.com/docs/troubleshooting) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Shopify Functions limits > The Shopify Functions limits that matter to your Playwright Checkout Rules rules: instruction budget, very large carts, input and settings size, tags, codes and plans. Shopify runs every Function within strict limits. Playwright Checkout Rules is built to stay inside them, and most stores never come close. Here’s what they are and when they matter. ### Instruction budget and very large carts Shopify stops a Function that takes more than 11 million instructions (for carts up to 200 lines; the limit grows for bigger carts). If that happens, checkout continues without that Function’s changes. Playwright’s Functions are written in Rust to stay well inside the budget. In our measurements, typical carts use well under a tenth of it, and 50-line carts up to about a quarter. The heaviest case measured, a 200-line cart with the heaviest line item rules that fit the size limit, went over in the discount Function, so Shopify would skip Playwright’s discounts for that cart. Most of the cost is Shopify reading the cart, which grows with the number of lines. > **Stores with very large carts.** Keep line item rules lean: fewer rules, shorter lists and fewer tags all help. ### Settings size The active rules of each area must fit in 10,000 bytes, about 10 kB, because Shopify passes nothing larger to a Function. Playwright checks this when you publish. See [Size limit](https://playwrightapp.com/docs/publishing#size-limit). Shopify also caps the cart information a Function receives (128 kB for carts up to 200 lines). Playwright asks for only the fields its rules use. ### Tags The rules of one area can check at most 100 product tags and 100 customer tags, counted across all its rules. Tag conditions count a tag twice when it has capital letters (as typed and in lower case). Tags must match whole tags: “contains”, “starts with” and “ends with” aren’t available. ### Discount codes - Codes must exist in Shopify. Playwright creates the exact codes your line item rules check for. See [Discount code rules](https://playwrightapp.com/docs/discount-codes). - A code can be up to 255 characters. Longer codes aren’t created. - Customers can enter up to 5 product or order codes and one shipping code; rules check the first. ### What Shopify Functions can’t do - Change quantities: quantity limits block checkout with a message instead. - Add items: free gifts are discounted once the customer adds them. - See cart weight, line item properties, whether a customer accepts marketing, the shipping rate’s source, or (in payment rules) the billing address. - Match part of a tag. - Rename or move wallets such as Shop Pay, Apple Pay and Google Pay. - Give an order more than one shipping discount. ### Discounts and customizations per store Shopify allows 25 automatic discounts per store, counting app discounts. Playwright uses at most two (“Playwright: discount rules” and “Playwright: shipping discounts”), plus the code discount “Playwright: discount codes”, one delivery customization, one payment customization and one checkout validation, however many rules you have. ### Shopify plans Playwright doesn’t check your Shopify plan. Shopify decides which plans and regions each kind of checkout customization works on, and some payment changes depend on your plan. See [Payment rules](https://playwrightapp.com/docs/payments#limits). ### Related - [Publishing](https://playwrightapp.com/docs/publishing) - [Which rules can use each condition](https://playwrightapp.com/docs/conditions#on-functions) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Moving your rules from Shopify Scripts > Shopify stopped running Scripts on June 30, 2026. How to move the rules you built with Playwright Checkout Rules to Shopify Functions, what changes and what to check. Shopify stopped running Scripts created in Script Editor on June 30, 2026. Scripts no longer change prices, shipping options or payment options at checkout, on any plan. If you built rules with Playwright for Scripts, they’re saved, and you can publish them to Shopify Functions. The [Shopify Scripts page](https://playwrightapp.com/shopify-scripts) has the short version; this guide covers the details. ### How to move 1. Go to the [Shopify Scripts page](https://playwrightapp.com/shopify-scripts#move), enter your store’s address and select **Move to Shopify Functions**. 2. Approve the permissions Shopify asks for: discounts, shipping and payment customizations, and checkout validation. 3. Open your rules in the app. They’re already there, ready for Shopify Functions. 4. Select Publish. Playwright tells you about any rule that needs a change first. ### What changes for you - You don’t paste anything into Script Editor: **Publish** sends your rules straight to checkout. See [Publishing](https://playwrightapp.com/docs/publishing). - Each area’s rules publish together to a few Shopify discounts and customizations named “Playwright: …”, not one script per area. Rules still run in order. See [Where your rules run](https://playwrightapp.com/docs#where-rules-run). - You no longer create exact discount codes by hand: Playwright creates them. Wildcard and pattern codes still need creating. See [Discount code rules](https://playwrightapp.com/docs/discount-codes). - Rules that can’t run on Shopify Functions are left out with the reason, and the rest are published. ### Settings that need a change Most rules move as they are. Shopify Functions can’t see a few things Scripts could, so rules that use them need a change before they’re published: - Whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - Cart weight and line item properties. - Comparing billing and shipping addresses. - Where a shipping rate comes from (Shopify or a carrier). Select rates by name instead. - Partial tag matches, like “tags containing VIP”. List the full tags instead. Discount rules also can’t check street addresses or PO boxes, and some product conditions aren’t available in shipping and payment rules. The full list is in [Which rules can use each condition](https://playwrightapp.com/docs/conditions#on-functions). ### Templates that run differently These templates publish, with a difference Playwright notes before you publish: | Template | On Shopify Functions | | --- | --- | | [Free Gift with Purchase (based on cart subtotal)](https://playwrightapp.com/docs/templates/free-gift-by-cart-subtotal) | Functions can’t add the gift: it is only discounted when the buyer has added it. | | [Free Gift with Purchase (based on shipping address)](https://playwrightapp.com/docs/templates/free-gift-by-shipping-address) | Functions can’t add the gift: it is only discounted when the buyer has added it. | | [Quantity Limit](https://playwrightapp.com/docs/templates/quantity-limit) | Shopify Functions can’t change quantities. Customers over the limit see a message and can’t check out until they reduce the quantity. | | [Shipping Discount](https://playwrightapp.com/docs/templates/shipping-discount) | An order can only get one shipping discount, so this doesn’t combine with other shipping discounts. | | [Cap Shipping Rates](https://playwrightapp.com/docs/templates/cap-shipping-rates) | The cap shows as a shipping discount, and an order can only get one shipping discount. | | [Change Name](https://playwrightapp.com/docs/templates/rename-shipping-rates) | Shopify always shows the carrier name before a renamed shipping rate. | | [Find and Replace in Name](https://playwrightapp.com/docs/templates/find-and-replace-in-rate-names) | Shopify always shows the carrier name before a renamed shipping rate. | | [Reorder Rates](https://playwrightapp.com/docs/templates/reorder-shipping-rates) | Keep your cheapest rate first: customers shouldn’t find a more expensive rate selected for them by default. | | [Rename Payment Option](https://playwrightapp.com/docs/templates/rename-payment-options) | Shopify doesn’t allow renaming Shop Pay, Apple Pay, Google Pay or other wallets. | | [Reorder Payment Options](https://playwrightapp.com/docs/templates/reorder-payment-options) | Shopify doesn’t allow moving wallets such as Shop Pay, Apple Pay and Google Pay. | ### What stays the same - Templates, conditions and settings are the same, and your rules keep their settings. - Rules run in the same order and do the same arithmetic as the scripts did. - Buy One Get One counts the same way: Buy 1 Get 1 on the same items made every unit free in Scripts too. See [Buy one, get one on the same product](https://playwrightapp.com/docs/bogo-and-bundles#same-items). ### After you move 1. Open each area and read the notes under “How your rules run on Shopify Functions”. 2. Fix any rule marked “won’t be published”, then publish each area. 3. Place a test order for your main offers, signed in as a customer who qualifies. ### Related - [Shopify Scripts are retired: what Scripts customers need to know](https://playwrightapp.com/shopify-scripts) - [Publishing](https://playwrightapp.com/docs/publishing) - [FAQ](https://playwrightapp.com/docs/faq) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Frequently asked questions > Answers to common questions about Playwright Checkout Rules: free gifts, buy one get one, discount codes, combining discounts, shipping names, wallets, limits and testing. Quick answers about Playwright Checkout Rules. For step-by-step fixes, see [Troubleshooting](https://playwrightapp.com/docs/troubleshooting). ### Can Playwright add a free gift to the cart? No. Shopify Functions can’t add items to a cart. Playwright makes the gift free once the customer adds it, so tell customers to add it. ### Why does my buy one, get one free offer need 2 in the cart? For the same product, set Buy number 2 and Get number 1: the customer adds 2 and one is free. Buy 1 Get 1 on the same items would make every unit free. See [Buy one, get one on the same product](https://playwrightapp.com/docs/bogo-and-bundles#same-items). ### Do I need to create discount codes in Shopify? Not for exact codes in line item rules: Playwright creates them when you publish. Codes matched by a wildcard or pattern, and codes in shipping rules, must exist in Shopify. See [Discount code rules](https://playwrightapp.com/docs/discount-codes). ### Do Playwright’s discounts combine with my other discounts? Playwright’s line item discounts combine with order and shipping discounts but not with other product discounts. Its shipping discount combines with product and order discounts, and an order gets one shipping discount. ### Why does a renamed shipping rate still show the carrier’s name? Shopify always shows the carrier’s name before a renamed rate. Playwright can’t change that. ### Can I rename or move Shop Pay, Apple Pay or Google Pay? No. Shopify doesn’t let apps rename or move wallets. You can hide them. ### How many rules can I have? There’s no fixed number. The active rules of each area must fit in about 10 kB, and long lists of IDs, tags or codes use the most room. Playwright tells you when an area is too large. ### Can I choose the order rules run in? Yes. Rules run from the top of the list down. Drag a rule to move it, then publish. See [Rule order](https://playwrightapp.com/docs/publishing#rule-order). ### Can I test a rule without customers seeing it? Add a customer tag condition only your test customer has, like `playwright-test`, publish, and check out as that customer. Remove the condition when you’re ready. ### What happens if I delete a Playwright discount in Shopify? Edit any rule in that area (renaming it is enough), save and publish: Playwright creates the discount again when the published rules change. To stop rules running, make them inactive in Playwright and publish instead of deleting anything in Shopify. ### Does Playwright work on my Shopify plan? Playwright doesn’t check your plan. Shopify decides which plans and regions each checkout customization works on, and some payment changes depend on your plan. See [Shopify plans](https://playwrightapp.com/docs/limits#plans). ### What happens to my rules if I uninstall Playwright? Uninstalling deletes the rules saved in Playwright. ### Do I need a developer? No. You choose a template, set who and what it applies to, and publish. ### Related - [Troubleshooting](https://playwrightapp.com/docs/troubleshooting) - [Questions about pricing and Playwright](https://playwrightapp.com/#faq) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Troubleshooting > Fix common problems with Playwright Checkout Rules: “Enter a valid discount code”, a discount that doesn’t show, buy one get one quantities, publish errors and sharing Function run logs. What to check when a Playwright Checkout Rules rule doesn’t do what you expect at checkout. ### A code shows “Enter a valid discount code” Shopify shows this for a code that doesn’t exist as a discount in Shopify, before Playwright’s rules run. Check: - You’ve published Line Item Rules since adding the code to a rule. - The code is an exact code (a code list row, a pattern without a *, or **Cart Has Discount Code** with **Match one of**). Wildcards and patterns aren’t created: create the code in Shopify or list it exactly. - In your Shopify admin under Discounts, “Playwright: discount codes” is active and has the code. Shopify adds codes in the background, so a new code can take a little while. - The code is for a shipping rule only: Playwright doesn’t create those. Create it in Shopify. ### A discount doesn’t show at checkout - The area’s banner says “Your discount rules are live in Shopify checkout”. If it says “You have changes that aren’t live yet”, publish. - The rule is **Active**, and wasn’t left out: look for “won’t be published” in its notes. - The customer matches: customer conditions need a signed-in customer; destination conditions need the shipping address entered at checkout. - Tags match whole tags, exactly. - An earlier rule hasn’t changed what this rule sees, for example the subtotal or an item already discounted. - Another product discount isn’t winning over Playwright’s: they don’t combine. See [How codes combine](https://playwrightapp.com/docs/discount-codes#combining). - For free gifts, the gift is in the cart. For buy X get Y, the cart has enough items. See below. - The Playwright discount is turned on in your Shopify admin under Discounts. If you turned “Playwright: discount rules” off there, turn it back on. ### The shopper needs 2 in the cart That’s how “buy one, get one free” works on the same product: with Buy number 2 and Get number 1, the customer adds 2 and pays for 1. With one in the cart there’s no set yet, and Shopify Functions can’t add the second item. Changing to Buy 1 Get 1 makes every unit free instead. See [Buy one, get one on the same product](https://playwrightapp.com/docs/bogo-and-bundles#same-items). ### Customers see “You can buy at most…” That’s a quantity limit: “You can buy at most 2 of Classic Hat”, or “You can’t buy Classic Hat” when the limit is 0. Shopify Functions can’t lower the quantity, so checkout waits until the customer does. ### A renamed shipping rate shows the carrier’s name Shopify always shows the carrier’s name before a renamed rate. Choose a new name that reads well after it. ### Shop Pay or Apple Pay didn’t change Shopify doesn’t let apps rename or move wallets, and options shown with a logo keep their names. They can be hidden. ### A rule “won’t be published” The message says what Shopify Functions can’t do with the rule as set up. Change that setting, save and publish. Every message, with what it means, is in [The pre-publish checks](https://playwrightapp.com/docs/publishing#checks). ### Publishing failed - **Permissions**: “Playwright needs permission to manage discounts and checkout customizations. Open Playwright from your Shopify admin to approve the new permissions.” Open Playwright from your Shopify admin and approve. - **Too large**: The area’s rules are over the size limit. Remove or combine rules. See [Size limit](https://playwrightapp.com/docs/publishing#size-limit). - **Too many tags**: The area checks more than 100 product or customer tags. See [Tags](https://playwrightapp.com/docs/limits#tags). - **“Shopify couldn’t find Playwright’s functions”**: This is a problem on our side. Email support@playwrightapp.com. If the message is anything else, try again in a moment, then email us with the message. ### Sharing Function run logs Shopify keeps a record of each time a Function runs, with what it received and what it did. You can’t read these records in your Shopify admin, but you can share them with Playwright so we can see exactly what happened at checkout: 1. In your Shopify admin, go to **Settings**, then **Apps and sales channels**, and open Playwright. 2. In **Share function logs**, select **Share logs**. This shares the last 24 hours of runs. 3. Email support@playwrightapp.com with your store address and the time of the test order. When a discount Function fails, Shopify also shows a warning on the Discounts page, with a link to share its runs. ### Still stuck? Email [support@playwrightapp.com](mailto:support@playwrightapp.com) with your store’s myshopify.com address, the rule’s name, what you expected and what happened. Screenshots of the rule’s settings help. ### Related - [FAQ](https://playwrightapp.com/docs/faq) - [Publishing](https://playwrightapp.com/docs/publishing) - [Contact support](https://playwrightapp.com/contact) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Apply Discount > Give a percentage, fixed or per-item discount to the customers, carts and items you choose. It’s the most flexible discount template. Every setting, a worked example and what’s different on Shopify Functions. Give a percentage, fixed or per-item discount to the customers, carts and items you choose. It’s the most flexible discount template. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When the rule’s conditions match, Playwright discounts the selected items, cheapest first, up to the maximum number of items you set. Use it for VIP and wholesale pricing, first-order offers, discounts on a collection of products, or removing tax for tax-exempt customers. For example: - 10% off the 5th order for VIP customers - No tax charged to customers tagged with 'tax-exempt' ### Settings Find it under **Line Item Rules** in Playwright, in **Other**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Apply discount if ALL of the following criteria are met - Apply discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart**: Which items in the cart get the discount: “All” items, one product condition, or a Multi-Select. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Discount to apply**: The discount to give, with the message customers see next to it at checkout. Every discount rule needs one: with “None” the rule does nothing. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. - Fixed Total Discount: Takes up to a total amount, in dollars, off the selected items. **Discount items to $0 until maximum reached** discounts one item after another until the amount is used up; **Split discount between items** spreads it over the items in proportion to their prices. - Fixed Per Item Discount: Takes a fixed amount, in dollars, off each selected unit. A price never goes below $0. - Tax Discount: Removes the tax included in the price, for customers who shouldn’t pay it when your prices include tax. Enter the tax rate your prices include, as a percentage. - **Maximum items to discount**: The most units the rule discounts in one order, cheapest first. Enter 0 for no limit. ### Example: 10% off for VIP customers 1. **Eligible Customers**: Customer Tags, Does, Match one of, `VIP`. 2. **Eligible Line Items in Cart**: All. 3. **Discount to apply**: Percentage Discount, 10, message “VIP 10% off”. 4. **Maximum items to discount**: 0. **At checkout:** A signed-in customer tagged `VIP` sees every item 10% off at checkout, labelled “VIP 10% off”. Other customers pay full price. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. It runs as it did with Shopify Scripts. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Apply Discount by Code > Give a different discount for each discount code: one list of codes, each with its own discount type and amount. Every setting, a worked example and what’s different on Shopify Functions. Give a different discount for each discount code: one list of codes, each with its own discount type and amount. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When a customer enters one of the codes on the list and the rule’s conditions match, Playwright discounts the selected items by that code’s amount. Codes are matched without regard to capital letters, and the code is shown as the discount’s message. Playwright creates each code on the list in Shopify when you publish, so you don’t create them yourself. See [Discount code rules](https://playwrightapp.com/docs/discount-codes). For example: - '10OFF' and 'HALFOFF' codes provide discount of $10 and 50% for first time customers who accept marketing ### Settings Find it under **Line Item Rules** in Playwright, in **Discount Codes**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart**: Which items in the cart get the discount: “All” items, one product condition, or a Multi-Select. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Discounts**: One row per code: the code, the discount type (**Fixed total discount** split across the selected items, **Percent discount**, **Fixed per item discount**, or **Use the discount code type**) and the amount. Each code can appear only once. ### Example: Two codes, two offers 1. **Discounts**: `10OFF` : Fixed total discount : 10, and `HALFOFF` : Percent discount : 50. 2. **Eligible Customers**: Customer Order Count, Less than, 1. **At checkout:** A first-time customer who enters `10OFF` gets $10 off the order’s items; `HALFOFF` gives them 50% off. Returning customers get nothing from either code. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Shopify Functions see only a code’s text, not the type or value it has in Shopify. A row set to **Use the discount code type** is treated as a fixed total discount of the amount you enter in that row. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Discount code rules](https://playwrightapp.com/docs/discount-codes) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Wildcard Discount Code > Give one discount for every code that fits a pattern, like VIP-CLUB-****, where each * stands for any one character. Every setting, a worked example and what’s different on Shopify Functions. Give one discount for every code that fits a pattern, like VIP-CLUB-****, where each * stands for any one character. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does A code matches when it has the same parts, separated by hyphens, of the same length as the pattern, with the same characters wherever the pattern doesn’t have a *. Capital letters don’t matter. Shopify only accepts codes that exist, and Playwright can’t create every code a wildcard could match. For a pattern with a *, list the exact codes in the rule as extra patterns without a * (Playwright creates those for you), or create each code as a discount in Shopify. For example: - $5 off when using a discount code matching pattern VIP-CLUB-ID-** ### Settings Find it under **Line Item Rules** in Playwright, in **Discount Codes**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart**: Which items in the cart get the discount: “All” items, one product condition, or a Multi-Select. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Discount to apply**: The discount to give, with the message customers see next to it at checkout. Every discount rule needs one: with “None” the rule does nothing. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. - Fixed Total Discount: Takes up to a total amount, in dollars, off the selected items. **Discount items to $0 until maximum reached** discounts one item after another until the amount is used up; **Split discount between items** spreads it over the items in proportion to their prices. - Fixed Per Item Discount: Takes a fixed amount, in dollars, off each selected unit. A price never goes below $0. - Tax Discount: Removes the tax included in the price, for customers who shouldn’t pay it when your prices include tax. Enter the tax rate your prices include, as a percentage. - **Patterns to match**: One or more patterns. Use * for any one character: `**-****` matches `AB-4321`. A pattern without a * is an exact code, and Playwright creates it in Shopify when you publish. ### Example: $5 off for club members 1. **Patterns to match**: `VIP-CLUB-0001`, `VIP-CLUB-0002`, `VIP-CLUB-0003`. 2. **Discount to apply**: Fixed Total Discount, 5, “Club member discount”. **At checkout:** Each of the three codes takes $5 off, and Playwright creates all three when you publish. With the pattern `VIP-CLUB-****` instead, Shopify would only accept the codes you had created in Shopify yourself. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Shopify only passes codes that exist in Shopify. Patterns without a * are created for you as “Playwright: discount codes” when you publish; codes that only match a pattern with a * must be created in Shopify. See [Wildcards and patterns](https://playwrightapp.com/docs/discount-codes#wildcards). These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Discount code rules](https://playwrightapp.com/docs/discount-codes) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Allow Discount Codes by Pattern > Read the discount amount from the code itself: with the pattern PD##, the code PD15 gives 15% off. Every setting, a worked example and what’s different on Shopify Functions. Read the discount amount from the code itself: with the pattern PD##, the code PD15 gives 15% off. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does Playwright looks for the pattern’s letters in the entered code and reads the number where the pattern has #. A code that matches the percentage pattern gives that percentage off; a code that matches the fixed pattern gives that many dollars off in total, split across the selected items. A code that matches neither is ignored. These codes still need to exist in Shopify: Playwright can’t create them, because the pattern stands for many codes. Create each one as a discount in Shopify. For example: - '##-OFF' activates following discount codes: 01-OFF for 1% off, 02-OFF for 2% off, etc ### Settings Find it under **Line Item Rules** in Playwright, in **Discount Codes**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart**: Which items in the cart get the discount: “All” items, one product condition, or a Multi-Select. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Percent pattern**: Letters followed by one # per digit. `PD##` reads `PD10` as 10% off. - **Fixed pattern**: Letters followed by one # per digit. `FD###` reads `FD075` as $75 off. ### Example: Percentage codes for a sales team 1. **Percent pattern**: `PD##`. 2. In Shopify, create the codes `PD05`, `PD10` and `PD15`. **At checkout:** `PD10` takes 10% off the selected items and `PD15` takes 15%. Any other code is left to Shopify. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Playwright can’t create codes from a pattern: each code must exist as a discount in Shopify, and that discount gives its own value too. See [Wildcards and patterns](https://playwrightapp.com/docs/discount-codes#wildcards). These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Discount code rules](https://playwrightapp.com/docs/discount-codes) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Disallow All Discount Codes > Turn off discount codes, for example during a sale, with a message customers understand. Every setting, a worked example and what’s different on Shopify Functions. Turn off discount codes, for example during a sale, with a message customers understand. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When a customer enters a code, Playwright rejects it and shows your message. It has no conditions: it applies to every cart. Codes your own Playwright rules check for are never rejected. See [Rejecting codes](https://playwrightapp.com/docs/discount-codes#rejecting-codes). For example: - No additional discount codes during our summer sale ### Settings Find it under **Line Item Rules** in Playwright, in **Discount Codes**. Give the rule a name, fill in these settings and select **Save Rule**. - **Message**: The message customers see when Playwright rejects their code. Leave it empty to use a default message. ### Example: No codes during the summer sale 1. **Message**: “Discount codes can’t be used during our summer sale.” **At checkout:** Any code entered at checkout is removed with that message, while your sale prices still apply. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Codes are only rejected when Shopify allows it, and codes your own rules check for are never rejected. See [Rejecting codes](https://playwrightapp.com/docs/discount-codes#rejecting-codes). ### Related - [Discount code rules](https://playwrightapp.com/docs/discount-codes) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Disallow Discount Codes > Reject discount codes only when certain conditions match, for example for returning customers with small orders. Every setting, a worked example and what’s different on Shopify Functions. Reject discount codes only when certain conditions match, for example for returning customers with small orders. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When a customer enters a code and the rule’s conditions match, Playwright rejects the code and shows your message. To stop codes stacking with a Playwright offer, you can also use the **Exclude Discount Codes** cart condition inside a discount rule. See [Stop discount stacking](https://playwrightapp.com/docs/discount-codes#stacking). For example: - No discount codes for returning customers spending less than $30 ### Settings Find it under **Line Item Rules** in Playwright, in **Discount Codes** and **Reject Discounts** and **Other**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Reject code if all qualify - Reject code if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Any or all line items**: Whether the item condition below must match **any** item in the cart or **every** item. - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Message**: The message customers see when Playwright rejects their code. Leave it empty to use a default message. ### Example: No codes on small repeat orders 1. **All or any criteria**: Reject code if all qualify. 2. **Eligible Customers**: Customer Order Count, Greater than, 0. 3. **Eligible Carts in Checkout**: Cart/Item/Discount subtotal, Cart current subtotal, Less than, 30. 4. **Message**: “Codes work on orders over $30.” **At checkout:** A returning customer with a $25 cart can’t use a code. A first order, or a $40 cart, can. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Codes are only rejected when Shopify allows it, and codes your own rules check for are never rejected. See [Rejecting codes](https://playwrightapp.com/docs/discount-codes#rejecting-codes). These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Discount code rules](https://playwrightapp.com/docs/discount-codes) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Bundles > Discount a set of items bought together, like “buy the look and save 15%”. Every setting, a worked example and what’s different on Shopify Functions. Discount a set of items bought together, like “buy the look and save 15%”. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does You list the bundle’s items and how many of each it needs. When the cart has every item in at least those quantities, Playwright discounts the bundle. Items an earlier rule already discounted don’t count toward a bundle. For example: - Buy the look and save 15% - Buy matching collar and leash and get $5 off ### Settings Find it under **Line Item Rules** in Playwright, in **Bundles**. Give the rule a name, fill in these settings and select **Save Rule**. - **Discount to apply**: The discount to give, with the message customers see next to it at checkout. Every discount rule needs one: with “None” the rule does nothing. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. - Fixed Total Discount: Takes up to a total amount, in dollars, off the selected items. **Discount items to $0 until maximum reached** discounts one item after another until the amount is used up; **Split discount between items** spreads it over the items in proportion to their prices. - Fixed Per Item Discount: Takes a fixed amount, in dollars, off each selected unit. A price never goes below $0. - Tax Discount: Removes the tax included in the price, for customers who shouldn’t pay it when your prices include tax. Enter the tax rate your prices include, as a percentage. - **Apply discount to full bundles only**: When checked, only the units that make complete bundles are discounted. When unchecked, once the cart has one full bundle, every matching item is discounted. - **Items in bundle**: One row per bundle item: what identifies it (**Product ID**, **Variant ID**, **Variant SKU**, **Product type** or **Product tag**), the matching IDs, SKUs, types or tags separated by commas, and how many the bundle needs. ### Example: Buy the look, save 15% 1. **Items in bundle**: Product tag `look-shirt` : 1, and Product tag `look-hat` : 1. 2. **Discount to apply**: Percentage Discount, 15, “Look bundle”. 3. **Apply discount to full bundles only**: checked. **At checkout:** A cart with 2 tagged shirts and 1 tagged hat makes one bundle: one shirt and the hat are 15% off, and the second shirt is full price. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. It runs as it did with Shopify Scripts. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Bundles with conditions > The Bundles template with customer and cart conditions, like “10% off the Summer bundle on orders over $50”. Every setting, a worked example and what’s different on Shopify Functions. The Bundles template with customer and cart conditions, like “10% off the Summer bundle on orders over $50”. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does It works like [Bundles](https://playwrightapp.com/docs/templates/bundles), and the bundle is only discounted when the rule’s customer and cart conditions match too. Items an earlier rule already discounted don’t count toward a bundle. For example: - Get 10% off when you buy the Summer bundle and spend more than $50 ### Settings Find it under **Line Item Rules** in Playwright, in **Bundles**. Give the rule a name, fill in these settings and select **Save Rule**. - **Any or all criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Discount to apply**: The discount to give, with the message customers see next to it at checkout. Every discount rule needs one: with “None” the rule does nothing. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. - Fixed Total Discount: Takes up to a total amount, in dollars, off the selected items. **Discount items to $0 until maximum reached** discounts one item after another until the amount is used up; **Split discount between items** spreads it over the items in proportion to their prices. - Fixed Per Item Discount: Takes a fixed amount, in dollars, off each selected unit. A price never goes below $0. - Tax Discount: Removes the tax included in the price, for customers who shouldn’t pay it when your prices include tax. Enter the tax rate your prices include, as a percentage. - **Apply discount to full bundles only**: When checked, only the units that make complete bundles are discounted. When unchecked, once the cart has one full bundle, every matching item is discounted. - **Items in bundle**: One row per bundle item: what identifies it (**Product ID**, **Variant ID**, **Variant SKU**, **Product type** or **Product tag**), the matching IDs, SKUs, types or tags separated by commas, and how many the bundle needs. ### Example: Summer bundle on bigger orders 1. **Items in bundle**: Product type `Swimwear` : 1, and Product type `Towel` : 1. 2. **Eligible Carts in Checkout**: Cart/Item/Discount subtotal, Cart current subtotal, Greater than, 50. 3. **Discount to apply**: Percentage Discount, 10, “Summer bundle”. **At checkout:** Swimwear and a towel in a $60 cart are 10% off. The same pair in a $40 cart isn’t discounted. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. It runs as it did with Shopify Scripts. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Buy One Get One > Discount items when customers buy others: buy 2 shirts, get a hat free, or buy one, get one half price. Every setting, a worked example and what’s different on Shopify Functions. Discount items when customers buy others: buy 2 shirts, get a hat free, or buy one, get one half price. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does Playwright counts the items that match the “buy” selection. Every **Buy number** of them makes one set, up to **Maximum sets**, and each set discounts **Get number** of the items that match the “get” selection, cheapest first. The cart must also hold at least **Buy number** items in total. If “buy” and “get” select the same items, an item can count both ways. For “buy one, get one free” on the same product, set **Buy number** 2 and **Get number** 1: the customer adds 2 and one is free. Buy 1 Get 1 on the same items makes every unit free. See [Buy X get Y](https://playwrightapp.com/docs/bogo-and-bundles#same-items). For example: - Buy one shirt, get one free - Buy 2 shirts, get a hat free ### Settings Find it under **Line Item Rules** in Playwright, in **Buy One Get One**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart (items to buy)**: The items customers buy to qualify: “All”, one product condition, or a Multi-Select. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Eligible Line Items in Cart (items to get)**: The items that get the discount: “All”, one product condition, or a Multi-Select. The cheapest are discounted first. - **Discount to apply**: The discount to give, with the message customers see next to it at checkout. Every discount rule needs one: with “None” the rule does nothing. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. - Fixed Total Discount: Takes up to a total amount, in dollars, off the selected items. **Discount items to $0 until maximum reached** discounts one item after another until the amount is used up; **Split discount between items** spreads it over the items in proportion to their prices. - Fixed Per Item Discount: Takes a fixed amount, in dollars, off each selected unit. A price never goes below $0. - Tax Discount: Removes the tax included in the price, for customers who shouldn’t pay it when your prices include tax. Enter the tax rate your prices include, as a percentage. - **Buy number**: How many “buy” items make one set. - **Get number**: How many “get” items each set discounts. - **Maximum sets**: The most sets discounted in one order. Enter 0 for no limit. Buy 2 Get 1 is one set. ### Example: Buy 2 shirts, get a hat free 1. **Items to buy**: Product Type, Is one of, `Shirt`. 2. **Items to get**: Product Type, Is one of, `Hat`. 3. **Discount to apply**: Percentage Discount, 100, “Free hat”. 4. **Buy number** 2, **Get number** 1, **Maximum sets** 0. **At checkout:** 4 shirts and 2 hats make 2 sets, so both hats are free. 3 shirts and 2 hats make 1 set: the cheaper hat is free. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. It runs as it did with Shopify Scripts. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Tiered Discount > Give bigger discounts at higher tiers: spend $100 for 10% off, $200 for 20% off. Every setting, a worked example and what’s different on Shopify Functions. Give bigger discounts at higher tiers: spend $100 for 10% off, $200 for 20% off. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does You choose what the tiers measure and list the tiers. Playwright finds every tier the cart reaches and gives the biggest discount among them to the selected items, with that tier’s message. With **Line Item Quantity**, each line is checked on its own: 6 of one item can reach a tier that 2 of another doesn’t. For example: - Spend $100: get 10% off - Spend $200: get 20% off - Spend $300: get 30% off ### Settings Find it under **Line Item Rules** in Playwright, in **Tiered Pricing**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart**: Which items in the cart get the discount: “All” items, one product condition, or a Multi-Select. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Discount type**: **Percentage Discount** off each selected item, a **Fixed Total Discount** in dollars split across the selected items, or a **Fixed Per Item Discount** in dollars off each unit. - **Tier type**: What the tiers measure: a **Customer Tag**, the **Cart Subtotal**, the cart’s total quantity, the subtotal or quantity of the selected items only, or each line’s own quantity. Subtotal tiers are whole dollars. - **Discount tiers**: One row per tier: what qualifies (a tag, an amount or a quantity), the discount amount, and the message customers see. ### Example: Spend more, save more 1. **Tier type**: Cart Subtotal. **Discount type**: Percentage Discount. 2. **Discount tiers**: `100` : 10 : “10% off over $100”, `200` : 20 : “20% off over $200”, `300` : 30 : “30% off over $300”. **At checkout:** A $250 cart reaches the $100 and $200 tiers, so every item is 20% off. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Customer tag tiers match whole tags only, as tag conditions do. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Free Gift with Purchase (based on cart subtotal) > Make a gift item free when the cart’s subtotal is over (or under) an amount, like “spend $50, get a free scarf”. Every setting, a worked example and what’s different on Shopify Functions. Make a gift item free when the cart’s subtotal is over (or under) an amount, like “spend $50, get a free scarf”. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When the subtotal condition matches and the gift is in the cart, Playwright discounts one unit of the gift. The gift’s own price counts toward the subtotal, so set the amount with that in mind. The discount starts at 100% with the message “Free gift with purchase!”, and you can change both. Shopify Functions can’t add items, so tell customers to add the gift themselves, for example on the product page or in your cart. For example: - Spend $50 and get a free scarf ### Settings Find it under **Line Item Rules** in Playwright, in **Free Gift with Purchase**. Give the rule a name, fill in these settings and select **Save Rule**. - **Cart Subtotal**: The amount the cart’s current subtotal must be greater than, less than or equal to, in dollars. The gift’s price is included. - **Free Gift Item**: The gift: a product or variant condition that matches it, such as its Product ID or Variant ID. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Discount and Message**: How much off the gift (100% makes it free) and the message customers see. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. ### Example: Spend $50, get a free scarf 1. **Cart Subtotal**: Greater than or equal to, 60 (the scarf is $10). 2. **Free Gift Item**: Variant ID, Is one of, the scarf’s variant ID. 3. **Discount and Message**: 100, “Free scarf over $50”. **At checkout:** A customer with $50 of other items adds the scarf, the subtotal reaches $60, and the scarf is free. Without the scarf in the cart, nothing changes. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Functions can’t add the gift: it is only discounted when the buyer has added it. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Has Properties**: Line item properties aren’t available to Shopify Functions. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Free Gift with Purchase (based on shipping address) > Make a gift item free for orders shipping to certain countries, provinces or postal codes. Every setting, a worked example and what’s different on Shopify Functions. Make a gift item free for orders shipping to certain countries, provinces or postal codes. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When the shipping address matches and the gift is in the cart, Playwright discounts one unit of the gift. The discount starts at 100% with the message “Free gift with purchase!”. Shopify Functions can’t add items, so customers add the gift themselves. Discount rules can’t see street addresses, so PO box and full address conditions aren’t available here. For example: - Canadian customers receive a free pair of mittens ### Settings Find it under **Line Item Rules** in Playwright, in **Free Gift with Purchase**. Give the rule a name, fill in these settings and select **Save Rule**. - **Eligible Cart Shipping Addresses**: Which shipping addresses qualify: by country and province, country code or postal code. See [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Free Gift Item**: The gift: a product or variant condition that matches it. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Discount and Message**: How much off the gift (100% makes it free) and the message customers see. - Percentage Discount: Takes a percentage off the price of each selected item. 100 makes it free. ### Example: Free mittens for Canada 1. **Eligible Cart Shipping Addresses**: Country Code Qualifier, Is one of, `CA`. 2. **Free Gift Item**: Product ID, Is one of, the mittens’ product ID. **At checkout:** Once a Canadian shipping address is entered at checkout, mittens in the cart are free. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: discount rules”, and as “Playwright: discount codes” when its rules check for codes. - Functions can’t add the gift: it is only discounted when the buyer has added it. These conditions aren’t available in discount rules, so a rule that uses one isn’t published: - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Buy X get Y, free gifts, bundles and tiers](https://playwrightapp.com/docs/bogo-and-bundles) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Quantity Limit > Stop checkout above a set quantity of a product or variant, with a message that explains the limit. Every setting, a worked example and what’s different on Shopify Functions. Stop checkout above a set quantity of a product or variant, with a message that explains the limit. A Playwright Checkout Rules template for cart, pricing and discount codes. ### What it does When the rule’s conditions match, Playwright checks the selected items against the limit. A customer over the limit sees “You can buy at most 2 of Classic Hat” (or “You can’t buy Classic Hat” when the limit is 0) and can’t check out until they lower the quantity. The limit applies when the conditions match. For example, with a customer tag condition that matches “Does not” `wholesale`, everyone except wholesale customers is limited. For example: - You may purchase a total of two hats in any style ### Settings Find it under **Line Item Rules** in Playwright, in **Other**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the limit to apply, or **any** one of them. Conditions left at “All” aren’t counted. - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Eligible Line Items in Cart**: Which items the limit covers. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Limit by**: **Limit by product** caps each matching product, **Limit by variant** caps each variant of it, and **Limit cart** caps all the matching items together. - **Maximum amount**: The most a customer can buy. 0 means they can’t buy the selected items at all. ### Example: Two hats per order 1. **Eligible Line Items in Cart**: Product Type, Is one of, `Hat`. 2. **Limit by**: Limit cart. **Maximum amount**: 2. **At checkout:** A customer with 3 hats sees a message at checkout and can continue once they remove one. ### On Shopify Functions Playwright publishes this template as part of the Shopify validation “Playwright: quantity limits”. - Shopify Functions can’t change quantities. Customers over the limit see a message and can’t check out until they reduce the quantity. These conditions aren’t available in quantity limits, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **PO Box Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Full Address Qualifier**: Street addresses aren’t available to discount rules. Use this condition in shipping or payment rules. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. - **Exclude Discount Codes**: Only discount rules and shipping discounts can see which discount code was entered. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Shipping Discount > Discount shipping rates by cart value, customer, products or destination, including free shipping. Every setting, a worked example and what’s different on Shopify Functions. Discount shipping rates by cart value, customer, products or destination, including free shipping. A Playwright Checkout Rules template for shipping options. ### What it does When the rule’s conditions match, Playwright takes a percentage or a fixed amount off each selected rate. The message shows with the discount at checkout. Shopify gives an order one shipping discount, so Playwright’s shipping discount doesn’t combine with your other shipping discounts. For example: - Spend $50 or more and get free shipping - 10% off all DHL shipping rates ### Settings Find it under **Shipping Rules** in Playwright, in **Discount Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Discount if ALL of the following criteria are met - Discount if ANY of the following criteria are met - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Rates to Change**: Which shipping rates to discount. With “None” the rule changes nothing. See [Choosing shipping rates](https://playwrightapp.com/docs/shipping#choosing-rates). - All: Every shipping rate. - Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published. - Rate Price: Rates above or below a price, in dollars. - Rate Discounted: Rates an earlier shipping rule did or didn’t discount. - Multi-Select - Meets all criteria: Combines up to three choices; all must match. - Multi-Select - Meets any criteria: Combines up to three choices; any can match. - **Discount to apply**: A **Percentage Discount** off each selected rate (100 makes it free) or a **Fixed Discount** in dollars off each selected rate, with the message customers see. - Percentage Discount: Takes a percentage off each selected rate. 100 makes it free. - Fixed Discount: Takes a fixed amount, in dollars, off each selected rate. ### Example: Free shipping over $50 1. **Eligible Carts in Checkout**: Cart/Item/Discount subtotal, Cart current subtotal, Greater than or equal to, 50. 2. **Rates to Change**: Rate Name, Does, Match one of, `Standard`. 3. **Discount to apply**: Percentage Discount, 100, “Free shipping over $50”. **At checkout:** Orders of $50 or more see Standard shipping at $0. Express keeps its price. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: shipping discounts”. - An order can only get one shipping discount, so this doesn’t combine with other shipping discounts. These conditions aren’t available in shipping discounts, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Product Vendor**: Vendor conditions aren’t available to shipping price rules on Shopify Functions. - **Variant SKU**: SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Gift Card Selector**: Gift card conditions aren’t available to shipping rules on Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to shipping rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Subscription Item Selector**: Subscription conditions aren’t available to shipping rules on Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. - **Language**: Language conditions aren’t available to shipping price rules on Shopify Functions. - **Rate Source**: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Cap Shipping Rates > Set a maximum price for shipping rates, for example when an order ships from several locations and Shopify adds their rates together. Every setting, a worked example and what’s different on Shopify Functions. Set a maximum price for shipping rates, for example when an order ships from several locations and Shopify adds their rates together. A Playwright Checkout Rules template for shipping options. ### What it does When the conditions match, every selected rate above the cap is discounted down to the cap. Rates already below it don’t change. The cap shows as a shipping discount, and an order gets only one shipping discount. For example: - Override combined Shopify shipping rates and cap Standard shipping at $4.99 ### Settings Find it under **Shipping Rules** in Playwright, in **Discount Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Rates to Change**: Which shipping rates to discount. With “None” the rule changes nothing. See [Choosing shipping rates](https://playwrightapp.com/docs/shipping#choosing-rates). - All: Every shipping rate. - Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published. - Rate Price: Rates above or below a price, in dollars. - Rate Discounted: Rates an earlier shipping rule did or didn’t discount. - Multi-Select - Meets all criteria: Combines up to three choices; all must match. - Multi-Select - Meets any criteria: Combines up to three choices; any can match. - **Price cap**: The highest price a selected rate can have, **in cents**: enter `499` for $4.99. ### Example: Standard shipping never over $4.99 1. **Rates to Change**: Rate Name, Does, Match one of, `Standard`. 2. **Price cap**: 499. **At checkout:** An order shipping from two warehouses, with a combined Standard rate of $12, sees Standard for $4.99. ### On Shopify Functions Playwright publishes this template as part of the Shopify discount “Playwright: shipping discounts”. - The cap shows as a shipping discount, and an order can only get one shipping discount. These conditions aren’t available in shipping discounts, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Product Vendor**: Vendor conditions aren’t available to shipping price rules on Shopify Functions. - **Variant SKU**: SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Gift Card Selector**: Gift card conditions aren’t available to shipping rules on Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to shipping rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Subscription Item Selector**: Subscription conditions aren’t available to shipping rules on Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. - **Language**: Language conditions aren’t available to shipping price rules on Shopify Functions. - **Rate Source**: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Hide Shipping Rates for PO Boxes > Hide some or all shipping rates when the shipping address is a post office box. Every setting, a worked example and what’s different on Shopify Functions. Hide some or all shipping rates when the shipping address is a post office box. A Playwright Checkout Rules template for shipping options. ### What it does When the shipping address is (or isn’t) a PO box, Playwright hides the selected rates. Use it to hide couriers that can’t deliver to PO boxes. For example: - Hide FedEx rates for customers shipping to PO Boxes - Hide all rates for PO Boxes ### Settings Find it under **Shipping Rules** in Playwright, in **Hide Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **PO Box**: Choose **Shipping Address - PO Box Qualifier** and whether the address **Is a PO Box** or **Is not a PO Box**. - **Rates to Change**: Which shipping rates to hide. With “None” the rule hides nothing. See [Choosing shipping rates](https://playwrightapp.com/docs/shipping#choosing-rates). - All: Every shipping rate. - Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published. - Rate Price: Rates above or below a price, in dollars. - Rate Discounted: Rates an earlier shipping rule did or didn’t discount. - Multi-Select - Meets all criteria: Combines up to three choices; all must match. - Multi-Select - Meets any criteria: Combines up to three choices; any can match. ### Example: No FedEx to PO boxes 1. **PO Box**: PO Box Qualifier, Is a PO Box. 2. **Rates to Change**: Rate Name, Does, Contain one of, `FedEx`. **At checkout:** A customer shipping to “PO Box 123” doesn’t see FedEx rates. Other addresses see every rate. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: shipping rules”. It runs as it did with Shopify Scripts. These conditions aren’t available in shipping option rules, so a rule that uses one isn’t published: - **Rate Source**: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Hide Shipping Rate > Hide shipping rates for certain customers, carts, products or destinations. Every setting, a worked example and what’s different on Shopify Functions. Hide shipping rates for certain customers, carts, products or destinations. A Playwright Checkout Rules template for shipping options. ### What it does When the rule’s conditions match, Playwright hides the selected rates. Local pickup options are never changed. For example: - Hide USPS rates for customers outside of the US ### Settings Find it under **Shipping Rules** in Playwright, in **Hide Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Hide if all qualify - Hide if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Rates to Change**: Which shipping rates to hide. With “None” the rule hides nothing. See [Choosing shipping rates](https://playwrightapp.com/docs/shipping#choosing-rates). - All: Every shipping rate. - Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published. - Rate Price: Rates above or below a price, in dollars. - Rate Discounted: Rates an earlier shipping rule did or didn’t discount. - Multi-Select - Meets all criteria: Combines up to three choices; all must match. - Multi-Select - Meets any criteria: Combines up to three choices; any can match. ### Example: USPS for US addresses only 1. **Eligible Carts in Checkout**: Shipping Address - Country Code Qualifier, Is not one of, `US`. 2. **Rates to Change**: Rate Name, Does, Start with one of, `USPS`. **At checkout:** Customers shipping outside the US don’t see USPS rates. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: shipping rules”. It runs as it did with Shopify Scripts. These conditions aren’t available in shipping option rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Variant SKU**: SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Gift Card Selector**: Gift card conditions aren’t available to shipping rules on Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to shipping rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Subscription Item Selector**: Subscription conditions aren’t available to shipping rules on Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. - **Rate Source**: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Change Name > Change the name customers see for shipping rates, like showing “Priority Express” as “Arrives tomorrow”. Every setting, a worked example and what’s different on Shopify Functions. Change the name customers see for shipping rates, like showing “Priority Express” as “Arrives tomorrow”. A Playwright Checkout Rules template for shipping options. ### What it does When the rule’s conditions match, every selected rate gets the new name. Later rules see the new name. Shopify always shows the carrier’s name before a renamed rate. For example: - Make 'Priority Express' show as 'Super fast shipping' ### Settings Find it under **Shipping Rules** in Playwright, in **Rename Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Change name if all qualify - Change name if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Rates to Change**: Which shipping rates to rename. With “None” the rule renames nothing. See [Choosing shipping rates](https://playwrightapp.com/docs/shipping#choosing-rates). - All: Every shipping rate. - Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published. - Rate Price: Rates above or below a price, in dollars. - Rate Discounted: Rates an earlier shipping rule did or didn’t discount. - Multi-Select - Meets all criteria: Combines up to three choices; all must match. - Multi-Select - Meets any criteria: Combines up to three choices; any can match. - **New name**: The name customers see instead. ### Example: A friendlier express name 1. **Rates to Change**: Rate Name, Does, Match one of, `Priority Express`. 2. **New name**: “Arrives tomorrow”. **At checkout:** Customers see the rate as “Arrives tomorrow”, after the carrier’s name. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: shipping rules”. - Shopify always shows the carrier name before a renamed shipping rate. These conditions aren’t available in shipping option rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Variant SKU**: SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Gift Card Selector**: Gift card conditions aren’t available to shipping rules on Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to shipping rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Subscription Item Selector**: Subscription conditions aren’t available to shipping rules on Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. - **Rate Source**: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Find and Replace in Name > Replace text in shipping rate names, like changing “Express” to “Holiday Express” in every rate. Every setting, a worked example and what’s different on Shopify Functions. Replace text in shipping rate names, like changing “Express” to “Holiday Express” in every rate. A Playwright Checkout Rules template for shipping options. ### What it does Playwright replaces every exact occurrence of the text in the selected rates’ names. The match is exact: capital letters and spaces count. Shopify always shows the carrier’s name before a renamed rate. For example: - Replace 'Express' with 'Holiday Express' in all shipping rates ### Settings Find it under **Shipping Rules** in Playwright, in **Rename Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **Rates to Change**: Which shipping rates to rename. With “None” the rule renames nothing. See [Choosing shipping rates](https://playwrightapp.com/docs/shipping#choosing-rates). - All: Every shipping rate. - Rate Name: Rates whose name does (or doesn’t) match, contain, start with or end with what you enter. Names are compared without regard to capital letters. - Rate Code: Rates whose code (the service code a carrier or shipping app gives the rate) does or doesn’t match what you enter. - Rate Source: Rates from a given source. Not available on Shopify Functions: rules that use it aren’t published. - Rate Price: Rates above or below a price, in dollars. - Rate Discounted: Rates an earlier shipping rule did or didn’t discount. - Multi-Select - Meets all criteria: Combines up to three choices; all must match. - Multi-Select - Meets any criteria: Combines up to three choices; any can match. - **Pattern to match**: The exact text to find. Capital letters and spaces count. - **Replace with**: The text to put in its place. Leave it empty to remove the text. ### Example: Holiday names 1. **Rates to Change**: All. 2. **Pattern to match**: `Express`. **Replace with**: `Holiday Express`. **At checkout:** “UPS Express” shows as “UPS Holiday Express”. A rate called “express” (lower case) doesn’t change. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: shipping rules”. - Shopify always shows the carrier name before a renamed shipping rate. These conditions aren’t available in shipping option rules, so a rule that uses one isn’t published: - **Rate Source**: The shipping rate source (Shopify or carrier) isn’t available to Shopify Functions. Select rates by name or code instead. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Reorder Rates > Put shipping rates in the order you want customers to see them. Every setting, a worked example and what’s different on Shopify Functions. Put shipping rates in the order you want customers to see them. A Playwright Checkout Rules template for shipping options. ### What it does List rate names in the order you want. Names must match the whole name customers see, though capital letters don’t matter. Rates you don’t list keep their order after (or before) the ones you do. Local pickup options keep their places. For example: - Show rates in the following order: 'USPS', 'DHL', 'UPS' ### Settings Find it under **Shipping Rules** in Playwright, in **Reorder Rates**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Reorder if all qualify - Reorder if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Order from**: **Order from first to last** puts the options you list at the top, in your order. **Order from last to first** moves them to the bottom, so the first one you list ends up last. - Order from first to last - Order from last to first - **Desired order**: Rate names, in order. Only these rates move. ### Example: Cheapest carrier first 1. **Order from**: Order from first to last. 2. **Desired order**: `USPS Ground`, `DHL Express`, `UPS Next Day`. **At checkout:** Checkout lists USPS Ground, then DHL Express, then UPS Next Day, then any other rates. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: shipping rules”. - Keep your cheapest rate first: customers shouldn’t find a more expensive rate selected for them by default. These conditions aren’t available in shipping option rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Variant SKU**: SKU conditions aren’t available to shipping rules on Shopify Functions. Select items by product or variant instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Gift Card Selector**: Gift card conditions aren’t available to shipping rules on Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to shipping rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Subscription Item Selector**: Subscription conditions aren’t available to shipping rules on Shopify Functions. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Shipping rules](https://playwrightapp.com/docs/shipping) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Rename Payment Option > Change the name customers see for a payment option, like adding guidance to a bank transfer. Every setting, a worked example and what’s different on Shopify Functions. Change the name customers see for a payment option, like adding guidance to a bank transfer. A Playwright Checkout Rules template for payment options. ### What it does When the rule’s conditions match, every selected payment option gets the new name. Shopify doesn’t let apps rename wallets such as Shop Pay, Apple Pay and Google Pay, or options shown with a logo: those keep their names while the others are renamed. For example: - Show 'Shop Pay' as 'Shop Pay (recommended)' ### Settings Find it under **Payment Rules** in Playwright, in **Rename Payment Option**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Change name if all qualify - Change name if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Select Payment Options**: Which payment options to rename: “All”, or options whose name matches. With “None” the rule changes nothing. - All: Every payment option. - Payment Option Name: Options whose name does (or doesn’t) match, contain, start with or end with what you enter, as customers see it at checkout. Names are compared without regard to capital letters. - **New name**: The name customers see instead. ### Example: Explain bank transfers 1. **Select Payment Options**: Payment Option Name, Does, Match one of, `Bank Deposit`. 2. **New name**: “Bank transfer (we ship once paid)”. **At checkout:** Customers see “Bank transfer (we ship once paid)” at checkout. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: payment rules”. - Shopify doesn’t allow renaming Shop Pay, Apple Pay, Google Pay or other wallets. These conditions aren’t available in payment rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to payment rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Payment rules](https://playwrightapp.com/docs/payments) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Hide Payment Option > Hide payment options for certain customers, countries, products or order sizes. Every setting, a worked example and what’s different on Shopify Functions. Hide payment options for certain customers, countries, products or order sizes. A Playwright Checkout Rules template for payment options. ### What it does When the rule’s conditions match, Playwright hides the selected payment options. For example: - Hide Google Pay for customers in the UK - Hide Paypal for first-time customers with orders over $50 ### Settings Find it under **Payment Rules** in Playwright, in **Hide Payment Option**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Remove if all qualify - Remove if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Select Payment Options**: Which payment options to hide: “All”, or options whose name matches. With “None” the rule hides nothing. - All: Every payment option. - Payment Option Name: Options whose name does (or doesn’t) match, contain, start with or end with what you enter, as customers see it at checkout. Names are compared without regard to capital letters. ### Example: No cash on delivery for big first orders 1. **All or any criteria**: Remove if all qualify. 2. **Eligible Customers**: Customer Order Count, Less than, 1. 3. **Eligible Carts in Checkout**: Cart/Item/Discount subtotal, Cart current subtotal, Greater than, 200. 4. **Select Payment Options**: Payment Option Name, Does, Match one of, `Cash on Delivery (COD)`. **At checkout:** A first-time customer with a $250 cart doesn’t see cash on delivery. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: payment rules”. It runs as it did with Shopify Scripts. These conditions aren’t available in payment rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to payment rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Payment rules](https://playwrightapp.com/docs/payments) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com) --- ## Reorder Payment Options > Put payment options in the order you prefer, so the one you want customers to pick comes first. Every setting, a worked example and what’s different on Shopify Functions. Put payment options in the order you prefer, so the one you want customers to pick comes first. A Playwright Checkout Rules template for payment options. ### What it does List payment option names in the order you want. Names must match the whole name customers see, though capital letters don’t matter. Options you don’t list keep their order. Shopify doesn’t let apps move wallets such as Shop Pay, Apple Pay and Google Pay. For example: - Show payment options in the following order: 'Shop Pay', 'Paypal', 'Google Pay' ### Settings Find it under **Payment Rules** in Playwright, in **Reorder Payment Options**. Give the rule a name, fill in these settings and select **Save Rule**. - **All or any criteria**: Whether **all** of the conditions you set must match for the rule to apply, or **any** one of them. Conditions left at “All” aren’t counted. See [All or any](https://playwrightapp.com/docs/conditions#all-or-any). - Reorder if all qualify - Reorder if any qualify - **Eligible Customers**: Which customers the rule applies to: “All”, one customer condition, or a Multi-Select that combines up to three. See [customer conditions](https://playwrightapp.com/docs/conditions#customer). - **Eligible Carts in Checkout**: Which carts the rule applies to: “All”, one cart or shipping address condition, or a Multi-Select that combines up to three. See [cart conditions](https://playwrightapp.com/docs/conditions#cart) and [destination conditions](https://playwrightapp.com/docs/conditions#destination). - **Line item qualify condition**: Whether the item condition below must match **any** item in the cart or **every** item. It only counts when you set an item condition. - Qualify if any item in cart matches - Qualify if all items in cart match - **Eligible Line Items in Cart**: An optional condition on the items in the cart, checked with the setting above. For example, only when the cart has a product tagged `fragile`. See [product conditions](https://playwrightapp.com/docs/conditions#products). - **Order from**: **Order from first to last** puts the options you list at the top, in your order. **Order from last to first** moves them to the bottom, so the first one you list ends up last. - Order from first to last - Order from last to first - **Desired order**: Payment option names, in order. Only these options move. ### Example: Bank transfer first 1. **Order from**: Order from first to last. 2. **Desired order**: `Bank Deposit`, `Cash on Delivery (COD)`. **At checkout:** Bank deposit is listed before cash on delivery, ahead of the other methods Shopify can move. ### On Shopify Functions Playwright publishes this template as part of the Shopify customization “Playwright: payment rules”. - Shopify doesn’t allow moving wallets such as Shop Pay, Apple Pay and Google Pay. These conditions aren’t available in payment rules, so a rule that uses one isn’t published: - **Customer Accepts Marketing**: Shopify Functions can’t see whether a customer accepts marketing. Tag those customers and use a customer tag condition instead. - **Has Properties**: Line item properties aren’t available to Shopify Functions. - **Sale Item Selector**: Sale-price conditions aren’t available to payment rules on Shopify Functions. - **Discounted Item Selector (discount by scripts)**: Shipping and payment rules can’t see the discounts your line item rules gave. - **Cart Total Weight**: Cart weight isn’t available to Shopify Functions. - **Cart Has Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Cart Has No Discount Code**: Only discount rules and shipping discounts can see which discount code was entered. - **Compare to billing address**: Shopify Functions can’t compare billing and shipping addresses here. - **Discounted Cart Subtotal (applied by discount code)**: Shopify Functions only see the discount code itself, not its type or value. Tag conditions match whole tags only. See [Conditions](https://playwrightapp.com/docs/conditions#on-functions) and [Publishing](https://playwrightapp.com/docs/publishing#checks). ### Related - [Payment rules](https://playwrightapp.com/docs/payments) - [All templates](https://playwrightapp.com/docs/templates) - [Conditions](https://playwrightapp.com/docs/conditions) - [Publishing and the pre-publish checks](https://playwrightapp.com/docs/publishing) [All documentation](https://playwrightapp.com/docs) · Email: [support@playwrightapp.com](mailto:support@playwrightapp.com)