#Lucas974

1 messages ยท Page 1 of 1 (latest)

tepid barnBOT
bronze totem
#

Hi there

tawdry ivy
#

Hello @bronze totem

bronze totem
#

I'm not intimately familiar with next.js but it uses React, right?

tawdry ivy
#

Yes, this is full stack React

bronze totem
tawdry ivy
#

i will need also @stripe/stripe-js

#

no ?

bronze totem
#

Yep

#

If you are using npm then you would npm install @stripe/react-stripe-js @stripe/stripe-js

tawdry ivy
#

And what's about the "stripe" dependencie? also needed in my usage?

bronze totem
#

Yes you need that for your server-side requests to the Stripe API

tawdry ivy
#

and in production, I will need to use the stripe cli running in background on my VPS?

bronze totem
#

No you should not be using the CLI in production

#

The CLI is really only for aiding in testing

tawdry ivy
#

ok

#

But I will need to use a webhook??

bronze totem
#

Yes webhooks are recommended and you should have a server endpoint for your webhook.

tawdry ivy
#

ok I understand better now

bronze totem
#

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

tawdry ivy
#

and regarding the invoicing, I wish to allow user to download their invoice in PDF
Could you explain me how to proceed?

knotty niche
#

The invoice object has a PDF url included:

tawdry ivy
#

@knotty niche how you confident with Next.js?

knotty niche
#

I'm somewhat familiar, whats the issue you're having with it?

tawdry ivy
#

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?

knotty niche
#

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

tawdry ivy
#

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

knotty niche
#

If you're using react (and next.js does), you'll likely want the react package as well

tawdry ivy
#

Already see this ๐Ÿ™‚

#

merci qd mm ๐Ÿ™‚