#suraj-patidar_best-practices

1 messages ¡ Page 1 of 1 (latest)

silver monolithBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1438448120106061915

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

mellow heath
#

You can use SetupIntents

peak dagger
#

if i use then i need to redirect on checkout page ?

#

for the save details of card ?

mellow heath
peak dagger
#

Then the flow would be: create a setup intent, provide the setup intent ID to checkout, in checkout, the user will see the card details, and we will save? it right

mellow heath
#

What you mean by "checkout" hear exactly ? Stripe Checkout Session or you frontend checkout page with PaymentElement ?

mellow heath
peak dagger
#

okay

#

But in guide it says about Compliance
so we don't want to save card details on our system

mellow heath
#

You want get any raw Card details, you just store the PaymentMethod Id, the compliance part is about how you'll be using the saved PaymentMethod later

silver monolithBOT
peak dagger
#

okay but if amount is 0 then checkout work ?

mellow heath
#

What you mean by amount is 0 ?

#

Can you provide a concrete example ? What step are you referring to ?

ember light
#

Hey, taking over here

peak dagger
#

thank you

#

i am following guide and get back to u

#

one more thing

#

we have PRO and EXPERT Plan so can i need to create price object of stripe

#

becuasae we use stripe checkout session for purchase plan

ember light
#

Generally PRO and EXPERT would be different Product (prod_xxx) objects each with different prices for each interval

peak dagger
#

Generally PRO and EXPERT would be different Product (prod_xxx) objects each with different prices for each interval

yes so this price object i need to create on stripe before provide plan for purching to checkout session ?

ember light
#

Yes, Checkout expects price_xxx ID objects in the line items. But you can't create a Price without a Product first

silver monolithBOT
peak dagger
#

okay then i need to create 4 products right

ember light
#

Why 4?

peak dagger
#

for cover intervals

#

monthly and annually

ember light
#

Then no, you'd create two products (PRO and EXPERT) and two prices for each (monthly, yearly)

peak dagger
#

okay done

#

all things possible using apis right ? and attached that price id to plan

#

Thank you so much

#

should i create free plan product and prices or not require

ember light
#

That's an implementation detail. Do you want Stripe to track free users of your product? If so then you'd create a free price and generate subscriptions for them, useful to track people who convert from free to a paid plan