#s0__0-payment-intents

1 messages · Page 1 of 1 (latest)

terse cipher
foggy anchor
#

i can only get
"amount": 21900,

#

but i want
Amount $219.00
Fee $9.80
Net $209.20

terse cipher
#

You can get the general total (what you're charging the customer) from the Payment Intent, but if you need the fee you need to check the Balance Transaction. You can get this by retrieving the Payment Intent and expanding charges.data.balance_transaction

foggy anchor
#

in PI, i can find
"balance_transaction": "txn_3KlFNIGRGdCFkMmo2hFJc3g5",

how can i use this to get the fee and net?

terse cipher
#

As I already send, when you retrieve the Payment Intent you can expand (https://stripe.com/docs/expand) charges.data.balance_transaction so that the full object is returned from the response. Alternatively, you can use that ID and just retrieve the Balance Transaction (https://stripe.com/docs/api/balance_transactions/retrieve)

Learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses.

foggy anchor
#

okok! thanks