Generate a payment customization Function extension via the Shopify CLI.
In `run.graphql`, declare the payment methods, cart total, and any buyer identity or cart attribute fields your logic uses to decide which payment methods to show or hide.
In the Function `run` body, return a `FunctionRunResult` with `operations` containing hide, rename, or move operations targeting payment method handles.
Register via the Admin GraphQL API payment customization mutation (verify name against current Shopify docs), providing the Function ID.
Test on a dev store with different cart totals and customer states to verify the correct methods appear or are suppressed.
Add monitoring via Partner Dashboard Function tracing to confirm the Function runs on every checkout payment step change.
Known gotchas
Payment method handles are provider-specific and can change if a merchant's payment provider configuration changes. Query the handle dynamically from the input rather than hard-coding strings.
Hiding all available payment methods will block checkout entirely for affected buyers. Always preserve at least one visible payment method or add a fallback condition.
Payment customization Functions respect Shopify's plan-level restrictions — certain payment customization capabilities may require a Shopify Plus plan. Verify eligibility with the merchant before building.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp