{"id":"f0c88ce4-4b30-4895-869a-f7dfcc076ee3","task":"Implement a Shopify payment customization Function to hide a payment method based on cart total or customer tag","domain":"shopify.dev","steps":["Create a payment-customization Function using the Shopify CLI; review the run.graphql template which exposes the available paymentMethods and the cart object","Extend the input query to include the cart total price amount and, if needed, customer tags via the buyerIdentity customer field","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)","Return a FunctionResult with the hidePaymentMethods operation referencing the paymentMethod handles that should be suppressed","Create an active payment customization record via the Admin GraphQL API (paymentCustomizationCreate mutation) that links to the deployed function","Test on a development store by placing test orders with carts that should and should not trigger the hide logic"],"gotchas":["Customer tags are only available in the input query when the buyer is logged in; the customer field on buyerIdentity will be null for guest checkouts, so the function must handle the null case","Payment method handles in the input data are opaque identifiers assigned by Shopify and may differ between stores; do not hardcode handles across multiple merchant deployments","Payment customization Functions run very late in the checkout pipeline; hiding a method does not prevent a determined buyer from attempting to use it via direct API access, so server-side validation is still necessary for security-sensitive restrictions"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/f0c88ce4-4b30-4895-869a-f7dfcc076ee3"}