Balance Transaction webhook?

796 views
Skip to first unread message

Josh Pigford

unread,
Feb 11, 2014, 8:25:29 PM2/11/14
to api-d...@lists.stripe.com
Is there a webhook event for Balance Transactions? I noticed `balance.available` but it's not clear of the object associated with that would be an actual Balance Transactions.

Jim Danz

unread,
Feb 11, 2014, 11:04:11 PM2/11/14
to api-d...@lists.stripe.com
Josh,

No, there isn't a dedicated webhook for the creation of a new
balance_transaction.

This would be redundant the vast majority of times with things like
charge.created or charge.refunded, though if I'm to read between the
lines for your question, I can see the value in feeling like you can
maintain an up-to-date balance history without having to poll.
Definitely something for us to keep in mind -- sorry for the
limitation here.

Jim


On Tue, Feb 11, 2014 at 5:25 PM, Josh Pigford <jo...@joshpigford.com> wrote:
>
> Is there a webhook event for Balance Transactions? I noticed `balance.available` but it's not clear of the object associated with that would be an actual Balance Transactions.
>
> --
> 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.

Josh Pigford

unread,
Feb 12, 2014, 6:54:53 AM2/12/14
to api-d...@lists.stripe.com
Yeah, the primary reason I need it is for fees. At this point it's the only place to pull the fee data, so it's pretty necessary for us.

My assumption is that I'll need to just use the `balance_transaction` field from `charge` webhooks and do an additional API call to manually retrieve that data each time. 

Not a huge deal, was just trying to avoid a second API call.

Brian Ross

unread,
Feb 12, 2014, 9:31:53 AM2/12/14
to api-d...@lists.stripe.com

To save a second API call you could use 'expand[]=balance_transaction' to have the 'balance_transaction' details included with the 'charge' call.


-Brian


From: api-d...@lists.stripe.com <api-d...@lists.stripe.com> on behalf of Josh Pigford <jo...@joshpigford.com>
Sent: Wednesday, February 12, 2014 3:54 AM
To: api-d...@lists.stripe.com
Subject: Re: [stripe-api-discuss] Balance Transaction webhook?
 

Josh Pigford

unread,
Feb 12, 2014, 9:37:16 AM2/12/14
to api-d...@lists.stripe.com
I don't think that's possible with what I'm trying to do here.

When a webhook gets sent, it basically is references an Event object. So, once I get notification of a new event via the webhook, I make the API call myself to retrieve that Event.

But as far as I know, I can't expand properties on Event objects. Which is why I'd need to make an additional API call.

Correct me if I'm wrong, though.

Brian Ross

unread,
Feb 12, 2014, 9:49:27 AM2/12/14
to api-d...@lists.stripe.com

Yeah, you're correct. I just looked at one of my webhooks and the data is not included. So a second API call would be necessary if you're not able to get the save the fee when you make the 'charge' API call.


-Brian


Sent: Wednesday, February 12, 2014 6:37 AM

Amber Feng

unread,
Feb 17, 2014, 7:29:59 PM2/17/14
to api-d...@lists.stripe.com
Hey Brian, Josh,

Yep -- you're both right. Expanding properties on events sounds
interesting, though probably not something we'll get to in the
immediate term. We've also been playing around with the idea of
letting you specify in your webhook settings which properties should
be expanded by default.

I'll re-update this thread when we have any progress here!

Amber
Reply all
Reply to author
Forward
0 new messages