#hugues-webhook-java
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- Hugues-SpringMVC-returnUrl, 17 hours ago, 11 messages
- Hugues, 2 days ago, 8 messages
Which line returns a null object
This? stripeObject = dataObjectDeserializer.getObject().get()
No! It's the if clause that returns false.
Ok
But the event = Webhook.constructEvent( payload, sigHeader, endpointSecret );
call was successful right?
That's usually the troublesome one
Yes, Webhook.constructEvent appeared to be successful.
Ok hm looking
So the versions you refer to in your question are the sdk versions not api versions
API versions are dates: https://stripe.com/docs/upgrades#api-versions
So what api version is your webhook endpoint set to?
And what version is your java sdk using?
hugues-webhook-java
Let me check the documentation that you've sent me & I'll get back to you.
The version 24.5.0 is the one of the com.stripe.stripe-java library included in my pom file.
okay so that one expects the latest API version which is <2023-10-16> so you need to make sure you have a WebhookEndpoint that is configured with that specific API version
How can I ensure this?
It looks like I can specify a date to an endpoint
If so can you explain how?
You are the developer, you create the WebhookEndpoint and you would make sure to set that version with the api_version parameter https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-api_version
Let me check...
This is something new: I never created the so-called WebhookEndpoint. Is is something done on the server side? Is there a guide about this?
did you just get started today?
I see you're using the Stripe CLI but I thought it was just to debug.
No I did not get started today. I succeeded in creating a PaymentIntent and since I invoked stripe listen --forward-to localhost:8080/stripe/events in the Stripe CLI, I could receive events in my StripeWebhookController. All I'm asking is how to reconcile this version problem. Soo far, I've never heard about this WebhookEndpoint creation.
yeah sorry I mean did you just start with the webhook part today
It's totally fine if so, it's just to know what I need to explain
OK, I understand. I've been experiencing with webhooks before. It's just the first time I'm doing it with Spring. So far, I've been using your tutorials and they were working fine. I thinks it had to do with the fact that the code and the API version provided in the pom of the tutorials were compatible.
okay so the Stripe CLI is really just a developer debugging tool
it's not supposed to be used in production. In production you create a real WebhookEndpoint on your account that points to the URL that Stripe will make an HTTPS request to whenever it sends an Event
It's only in development when testing locally that you would use the Stripe CLI. Does that make sense?
Yea sure. That's why I've never heard about the WebhookEndpoint creation: I'm still not ready to deploy it on production. So, how do I make the versions match between the CLI and my server?