#yagnesh-p_webhooks

1 messages ยท Page 1 of 1 (latest)

bronze oarBOT
#

๐Ÿ‘‹ 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/1382036701022654680

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

dim pumice
azure void
#

and to get the checkout-session i have to use that paymet_intent right?

dim pumice
#

In the checkout.session.completed event?

#

What exactly are you trying to do here?

azure void
#

I am just trying to get payment_intent in the checkout session because I am creating business logic depends on checkout session.
Since it is not available in subscription mode, I have to retrieve it using the Stripe.Checkout.Session API call, by passing the payment_intent.

dim pumice
#

Why are you creating business logic that depends on the Checkout Session?

#

Or rather: what exactly are you trying to accomplish by doing this?

azure void
#

While displaying the data like amount and all in the frontend of my application, I am using it as fallback.
Each checkout-session will have payment_intent or not, regardless of payment mode?

dim pumice
#

No, it won't.

#

Wait, let me confirm.

#

No, it won't - only in payment mode.

azure void
#

Okay thanks for the help.

dim pumice
#

You are trying to create a 'record' that represents a 'transaction', ya?

azure void
#

ya, kinda.
I mean if i am able to get the checkout session by retrieving through the payment_intent then it will help me to indetify the unique record like which checkout session and which payment intent

dim pumice
#

You're still describing how you want to implement whatever you're implementing, but you haven't described what you are trying to implement.

azure void
#

There is functionality in my website to view the payment that is received from the customer so while viewing, I wanted like if i don't get data from the invoice then take that from the checkout session like invoice name, customer email, name, amount.

bronze oarBOT
maiden geyser
#

๐Ÿ‘‹ stepping in

#

What mode of Checkout Session are you working with here?

azure void
#

subscription

maiden geyser
azure void
#

Okay,
I just wanted to ask if payment_intent is available or not in checkout.session.complete event, but seems it is only available in the payment mode and not in subscription mode.

maiden geyser
#

Correct, you would access the payment_intent from the Subscription/Invoice that is generated.

azure void
#

Yes, from that payment_intent I can retrieve the checkout session by Stripe.Checkout.Session API call.

maiden geyser
#

Yeah I'm saying you can't go directly from Checkout Session --> PaymentIntent. You would go Checkout Session --> Invoice --> PaymentIntent.

azure void
#

Okay,
In short i will be able to retrieve the checkout session after getting the payment intent right?

maiden geyser