#bwurtz999-account-support

1 messages · Page 1 of 1 (latest)

thick cipherBOT
#

bwurtz999-account-support

#

@lunar turret :question: Have a non-technical question, account issue, or need one-on-one support? We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact

lunar turret
#

Ok... well then is there a way I can find the fee_xxx from the finalized invoice?

#

Through the API?

#

I need to record the collected fee ID, the amount, and the address info so I can create a tax report

#

I see the application_fee_amount but I don't see anything for the fee

outer epoch
lunar turret
#

So I would use the payment_intent to find the charge? And then can I look up a balance transaction by using the source? The docs make it look like I can only find a balance transaction with an ID

outer epoch
thick cipherBOT
outer epoch
lunar turret
#

Got it ok thank you

#

I will give this a shot

#

@sharp venture When I try what is described in the docs I get an error. I don't have a charges object

#

*I don't have a charges object even when I use expand

sharp venture
#

Yea that payment intent hasn't been confirmed yet, there's been no payment yet

#

try using a succeeded payment intent for inspecting this

#

(or complete the one you shared)

lunar turret
#

Weird

#

Ohhh wait I see

#

Yes now that you say that it makes sense

#

Ok

sharp venture
#

It's still requires_payment_method

lunar turret
#

Yes yes

#

And therefore it doesn't have a charge

#

got it

#

thank you

#

I will try it on a completed payment

#

@sharp venture I'm not sure if there is a typo in the docs or if maybe I'm using a different API version

#

But I can find the fee details

#

But it's in an object called latest_charge

#

Not charges

#

Oh it's not markdown haha

sharp venture
#

Yep that's normal, the doc notes both

#

Users on API version 2022-08-01 or older: ...

lunar turret
#

No I see that

#

I think the issue is here

#

$feeDetails = $paymentIntent->charges->data[0]->balance_transaction->fee_details;

#

That stays the same for both

#

And there is no charges object

sharp venture
#

Which language snippet are you looking at?

lunar turret
#

PHP

sharp venture
#

The top snippet for me shows latest_charge for all languages

lunar turret
#

That's what I see

sharp venture
#

jinx

lunar turret
#

yes

sharp venture
#

ok, sorry, i'm misunderstanding then

lunar turret
#

But I'm saying I think there is a typo in the $feeDetails line

#

charges does not exist

#

it's latest_charge

sharp venture
#

ohhhhh

#

yes, you are correct

#

line 10

lunar turret
#

yes line 10

sharp venture
#

that should be updated, thanks for telling us 🙂

lunar turret
#

no problem

#

thank you for the help!

sharp venture
#

quite welcome!