#basarito - payload
1 messages ยท Page 1 of 1 (latest)
{
"account": null,
"api_version": null,
"created": 1651233318,
"data": {
"previous_attributes": null,
"object": {}
},
"id": "evt_3KtsPqDtE6O7fjog1HCjnuXQ",
"livemode": false,
"object": "event",
"pending_webhooks": null,
"request": {
"id": "req_W42wzOmlmvMyMS",
"idempotency_key": null
},
"type": "payment_intent.created"
}
It's the same for account.updated event, the data.object is still empty:
{
"account": "acct_1KtsaHDEbXECVNZs",
"api_version": null,
"created": 1651233972,
"data": {
"previous_attributes": null,
"object": {}
},
"id": "evt_1KtsaPDEbXECVNZsKIG14I0b",
"livemode": false,
"object": "event",
"pending_webhooks": null,
"request": {
"id": "req_icl2tWiIoRvM5N",
"idempotency_key": null
},
"type": "account.updated"
}
Thanks! What is the version of stripe-java that your webhook endpoint uses? And could you share your webhook code?
stripe-java version: 20.114.0
The code itself is pretty basic, I'm just printing the event.toJson()
Tried out the sample code here: https://stripe.com/docs/webhooks#webhook-endpoint-code and it failed at event.getDataObjectDeserializer() (went to the else branch in the sample)
That's odd. Are you using the Stripe CLI to forward the events to your webhook endpoint?
Yes. I'm using stripe listen ... and it shows live events as I trigger them via stripe trigger account.updated
Got it! And does that happens for every event? For example what do you see if you run stripe trigger payment_intent.succeeded
Yep, same happens no matter which event I trigger:
{
"account": null,
"api_version": null,
"created": 1651235149,
"data": {
"previous_attributes": null,
"object": {}
},
"id": "evt_3KtstMDtE6O7fjog1Agkcurz",
"livemode": false,
"object": "event",
"pending_webhooks": null,
"request": {
"id": "req_65xLnXdYEm0WHd",
"idempotency_key": null
},
"type": "payment_intent.succeeded"
}
Looking into this...
Just wanted to add, I just tried tried triggering the event "properly" by performing an actual payment in test mode and I again received an event in the webhook handler, but the data.object is still empty ๐ฆ
any ideas what else I can try?
HI there ๐ sincere apologies for the delay in me getting caught up. Please bear with me a moment while I get context on this conversation.
If you print the raw event (without the json conversion) is it just as empty? I'm trying to think through where the data could be falling out.
Give me a second to try it out, but I think it was still empty when I was debugging it
basarito - payload
oh man, looks like that seems to be it! originally I used Event directly as RequestBody argument, but now that I used HttpServletRequest instead and printed the body, it shows the data.object
Awesome!
yep, can confirm it is now working ๐ thanks so much! ๐
Happy to help!
the answer is always in one's code ๐ ๐