[stripe-api-discuss] Refund > Get Application Fee Amount

51 views
Skip to first unread message

Kerri Couillard

unread,
Aug 7, 2016, 1:17:51 PM8/7/16
to api-d...@lists.stripe.com
Hi Stripers,

I am using Stripe Connect / Managed Stripe Accounts and I am having problems determining the best way to show our users the amounts returned from them and then from the application fee (us).

I would like to get this somehow from the refund response and then store in local db.

How do you do it? Any guidance is much appreciated.

Thanks,
Kerri

Andrew

unread,
Aug 15, 2016, 10:43:14 PM8/15/16
to Stripe API Discussion
Hey Kerri,

I'm sorry for the delay in my response!  I've written up an example script that demonstrates exactly where funds are being moved from when you create a refund.  You can check it out here:

https://gist.github.com/andrewnelder/e637db3b9ec65b8877e966432b104ba5

If you go through and print the values of the three variables (`stripe_fee`, `platform_total`, and `connected_total`) at the end of each block, you should get the results you're trying to find!  The long and the short of it is: "It depends on the way you're charging your customers."  If you're charging your customers using the `destination`-parameter, you'll utilize the method and results described in the top-half of this script.  Whereas, if you're charging customers directly, using the `Stripe-Account`-header, you'll utilize the method and results described in the bottom-half of this script.

Hope that helps!  Let me know if I can clarify anything here for you.  Normally I don't like to just throw code-samples around, but in this case, it seemed like the better way to communicate exactly what you needed to do.  That being said, I'm happy to go into more depth.

Kind Regards,
Andrew

Kerri Couillard

unread,
Aug 21, 2016, 4:30:22 PM8/21/16
to api-d...@lists.stripe.com
Great, thanks! Helps!

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.



--
Best,
Kerri Couillard
Founder and CTO of Babierge, Inc.
Independent Trusted Partner serving Albuquerque and Rio Rancho, New Mexico
505-231-8370
Reply all
Reply to author
Forward
0 new messages