#Nacio - Successful Checkout
1 messages · Page 1 of 1 (latest)
HI 👋
Are you listening to webhooks?
If you just want to check it in the API, then I would get the Checkout Session and expand the Payment Intent to confirm the funds were successfully collected
I'm planning on using them yes, however I do have to double check if everything is correct, right
Although, actually the payment_status property on the Checkout Session will cover this: https://stripe.com/docs/api/checkout/sessions/object?lang=python#checkout_session_object-payment_status
Double checking won't hurt but once you're are listening to webhooks and updating your local DB that way you should be covered.
Soo.. for testing webhooks on localhost I should use the CLI?
Yup. It's really useful
stripe listen ...
I'll have it running just to double check which events fire in response to different actions
Yeah for the webhook stuff I actually would prefer listening to it with Spring's controllers though
And I was wondering if the Java API had any helpful modules for that
How do you mean? If you're running a Spring system locally you can just forward to your webhook endpoint
I forward to my Python Django webhook endpoint locally
stripe listen --forward-to localhost:8000/webhook/
This is the command I run
I mean I'm not sure if the com.stripe:stripe-java has methods for parsing the received JSON webhooks into objects
Take a look at our quickstart. You can make it display Java code:
https://stripe.com/docs/webhooks/quickstart
Yeah, that'll work, thank you very much, have a great day <3