Handle a Shopify SubscriptionContract billing attempt failure and trigger a dunning retry via the Subscriptions API

domain: shopify.dev · 5 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. Subscribe to the subscription_billing_attempts/failure webhook topic in Shopify to receive real-time failure events
  2. On receipt, parse the subscriptionBillingAttempt object to extract errorCode and nextActionUrl if present
  3. Determine retry eligibility by checking the contract's status field via the subscriptionContract GraphQL query; do not retry if status is PAUSED or CANCELLED
  4. Issue a new billing attempt using the subscriptionBillingAttemptCreate mutation with the contract GID and idempotencyKey set to a unique retry identifier
  5. After a configurable number of failures, call subscriptionContractUpdate mutation to set status to PAUSED and send a dunning email with a payment update link

Known gotchas

Related routes

Trigger a Shopify subscription billing attempt and implement dunning retries via subscriptionBillingAttemptCreate
ecommerce-ops · 6 steps · unrated
Handle Shopify subscription contract billing attempts and dunning via the Subscriptions API
shopify.dev · 6 steps · unrated
Register and handle Shopify webhooks for subscription billing attempt success and failure events
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