{
  "id": "stripe-launch",
  "provider": "stripe",
  "title": "Configure Stripe billing",
  "steps": [
    {
      "id": "stripe-dashboard",
      "title": "Stripe dashboard",
      "instruction": "Open Stripe. For development, turn Test mode ON.",
      "openUrl": "https://dashboard.stripe.com/"
    },
    {
      "id": "stripe-keys",
      "title": "API keys",
      "instruction": "Copy test (or live) keys into .env. Never commit secret keys.",
      "openUrl": "https://dashboard.stripe.com/test/apikeys",
      "pasteTarget": {
        "file": ".env",
        "keys": ["STRIPE_SECRET_KEY", "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY"]
      }
    },
    {
      "id": "stripe-product",
      "title": "Product and price",
      "instruction": "Create a product with a recurring price for your Pro or paid tier.",
      "openUrl": "https://dashboard.stripe.com/test/products"
    },
    {
      "id": "stripe-price-id",
      "title": "Price ID",
      "instruction": "Copy the Price ID (price_...) into .env as STRIPE_PRICE_ID."
    },
    {
      "id": "stripe-webhook",
      "title": "Webhook endpoint",
      "instruction": "Add endpoint URL: {APP_URL}/api/webhooks/stripe (replace {APP_URL} with your Vercel URL).",
      "openUrl": "https://dashboard.stripe.com/test/webhooks"
    },
    {
      "id": "stripe-webhook-events",
      "title": "Webhook events",
      "instruction": "Subscribe to these events at minimum.",
      "events": [
        "checkout.session.completed",
        "customer.subscription.updated",
        "customer.subscription.deleted",
        "invoice.payment_failed"
      ]
    },
    {
      "id": "stripe-signing-secret",
      "title": "Signing secret",
      "instruction": "Copy the webhook signing secret into .env as STRIPE_WEBHOOK_SECRET.",
      "pasteTarget": {
        "file": ".env",
        "keys": ["STRIPE_WEBHOOK_SECRET"]
      }
    },
    {
      "id": "stripe-test-event",
      "title": "Test event",
      "instruction": "Use Send test event on the Stripe webhook endpoint and confirm a successful 2xx delivery for checkout.session.completed before launch.",
      "openUrl": "https://dashboard.stripe.com/test/webhooks"
    }
  ]
}
