Create a Stripe Customer with POST /v1/customers on your server, storing the Stripe customer_id alongside your Shopify customer record
Create a SetupIntent with POST /v1/setup_intents (usage=off_session) to collect and save a payment method before charging
On the storefront, initialize Stripe.js and mount the Payment Element to a div; confirm setup with stripe.confirmSetup() passing the client_secret from the SetupIntent
On the setup_intent.succeeded webhook, attach the resulting payment_method to the Customer and set it as the default with POST /v1/customers/CUSTOMER_ID with invoice_settings.default_payment_method
Create the subscription server-side with POST /v1/subscriptions using the Stripe customer_id, price ID, and payment_settings.payment_method_types; set collection_method=charge_automatically
Handle customer.subscription.trial_will_end (fires 3 days before trial ends by default) to prompt payment method confirmation if none is on file
Known gotchas
Using checkout.liquid for subscription flows is no longer supported — Shopify deprecated checkout.liquid and subscription checkouts require either Shopify Subscriptions/selling plans or a custom storefront approach
SetupIntent with usage=off_session is required for recurring charges; a PaymentIntent without this flag may prompt SCA for every renewal
Stripe webhook events must be verified using the Stripe-Signature header with your webhook signing secret — raw request body must be passed to stripe.webhooks.constructEvent() before parsing
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