#andr-paul-grandsire_api

1 messages · Page 1 of 1 (latest)

ivory etherBOT
#

👋 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.

dire lagoonBOT
cyan snow
#

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.

upper quest
#

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.

gleaming jolt
#

👋 as my colleague mentioned, Products aren't used with custom flows using PaymentIntents

#

Those are for different integration flows

upper quest
gleaming jolt
#

What is the third party platform doing for you exactly?

#

Why do they want/need a Product ID?

upper quest
#

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.

https://ajuda.cademi.com.br/vitrines/entregas-e-integracoes/stripe#passo-2.2-encontrando-o-id-do-seu-link-de-pagamento

Veja como conectar a sua Cademí com o Stripe

gleaming jolt
#

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)

upper quest
#

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

gleaming jolt
#

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.

upper quest
#

It was helpful and enlightening. Thank you very much for now ❤️

gleaming jolt
#

Yep pretty much