#Nacio - Successful Checkout

1 messages · Page 1 of 1 (latest)

quick swift
#

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

modern kite
#

I'm planning on using them yes, however I do have to double check if everything is correct, right

quick swift
#

Double checking won't hurt but once you're are listening to webhooks and updating your local DB that way you should be covered.

modern kite
#

Soo.. for testing webhooks on localhost I should use the CLI?

quick swift
#

Yup. It's really useful

#

stripe listen ...

#

I'll have it running just to double check which events fire in response to different actions

modern kite
#

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

quick swift
#

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

modern kite
#

I mean I'm not sure if the com.stripe:stripe-java has methods for parsing the received JSON webhooks into objects

quick swift
modern kite
#

Yeah, that'll work, thank you very much, have a great day <3