#wullvie
1 messages ยท Page 1 of 1 (latest)
hey two-shoes
Which payload are you getting? The one that's returned after a Checkout Session is created? Or the one that comes from a webhook event?
p.s. hello ๐
hah
haha*
so im looking at both
i create the checkout session, and take the user to the URL
and pull the session "id" for reference later
but the payment_intent value is null both on creation and after a successful payment
Can you post the Request ID for the Checkout Session creation event or the checkout.session.completed event?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
one sec
evt_1MMFM2LSnwxNkMW9oFRonuYw
this is the event id for "A Checkout Session was completed"
does it matter that it's in test mode?
seems the PI is still null there as well
in the events console
Ahhh, that's because this was a Checkout Session that was created in subscription mode. You'll want to get the Payment Intent from the Invoice in this case
ok so i can pull the invoice object using the in_lskdjfsldkf id, and grab the info from there?
unless you can think of an easier way - i'm essentially just trying to find a way to verify the payment AFTER completion and store this reference in our database, using any ID from the checkout
AHhh, okay. That's basically for tracking fulfillment right? In other words you only want to update your database once a payment is successful via a Checkout Session?
bingo
so once the redirect returns the user to our application, and the payment was successful, we just want to store an ID that we can use to track / verify the subscription in the future
Got it. Okay, in that case, you can either get the Invoice using the Invoice ID in the Checkout Session object and look at invoice.status to see if it has been paid: https://stripe.com/docs/api/invoices/object#invoice_object-status
Or you can simply setup a webhook endpoint to listen for invoice.paid.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Depends on your setup and preferences though