#pybuche_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
๐ 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
๐ 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 ๐
it really depends on what you want to achieve
So you can have a better idea of what i'm trying to achieve, you can go to https://bleu-front.osc-fr1.scalingo.io/questionnaire?vertical=substitutes
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
so if we forget about how to implement this
could you describe what are you trying to achieve here?
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:
- Answer questions
- Login/SignUp
- Pay
ok let's focus on the payment now
The payment is a single product. My constraints are:
- I want to use Stripe Elements in the frontend
- My client wants to control the price of the service they provide (by using a product?)
- 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)
My client wants to control the price of the service they provide (by using a product?)
you can have 1 product and multiple prices
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)
https://docs.stripe.com/api/invoices/create#create_invoice-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
overall what you need is to follow this guide https://docs.stripe.com/invoicing/integration?method=elements
Ok, so only use invoice then
yes
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?
it's explained in this step https://docs.stripe.com/invoicing/integration#pass-the-client-secret-to-the-front-end
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.
Ok thx