#Prabu
1 messages · Page 1 of 1 (latest)
How to get actual Net price show in dashboard screen?
Um how does the fee_details look like?
[#Stripe::StripeObject:0x6c7f0 JSON: {
"amount": 373,
"application": null,
"currency": "usd",
"description": "Stripe processing fees",
"type": "stripe_fee"
},
#Stripe::StripeObject:0x6c804 JSON: {
"amount": 4594,
"application": "ca_HmPhBnh4mJ6myHFh5dGlBv3Cjw1vwGM2",
"currency": "usd",
"description": "Atrium Innovations Inc application fee",
"type": "application_fee"
}]
the above detail only in fee_details
unable to see this information also Stripe processing fee refund:-US$1.11
please help me on get value of actual net price i.e 3140
So we are missing the $1.11 part
yes
I think $3.73-$1.11 is the actual fee, since you only capture $79.96 out of $118.2
only in partial refund transaction
So the "re-calculate" fee would be calculated based of $79.96 = $2.62, hence it's displayed as $3.73 processing fee and -$1.11 refunded
how to get refunded stripe fees ?
Amount is US$ 118.20
Captured only US$ 79.96
Refunded US$38.24
How to get net price after refund.
Hmm let me look a bit closer
ok sure
So just purely calculating it. Stripe fee = 2.9% + $0.3. So the Stripe fee is (2.9%+0.3) of $79.96 = $2.62. You take that with $45.94 application fee = $48.56.
Then take the total $118.20 - $48.56 = $31.40
But I am looking at how to calculate the $2.62 based on API property 🤔
Refunded $38.24
captured $79.96
API returned Net Price is $68.53
re_calculate_stripe_fees = (((79.96 * 2.9) / 100) + 0.3) = 2.62
net_price = 68.53 - 38.24 + (3.73-2.62)
Shall I get using above calculation manually?
it would be helpful if i get everything in api response for partial refund.
Yep I agree, yes the calculation matches but I am searching on the API surface if there is anything can let you avoid the 2.9% + 0.3 calculation
Quick question, if you use the List Refund API targeting this Charge, do you see any Refund? https://stripe.com/docs/api/refunds/list#list_refunds-charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes
And what if you Retrieve the Balance Transaction of that Refund?
i will check
I think it should have $1.11 inside
#Stripe::ListObject:0x6c8a4 JSON: {
"object": "list",
"count": 1,
"data": [
{"id":"re_3N0kPWIISZpAKYWE0WT59gZS","object":"refund","amount":3824,"balance_transaction":{"id":"txn_3N0kPWIISZpAKYWE0uTAnqbu","object":"balance_transaction","amount":-3824,"available_on":1682985600,"created":1682423665,"currency":"usd","description":"REFUND FOR CHARGE (Order ID: 19415963)","exchange_rate":null,"fee":-111,"fee_details":[{"amount":-111,"application":null,"currency":"usd","description":"Stripe processing fee refund","type":"stripe_fee"}],"net":-3713,"reporting_category":"partial_capture_reversal","source":"re_3N0kPWIISZpAKYWE0WT59gZS","status":"pending","type":"refund"},"charge":"ch_3N0kPWIISZpAKYWE0wNZ4woK","created":1682423665,"currency":"usd","metadata":{},"payment_intent":"pi_3N0kPWIISZpAKYWE0Ln9a7Xw","reason":null,"receipt_number":null,"source_transfer_reversal":null,"status":"succeeded","transfer_reversal":null}
],
"has_more": false,
"url": "/v1/refunds"
}
Yep that's is -111 !
So you take that directly and feed into your calculation ealier
net_price = 68.53 - 38.24 + 1.11