Getting Started with WS Checkout Control
Learn how to build, simulate, and deploy native WebAssembly Shopify Functions for payment and delivery customization.
WS Checkout Control empowers Shopify merchants to conditionally hide, rename, and reorder payment gateways, shipping rates, and pickup locations using native Shopify Functions compiled to Rust WebAssembly.
Sub-5ms Execution at the Edge
Unlike old checkout scripts, Shopify Functions execute natively inside Shopify's global edge infrastructure in < 5ms with zero external API calls or latency.
Architecture & Engine#
WS Checkout Control uses two native Shopify Function APIs:
- Payment Customization (
shopify.functions.payment_customization) - Delivery Customization (
shopify.functions.delivery_customization)
Creating Your First Rule#
Select Rule Type
Choose between Payment Customization (hide/reorder gateways like COD, Wire, PayPal) or Delivery Customization (hide/rename express shipping or local pickup).
Define Signal Conditions
Add one or more conditions: Cart Total (> $500), Customer Tags (B2B, VIP), Shipping Country, Province/State, or Postal Code ranges.
Simulate & Save
Run the built-in Polaris Rule Simulator to test the generated GraphQL payload before activating on live checkouts.
#[shopify_function]
fn run(input: input::ResponseData) -> Result<output::FunctionResult> {
let mut operations = vec![];
// Hide Cash on Delivery for orders exceeding threshold
if input.cart.cost.total_amount.amount > 500.0 {
operations.push(output::Operation::Hide(output::HideOperation {
payment_method_id: "gid://shopify/PaymentCustomizationPaymentMethod/123".into(),
}));
}
Ok(output::FunctionResult { operations })
}Pro Tip
Your tip description here.
First Step
Step description here.
Second Step
Second step description.
{% render "my-snippet" %}Have feedback or question about this guide?
Our commerce engineering studio provides direct developer assistance.