#alecpope

1 messages · Page 1 of 1 (latest)

sly pierBOT
novel sigil
#

Hi there, the stripe fee is only available after the payment is succeeded.

storm edge
#

Oh okay, that's no problem. But I don't see a "stripe fee" field where it could be stored inside the payment intent?

novel sigil
#

You can get it from payment_intent->latest_charge->balance_transaction->fee_details

storm edge
#

Ah found it, thanks!

storm edge
#

Could you look into this Event evt_3NhQhRCGHYWsrZq50xb90KLm? It does not contain the fee/it is zero, right? Do I need to get the payment intent and expand it?

novel sigil
#

Yes you need to retrieve the PaymentIntent with latest_charge.balance_transaction expanded

storm edge
#

I still get a zero value when retrieving with this request req_typD9sEof7dN5A

novel sigil
#

Stripe doesn't log GET response, can you copy and paste the response data here?

storm edge
novel sigil
#

All good.

#

It looks like you are using the old API, and that's why you have a charges array instead of the latest_charge

#

In this case you should expand charges.data.balance_transaction

storm edge
#

Okay, got it. I think I will update the API and use latest_charge, thanks!

novel sigil