---
title: "Shopify Scripts Guide 2026 - Dynamic Pricing, Discounts & Shipping for Plus Merchants"
description: "Complete guide to Shopify Scripts for Plus merchants: line item scripts for dynamic pricing and BOGO, shipping scripts for custom rates, payment scripts, and migration to Shopify Functions. With code examples and ROI data."
url: https://easyappsecom.com/guides/shopify-plus-scripts-guide.html
date: 2026-03-19
---

# Shopify Scripts Guide 2026 — Dynamic Pricing, Discounts & Shipping for Plus Merchants

By Jack Smith · Updated March 19, 2026 · 22 min read



TL;DR: Shopify Scripts let Plus merchants write custom Ruby code that modifies cart pricing, shipping options, and payment methods in real time. Use cases include BOGO deals, tiered quantity discounts, loyalty-based pricing, custom shipping rules, and payment method filtering. Merchants using Scripts for dynamic pricing report 10-25% higher AOV. Scripts are being succeeded by Shopify Functions (Rust/WebAssembly) for better performance, but both remain available in 2026.







Standard Shopify discount codes are limited. You can create percentage discounts, fixed-amount discounts, and free shipping codes — but you cannot create "buy 3 get the cheapest free," tiered volume pricing, customer-tag-based discounts, or conditional shipping rules. Shopify Scripts unlock all of these and more.

Scripts are small Ruby programs that run on Shopify's servers every time the cart or checkout is loaded. They execute in real time, modifying prices, shipping options, and payment methods before the customer sees them. The customer sees the final result — they never see the original price being modified by code behind the scenes.


## What Are Shopify Scripts?

Shopify Scripts are Plus-exclusive Ruby programs that run server-side to modify cart contents, shipping options, and payment methods in real time. They enable dynamic pricing (BOGO, tiered discounts, loyalty pricing), custom shipping rules (free shipping for specific products, hidden methods), and payment filtering (hide COD above $500). Scripts execute in 10-50ms and have zero impact on page load speed.

Scripts are managed through the Script Editor app in your Shopify admin. The editor provides a code environment with syntax highlighting, a console for testing, and version history. Each script type (line item, shipping, payment) is managed independently.


## Three Types of Scripts




Script Type
What It Modifies
When It Runs



Line Item ScriptsCart item prices, quantities, propertiesEvery cart update
Shipping ScriptsAvailable shipping methods and ratesAt checkout shipping step
Payment ScriptsAvailable payment methodsAt checkout payment step




## Line Item Scripts — Dynamic Pricing

Line item scripts are the most powerful and most commonly used script type. They modify the price, properties, or quantity of items in the cart before the customer checks out. Here are the major use case categories:


### BOGO (Buy One Get One)

Create buy-one-get-one-free, buy-two-get-one-half-off, or buy-X-get-Y-free promotions. Unlike basic discount codes, BOGO scripts can automatically identify the cheapest item in the cart and apply the discount to it, handle mixed-product BOGOs (buy any shirt, get any hat free), and stack with other promotions.


### Tiered Volume Discounts

Offer automatic discounts based on the quantity of items in the cart. Example: buy 2-4 items get 10% off, buy 5-9 items get 15% off, buy 10+ items get 25% off. This is one of the most effective AOV-boosting strategies — customers see the next discount tier and add items to qualify. Stores using tiered volume discounts report 15-30% higher average order values.


### Customer-Tag-Based Pricing

Offer different pricing based on customer tags. VIP customers (tagged by Shopify Flow) get 10% off everything. Wholesale customers get 40% off. Employee accounts get 50% off. First-time buyers get free shipping. Tags are assigned automatically through Flow automations, creating a seamless personalized pricing engine.


### Bundle Pricing

When customers add a specific combination of products to their cart, automatically apply bundle pricing. Example: a camera body at $899 + a lens at $499 + a bag at $79 = $1,199 as a bundle instead of $1,477 separately. The script detects the combination and adjusts prices automatically.


### Spend Threshold Discounts

Apply automatic discounts when the cart reaches a spending threshold. Spend $100 get 10% off, spend $200 get 15% off, spend $500 get 20% off. This works beautifully alongside an [EA Free Shipping Bar](https://apps.shopify.com/ea-free-shipping-bar) showing progress toward the threshold.


## Shipping Scripts — Custom Delivery Rules

Shipping scripts modify the shipping options available at checkout. They can hide, rename, reorder, or reprice shipping methods based on cart contents, customer data, or order value.


### Common Shipping Script Patterns


- **Free shipping for specific products** — Items tagged "free-shipping" always ship free regardless of order total
- **Hide overnight for heavy items** — Remove overnight shipping option for items weighing over 50 lbs
- **Discounted shipping for VIPs** — Reduce all shipping rates by 50% for customers with the "VIP" tag
- **Rename shipping methods** — Change "Standard Shipping (5-7 days)" to "Free Standard Delivery" when order qualifies for free shipping
- **Local delivery only** — For specific products (perishables, furniture), only show local delivery options
- **Expedited default for high-value orders** — Pre-select express shipping for orders above $300



## Payment Scripts — Checkout Control

Payment scripts control which payment methods are available at checkout. This is critical for risk management, B2B orders, and regional compliance.


### Common Payment Script Patterns


- **Hide COD above threshold** — Remove cash-on-delivery option for orders above $500 to reduce fraud risk
- **Show purchase orders for B2B** — Display "Purchase Order" payment option only for customers tagged as "wholesale"
- **Hide installment options for low-value orders** — Remove buy-now-pay-later options for orders under $50 where installments do not make sense
- **Reorder payment methods** — Show Shopify Payments first, followed by PayPal, then Apple Pay, to maximize conversion on your preferred gateway
- **Regional payment methods** — Show iDEAL for Netherlands customers, Bancontact for Belgium, Klarna for Sweden



## 20 Script Examples by Use Case


Key Stat: The most impactful scripts by AOV increase are: tiered volume discounts (+15-30% AOV), spend threshold discounts (+20-35% AOV), and bundle pricing (+10-20% AOV). Combining a tiered discount script with an [EA Free Shipping Bar](https://apps.shopify.com/ea-free-shipping-bar) that shows progress toward the next tier is the highest-ROI configuration we have seen.




### Conversion-Focused Scripts


- **Buy 2 Get 1 Free** — Automatically discount the cheapest item to $0 when 3+ items are in cart
- **Tiered Percentage Discount** — 10% off 2 items, 15% off 3 items, 20% off 4+ items
- **Spend $100 Save $15** — Fixed discount when cart exceeds threshold
- **Free Gift at $75** — Auto-add a free product when cart reaches $75 (works with [EA Auto Free Gift & Rewards Bar](https://apps.shopify.com/ea-rewards-bar))
- **First-Order Discount** — 15% off for customers with 0 previous orders



### Loyalty and Retention Scripts


- **VIP Auto-Discount** — 10% off everything for customers tagged "VIP"
- **Birthday Discount** — 20% off during the customer's birthday month
- **Repeat Buyer Reward** — 5% off for customers with 3+ previous orders
- **Win-Back Pricing** — 25% off for customers who have not ordered in 90+ days
- **Employee Pricing** — 50% off for customers tagged "employee"



### Operational Scripts


- **Maximum Discount Cap** — Ensure total discounts never exceed 30% regardless of stacked codes
- **Exclude Sale Items** — Prevent discount codes from applying to products already on sale
- **Category-Specific Discounts** — 20% off collection "Summer Sale" only
- **Minimum Purchase Enforcement** — Block discount codes unless order meets $50 minimum
- **Product Pairing Discount** — 15% off accessories when purchased with a main product



### Shipping and Payment Scripts


- **Free Shipping Over $75** — Remove shipping charges for qualifying orders
- **Hide Overnight for Oversized** — Remove express options for heavy/bulky items
- **VIP Free Express** — Free express shipping for customers tagged "VIP"
- **Hide COD Over $500** — Risk management for high-value COD orders
- **B2B Payment Methods** — Show net terms and PO payment only for wholesale customers



## Scripts vs. Shopify Functions

Shopify Functions are the modern successor to Scripts, using Rust compiled to WebAssembly instead of Ruby. Here is how they compare:




Aspect
Scripts (Legacy)
Functions (Modern)



LanguageRubyRust / WebAssembly
Execution speed10-50ms<5ms
Where managedScript Editor appShopify CLI / App
Version controlBuilt-inGit-based
TestingConsole in editorUnit tests
Shopify recommendationMaintained, not deprecatedPreferred for new builds




## Performance and Limitations

Scripts run server-side and have zero impact on page load speed. They execute only when the cart or checkout is loaded. Execution times of 10-50ms are imperceptible to customers. However, Scripts do have limitations: they cannot access external APIs, they cannot modify the storefront UI, they have limited access to historical customer data, and they run in a sandboxed Ruby environment with restricted libraries.

For UI-level changes (showing the customer how close they are to a discount tier), combine Scripts with front-end apps like the [EA Free Shipping Bar](https://apps.shopify.com/ea-free-shipping-bar) or [EA Auto Free Gift & Rewards Bar](https://apps.shopify.com/ea-rewards-bar). Scripts handle the pricing logic; apps handle the visual communication.


## ROI of Dynamic Pricing




Script Strategy
AOV Impact
Annual Value ($3M store)



Tiered volume discounts+15-30%$450,000-$900,000
Spend threshold discounts+20-35%$600,000-$1,050,000
BOGO promotions+10-20%$300,000-$600,000
VIP loyalty pricing+5-10% LTV$150,000-$300,000




## Apps That Complement Scripts

Scripts handle the pricing logic, but customers need to see and understand the promotions. The [EasyApps Ecommerce](https://apps.shopify.com/partners/ea-apps) suite provides the front-end visibility:


- **[EA Free Shipping Bar](https://apps.shopify.com/ea-free-shipping-bar)** — Shows progress toward the free shipping threshold that Scripts enforce at checkout. Customers see "Spend $23 more for free shipping!" while Scripts handle the actual shipping discount.
- **[EA Auto Free Gift & Rewards Bar](https://apps.shopify.com/ea-rewards-bar)** — Displays tiered reward progress while Scripts manage the automatic gift addition and pricing.
- **[EA Announcement Bar](https://apps.shopify.com/ea-announcement-bar-upsell)** — Communicates active promotions: "Buy 3 Get 1 Free — This Week Only!" while Scripts handle the discount calculation.
- **[EA Countdown Timer](https://apps.shopify.com/ea-countdown-bar)** — Creates urgency around time-limited Script-powered promotions.
- **[EA Upsell & Cross-Sell](https://apps.shopify.com/ea-upsell-popups-cross-sell)** — Suggests products that complete a bundle or push the customer into the next discount tier.




## Frequently Asked Questions


### Are Shopify Scripts only available on Shopify Plus?
Yes, Shopify Scripts are exclusive to Shopify Plus. Standard plans cannot use Scripts. This is a key differentiator that justifies the Plus subscription for merchants needing dynamic pricing, complex discount logic, or custom shipping and payment rules.


### What programming language are Shopify Scripts written in?
Scripts are written in Ruby, running in a sandboxed environment on Shopify's servers. Shopify Functions, the modern successor, use Rust compiled to WebAssembly for better performance. New implementations should consider Functions.


### Can Shopify Scripts stack with discount codes?
Yes, Scripts can work alongside discount codes, override them, or cap maximum discounts. You have full control over how Scripts interact with other discounts, including setting maximum discount caps that prevent abuse.


### Do Shopify Scripts affect page load speed?
No. Scripts run server-side during cart and checkout operations, not during page load. Execution time is 10-50ms — imperceptible to customers. Functions are even faster at under 5ms.


### Should I use Shopify Scripts or Shopify Functions?
For new builds in 2026, Shopify recommends Functions. They are faster, more maintainable, and part of the Checkout Extensibility framework. Existing Scripts continue to work without a deprecation date. No urgent need to migrate working Scripts.





## Make Scripts Visible to Customers — Free

Scripts handle the pricing logic. EasyApps handles the front-end: free shipping bars, reward progress, countdown timers, and announcement bars — all free.

[Browse All EasyApps](https://apps.shopify.com/partners/ea-apps)
