#pybuche_api

1 messages ยท Page 1 of 1 (latest)

prisma coralBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260159259044347967

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

mental onyx
#

๐Ÿ‘‹ happy to help

#

I'm not sure what you're trying to achieve by using both PaymentIntents and InvoiceItems

#

if you want to create an Invoice you don't need to use the PaymentIntent API since the Invoice will have an underlying one once it's finalized

wise harness
#

๐Ÿ‘‹ Thanks for the quick answer! I'm agnostic with the way to do things, I thought that the way to do things using Stripe Elements was to create a payment intent, but if I can do this with an invoice, let's do it ๐Ÿ™‚

mental onyx
#

it really depends on what you want to achieve

wise harness
#

It's in french, but just answer anything you want, go through the questionnaire and you'll end up to the stripe elements after sign up

mental onyx
#

so if we forget about how to implement this

#

could you describe what are you trying to achieve here?

wise harness
#

Sure ๐Ÿ™‚

#

The app is a questionnaire-based medical app. Based on your answers, it generates prescriptions, validated by a doctor in the back office

#

The user flow is:

  1. Answer questions
  2. Login/SignUp
  3. Pay
mental onyx
#

ok let's focus on the payment now

wise harness
#

The payment is a single product. My constraints are:

  1. I want to use Stripe Elements in the frontend
  2. My client wants to control the price of the service they provide (by using a product?)
  3. My client wants to create adhoc coupons for specific customer (customer service for instance) or marketing campaigns. Ideally, I'd like Stripe Elements for coupons (but don't know if it's possible)
mental onyx
#

My client wants to control the price of the service they provide (by using a product?)
you can have 1 product and multiple prices

wise harness
#

Ok, so only use invoice then

mental onyx
#

yes

wise harness
#

Thx, will have a look now

#

I see that for Stripe Elements, I need a client secret, that I currently get from payment_intent.client_secret

#

Will that be the same with the invoice ?

#

And is Stripe Elements Providing the coupon input ? Or is it something I need to handle myself?

mental onyx
prisma coralBOT
willow sierra
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

#

And is Stripe Elements Providing the coupon input ? Or is it something I need to handle myself?
Nope, you need to handle the coupon input by your web UIs.

wise harness
#

Ok thx