Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event#getRawJsonObject returns null when constructed for webhook #1945

Closed
TheMrMilchmann opened this issue Jan 29, 2025 · 2 comments
Closed
Labels

Comments

@TheMrMilchmann
Copy link

TheMrMilchmann commented Jan 29, 2025

Describe the bug

Calling Event#getRawJsonObject always returns null for events constructed from webhook JSON payloads. This is due to the method taking the raw JSON from a stored last response which is not set when the event is constructed (ref).

To Reproduce

Event event = this.stripeClient.constructEvent("{payload}", "{signature}", "{secret}");
System.out.println(event.getRawJsonObject()); // null 

Expected behavior

I expect the raw JSON object to be available from the event object. I think it should be stored there during construction similar to how it's done the last response for queried objects.

OS

Irrelevant

Java version

Irrelevant

stripe-java version

v28.3.0

API version

Irrelevant

Additional context

No response

@helenye-stripe
Copy link
Contributor

Thanks for raising, we will look into addressing this.

@xavdid-stripe
Copy link
Member

This is fixed in v28.3.1, which just released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants