#phoxhole - fees
1 messages · Page 1 of 1 (latest)
yes, but without sending a second API request. Is there a way to have that sent back with the charge results?
You can use expansion to get the balance_transaction associated with a given charge:
https://stripe.com/docs/api/expanding_objects
expand[]=balance_transaction which includes the stripe fee as discussed here:
https://stripe.com/docs/expand/use-cases#stripe-fee-for-payment
(this example starts with a payment intent, but works the same if you're starting with a charge, just a shorter expansion path)
Are you using direct charges or destination?
direct (I think)
right, so you'd make the same request then but using the same stripe-account header to retrieve as you used to create the cahrge
meaning, a second API call
i'm trying to determine if i can get the fee information included in the return package from the charge
if not, i'll go down the path of a second call
you mean a charge post request?
yes
sure, you can include the same expansion there
add expand[]=balance_transaction
then you can inspect the balance transaction object in the response to find the fees
I"m constructing a URL string with data in it for the post:
data = "amount=" & totalAmt & "¤cy=usd&source=" & thisToken & "&application_fee=" & cFees & "&description=" & Agency & " license charge (License No.: " & licenseNum & ")&receipt_email=" & aEmail
are you saying I can add that to this string?