#Lucas974
1 messages ยท Page 1 of 1 (latest)
Hi there
Hello @bronze totem
I'm not intimately familiar with next.js but it uses React, right?
Yes, this is full stack React
Gotcha, then yeah you want https://github.com/stripe/react-stripe-js which is React Stripe.js and Stripe.js
Yep
If you are using npm then you would npm install @stripe/react-stripe-js @stripe/stripe-js
And what's about the "stripe" dependencie? also needed in my usage?
Yes you need that for your server-side requests to the Stripe API
and in production, I will need to use the stripe cli running in background on my VPS?
No you should not be using the CLI in production
The CLI is really only for aiding in testing
Yes webhooks are recommended and you should have a server endpoint for your webhook.
ok I understand better now
As I noted, I'm not super familiar with Next JS but if you google Stripe and Next JS there are lots of examples of folks building Stripe integrations using Next JS
and regarding the invoicing, I wish to allow user to download their invoice in PDF
Could you explain me how to proceed?
The invoice object has a PDF url included:
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@knotty niche how you confident with Next.js?
I'm somewhat familiar, whats the issue you're having with it?
I wish to sell a digital product and allow user to download his invoice.
This will be a one time payment
I need to install these 3 packages?
"@stripe/react-stripe-js": "1.13.0",
"@stripe/stripe-js": "1.42.0",
"stripe": "10.14.0"
Or just stripe-js and stripe is enough?
stripe is for the back end only, the other two are for your front end
Those are the only direct Stripe dependencies for a typical integration
so in my case, "@stripe/stripe-js" and "stripe" woulbe ok
To be honest, I'm trying to build my own saas myself, this is the cross and the banner ๐
I'm sysadmin, learning dev
If you're using react (and next.js does), you'll likely want the react package as well
You can take a look at this example project that might provide you some ideas about how to do what you're looking for: https://github.com/stripe-archive/nextjs-typescript-react-stripe-js