How to find out what part of the invoice is refunded?

439 views
Skip to first unread message

Jaana Kulmala

unread,
Mar 3, 2014, 3:02:55 AM3/3/14
to api-d...@lists.stripe.com
Hey!

I'm implementing an analytics app on top of Stripe API, and I have problems targeting the refunds. Is it somehow possible to find out if the refund targets the subscription or invoiceitem?

The background: 
Some companies have invoice items that are not included in metrics that I calculate. When they are refunded, that should not change the metrics.

Example:
Invoice contains:
$29 for a subscription
$300 for extra services

Refund:
partial $250 refund is made (part of the extra services is refunded, subscription continues as normal)

End result that I should detect:
$29 for a subscription
$50 for extra services

Cheers,
Jaana




Jim Danz

unread,
Mar 3, 2014, 4:42:54 AM3/3/14
to api-d...@lists.stripe.com
No, we don't represent it quite that way.

An invoice, including all possible factors --such as subscription, invoice items, discount, and possibly customer account balance -- will distill down to an "amount_due", which is the amount that we will create a charge for.

Once a charge is created successfully, future actions on the charge have no further impact on the recurring billing state of the customer. For instance, refunding a a charge that was generated by a subscription invoice will not cancel or otherwise affect a customer's subscription. Refunding a charge that was generated by an invoice full of invoice items will have no effect on those invoice items.  And there is no link-back or attribution that can be used to express the semantics "I am refunding X part of this invoice."

So, in short, our integration between refunds and invoices is not really rich enough to give you what you're looking for here.

If there's a refund but the subscription continues later uncancelled, it may be reasonably safe to assume that the refund was intended for the invoice items, but I realize that's a bit of a kludge.  Also happy to chat off-list (jim@) if you want to go through any particular example that you're working on disentangling.

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.

Jaana Kulmala

unread,
Mar 3, 2014, 5:42:40 AM3/3/14
to api-d...@lists.stripe.com
Thanks Jim,

for the fast and complete answer.

I do think this is rare and assigning the refund to the invoice items if subscription continues will do for now, if I document it properly. 

-Jaana


--
You received this message because you are subscribed to a topic in the Google Groups "Stripe API Discussion" group.
Reply all
Reply to author
Forward
0 new messages