#andr-paul-grandsire_api
1 messages · Page 1 of 1 (latest)
👋 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/1235980459142418503
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there 👋 I'm going to need more context on the flow you're trying to build or guide you're trying to follow. I'm not sure what you're referring to by "self-hosted checkout".
Payment Intents can't be directly associated with Products, but you can build custom logic to make that association if it's something your flows need.
Well, ofcourse. I'll give more context.
We are building a checkout with Stripe Elements and React inside our platform, using Stripe API & Stripe React.js Elements. We're creating our Payment Intent as soon our customer provides us personal information, before payment. After payment is done, we have a Payment, a Payment Intent and a Customer. Here we'll setup webhooks to warning us and the third-party platform.
This platform integration (with Docs in PT-BR here) asks us to provide a Payment Link or a Product ID, but we don't have either, since we our using a custom integration via Stripe PHP library.
👋 as my colleague mentioned, Products aren't used with custom flows using PaymentIntents
Those are for different integration flows
And it's exactly here where I'm striving. I can't find this documentation on how to link our payments with a product, since we don't send this information on Intent.
So, what you can suggest to me in this flow?
What is the third party platform doing for you exactly?
Why do they want/need a Product ID?
It's called Cademi. They are a learning platform, with each content suite treated like a Product inside it. They use this Product ID (or a Payment Link) from Stripe to identify what's the payment is about when receiving a webhook from Stripe. But, since we're using Intents, there's no Product creation inside Stripe, and therefore, we can not provide this ID to the platform.
So, I was thinking any way to vinculate our checkout with this information could be useful, even if this requires more lines of codes, we'll do it.
Yeah that's not going to work
You either need to use Stripe Checkout, not use that platform, or ask the platform to change their integration to handle a custom flow integration (what you are trying to build)
So, PaymentIntent should be used when processing single payments, that does not have a product linked, right? Which means there's no way to create a product on Stripe and build my own checkout to embed in our site?
This is my first Stripe integration, sorry if I'm sounding a little confused. I really am. 😆
I mean, no way to have a product and tell stripe via API to use this product on my checkout inteface, inside my platform
Products/Prices are used with Stripe Checkout -- our hosted flow. You can embed this in your site like we show here if you like: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=embedded-form
If you are building your own custom flow (meaning you use Stripe Elements to create a checkout form within your own site) then you don't use Prices/Products. You just create PaymentIntents directly.
Right. And that's why you asked me to talk to the platform or change my flow. I believe that changing will be more likely to happen. I'll read the docs and try to implement. It seems that almost nothing changes in terms of UX, right?
It was helpful and enlightening. Thank you very much for now ❤️
Yep pretty much