#EliDev
1 messages · Page 1 of 1 (latest)
Sorry for the delay! Yes, the charge object in the event details should be different in the two cases
Actually, I'm wrong.
Since the charge has failed, captured on the charge object will always be false
i see, yeah thats what i was seeing. with payments_intents you can but im debugging someones older code using the charges api
is there a way to programtically fetch the original charge object using the request_id from the response?
The request ID from what response exactly?
"id": "req_CLmzvkFuH7O8fT",
"idempotency_key": "1ebf3542-983f-44c7-b0c3-e1b52f76947f"
},
"type": "charge.failed"```
the req_* id
if i go into stripe dashbaord i can find the log for that call
and see that it was capture=false
but i need a way to do that through the api
If you're using webhooks, you can listen for that charge.failed event and inspect the event object to see the charge details
so the event object doesnt indicate capture=false or capture=true
just captured=false, since it failed
so you dont know if it failed to authorize the card or to charge the card
Ah, I see. You probably want to edit the charge.captured fixture instead