#EliDev

1 messages · Page 1 of 1 (latest)

lusty kiteBOT
left badge
#

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

pure surge
#

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?

left badge
#

The request ID from what response exactly?

pure surge
#
    "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

left badge
#

If you're using webhooks, you can listen for that charge.failed event and inspect the event object to see the charge details

pure surge
#

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

left badge
#

Ah, I see. You probably want to edit the charge.captured fixture instead