Partial Refund Fee Calculation

446 views
Skip to first unread message

Ryan Wood

unread,
Mar 6, 2015, 10:45:07 AM3/6/15
to api-d...@lists.stripe.com
We show our customers (via Stripe Connect) a net amount after the Stripe Fee is removed from a charge. We now find the stripe_fee on the associated balance_transaction object. It works fine for unrefunded charges and fully refunded charges ($0). However, I'm struggling to figure out what the remaining fee is after a partial refund. There is no fee_details on the refund's balance_transaction:

{"object":"list","total_count":1,"has_more":false,"url":"/v1/charges/ch_0WAJqSt5jVWV3A/refunds","data":[{"id":"re_0Yirx1DcSYmuro","amount":900,"currency":"usd","created":1350398015,"object":"refund","balance_transaction":{"id":"txn_1hN2wZfJo7AoXR","object":"balance_transaction","amount":-900,"currency":"usd","net":-900,"type":"refund","created":1350398015,"available_on":1350950400,"status":"available","fee":0,"fee_details":[],"source":"ch_0WAJqSt5jVWV3A","description":"REFUND FOR CHARGE (ph...@example.com)"},"metadata":{},"charge":"ch_0WAJqSt5jVWV3A","receipt_number":null,"reason":null}]}

Given different fee structures in different countries, how would I determine the remaining stripe_fee on the balance of the original charge? Thanks.

- Ryan

Jim Danz

unread,
Mar 6, 2015, 7:04:43 PM3/6/15
to api-d...@lists.stripe.com
Hi Ryan,

If a partial fee refund occurred, you should see it in fee_details
(and reflected in the balance transaction's `net`).

It it looks like charge ch_0WAJqSt5jVWV3A and refund re_0Yirx1DcSYmuro
were created before we started refunding fees on charge refund (Dec
2012 -- https://stripe.com/blog/a-pricing-update).

I hope that helps nudge things in the right direction, but I realize
that it doesn't address the partial refund vs full refund question.
Let me know if we can help on that further if you're seeing it on a
modern charge (happy to discuss off-list).

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

Ryan Wood

unread,
Mar 6, 2015, 9:56:39 PM3/6/15
to api-d...@lists.stripe.com
Thanks Jim. That explains it. Appreciate the help.

- Ryan

Ryan Wood
Co-founder, CTO
You received this message because you are subscribed to a topic in the Google Groups "Stripe API Discussion" group.

Jim Danz

unread,
Mar 7, 2015, 12:38:10 AM3/7/15
to api-d...@lists.stripe.com
My pleasure!
Reply all
Reply to author
Forward
0 new messages