#penguin420_
1 messages · Page 1 of 1 (latest)
Hi there
hey!
So with Subscriptions you don't create the PaymentIntents directly. You create. Subscription object and pass the relevant Price ID.
Have you taken a look at https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements ?
Subscriptions require Customer objects
It is part of how the API is constructed that a Subscription is associated to a Customer object. If you want, you can just create an empty Customer object prior to creating the Subscription.
can i create that on the same file backend?
since it is nextjs and i can check if a user is logged in
and get the email
and is this and shipping required
address: {
city: 'Brothers',
country: 'US',
line1: '27 Fredrick Ave',
postal_code: '97712',
state: 'CA',
},
it is a digital product
i want to keep it like this no other inputs
Yep you can do all of that on the backend
No need for anything from the customer in that case. I would recommend passing the email that you have to the Customer object when you create it.
the email , when the user signs up for my website, i can just pass that right
no need for them to put it in