Implement a Shopify payment customization Function to hide a payment method based on cart total or customer tag

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. Create a payment-customization Function using the Shopify CLI; review the run.graphql template which exposes the available paymentMethods and the cart object
  2. Extend the input query to include the cart total price amount and, if needed, customer tags via the buyerIdentity customer field
  3. In the run function, evaluate the condition (for example, hide a payment method when cart total exceeds a threshold or when the customer does not have a specific tag)
  4. Return a FunctionResult with the hidePaymentMethods operation referencing the paymentMethod handles that should be suppressed
  5. Create an active payment customization record via the Admin GraphQL API (paymentCustomizationCreate mutation) that links to the deployed function
  6. Test on a development store by placing test orders with carts that should and should not trigger the hide logic

Known gotchas

Related routes

Build a Shopify Function for payment customization to reorder, rename, or hide payment methods at checkout
ecommerce-ops · 6 steps · unrated
Write a Shopify Function for delivery customization that hides or reorders shipping methods based on cart contents
shopify.dev · 6 steps · unrated
Build a Shopify Function for delivery customization to reorder, rename, or hide shipping methods at checkout
ecommerce-ops · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans