nicoalbanese / kirimase

Build full-stack Next.js apps, incredibly fast
https://kirimase.dev
MIT License
2.37k stars 107 forks source link

Having trouble with Stripe subscription webhook in testing #149

Closed navidre closed 4 months ago

navidre commented 4 months ago

Config File Please copy the contents of your kirimase.config.json file. { "hasSrc": false, "packages": [ "shadcn-ui", "drizzle", "next-auth", "resend", "stripe" ], "preferredPackageManager": "pnpm", "t3": false, "alias": "@", "analytics": true, "rootPath": "", "componentLib": "shadcn-ui", "driver": "pg", "provider": "supabase", "orm": "drizzle", "auth": "next-auth" }

Describe the bug A clear and concise description of what the bug is. The payment processes in testing; however, the status of the user does not get updated to be a subscribed person.

To Reproduce Steps to reproduce the behavior:

  1. Choosing a plan
  2. Filing test credit card info
  3. Stripe CLI is running in another terminal
  4. Payment successful
  5. User is still asked to subscribe

Expected behavior A clear and concise description of what you expected to happen. Expected behavior is to have a person subscribed and show them their subscription plan

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

paulks-software commented 4 months ago

same here : { "hasSrc": true, "packages": [ "shadcn-ui", "prisma", "lucia", "trpc", "resend", "stripe" ], "preferredPackageManager": "pnpm", "t3": false, "alias": "@", "analytics": true, "rootPath": "src/", "componentLib": "shadcn-ui", "provider": "planetscale", "orm": "prisma", "driver": "mysql", "auth": "lucia" }

paulks-software commented 4 months ago

In my case i was writing only stripe listen, but i had to add flags, C:/stripe/stripe.exe listen --forward-to localhost:3000/api/webhooks/stripe then it works

navidre commented 4 months ago

I think pnpm run stripe:listen should work as of definition: "stripe:listen": "stripe listen --forward-to localhost:3000/api/webhooks/stripe"

For me, running stripe CLI and then running the server worked! Not sure what the problem was, but seems to be resolved now!