node template app

Topic summary

A developer has built a Shopify app locally using the Node.js template (not Remix) and needs help implementing subscription plans. They’re seeking guidance on Billing and Subscription APIs, payment management, and API setup.

Key Implementation Details:

  • Shopify’s billing uses GraphQL (not REST)
  • Primary mutations include:
    • appSubscriptionCreate for recurring subscriptions
    • appPurchaseOneTimeCreate for one-time charges
    • appSubscriptionCancel for cancellations

Setup Process:

  1. Create subscription plan and redirect merchants to confirmationUrl for approval
  2. After approval, Shopify redirects to returnUrl where subscription details should be activated and stored
  3. Use webhooks (e.g., APP_SUBSCRIPTIONS_UPDATE) to monitor subscription changes

Important Notes:

  • Use test: true during development
  • Shopify handles payment processing and deducts fees before merchant payout
  • Refer to GraphQL Admin API documentation for detailed implementation
Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

I have developed a Shopify app on my local system and integrated a subscription plan. The app is built using the Node.js template, not Remix. I need guidance on implementing the Billing and Subscription APIs, understanding how app payments are managed, and setting up these APIs effectively. Additionally, I seek clarity on whether the APIs used are REST or another type.

To implement Billing and Subscription APIs for your Shopify app:

  1. Use GraphQL for Billing:

    • Shopify’s billing APIs use GraphQL (not REST). Key mutations:
      • appSubscriptionCreate: Create recurring subscription plans.
      • appPurchaseOneTimeCreate: For one-time charges.
      • appSubscriptionCancel: Cancel subscriptions.
  2. Steps to Set Up:

    • Use appSubscriptionCreate to define the plan. Redirect merchants to the returned confirmationUrl for approval.
    • After approval, Shopify redirects to your returnUrl. Activate and store the subscription details.
    • Use webhooks (e.g., APP_SUBSCRIPTIONS_UPDATE) to track subscription changes.
  3. Key Notes:

    • Always use test: true during development.
    • Shopify manages payments, deducting their fee before payout.
    • Reference the GraphQL Admin API Docs for detailed queries.

Let me know if you need further clarification!

1 Like