Stripe API - Value for fees deducted

4,296 views
Skip to first unread message

Jaimil Prajapati

unread,
Nov 11, 2013, 6:47:06 PM11/11/13
to api-d...@lists.stripe.com
Hello,

Before in earlier version of API (Not sure which), Stripe would return Fees it deducted in the return JSON response. However, in "2013-08-13" version, I do not get "fees" property in the JSON object. Also, I am charging Customer and not a card.

Please help me out!

Thanks in advance! :)

Jaimil Prajapati

unread,
Nov 11, 2013, 6:59:30 PM11/11/13
to api-d...@lists.stripe.com
Oh got it! I was reading API changelog, and Stripe has deprecated fee in favour of balance transaction.

If someone has similar issue, the return JSON response will now have "balance_transaction" property. You can use this to retrieve appropriate balance transaction, which now contains all fees details (https://stripe.com/docs/api/php#retrieve_balance_transaction)

Thanks anyways! :)

Amber Feng

unread,
Nov 12, 2013, 3:58:36 PM11/12/13
to api-d...@lists.stripe.com
Hey Jaimil,

Glad to hear you figured it out!

As an FYI, you can also expand the balance_transaction property
automatically (https://stripe.com/docs/api#expand) instead of fetching
it in a separate API call.

Amber
> --
> 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.

Jaimil Prajapati

unread,
Nov 12, 2013, 4:19:51 PM11/12/13
to api-d...@lists.stripe.com
Oh that's great! Never knew that... that will definitely increase performance a bit by reducing multiple calls. Thanks! :)

Enrico Bono

unread,
Jan 7, 2015, 12:23:56 PM1/7/15
to api-d...@lists.stripe.com, jaim...@gmail.com
Hello.
I'm using this API call (latest version of the API): https://api.stripe.com/v1/transfers?count=10&include[]=total_count&expand[]=data.balance_transaction

It returns the transfers and the balance_transaction, but the fee value is always zero.

For example, I have a transfer that contains 2 charges. Gross is for example 127.90USD, Fees are -4.31USD, so the Total is 123.59USD.
I can see those data if I log on the Dashbord.
When I use the API I get:

data:
- id = tr_xxxxxxxx
- amount = 12359
- currency = usd
- balance_transaction:
--- amount = -12359
--- currencty = usd
--- fee = 0
--- fee_details = [0] (empty array)

And I have fee = 0 for all the transfers!

Why?
I can I get back the fees?

Matthew Arkin

unread,
Jan 7, 2015, 12:27:03 PM1/7/15
to api-d...@lists.stripe.com, jaim...@gmail.com
That would be because there is no fee to transfer funds to your own bank account.

The 2.9% + .30 fee is part of the balance_transaction for the charge, not for the transfer.

--
Matt Arkin
Kollective Solutions

Enrico Bono

unread,
Jan 7, 2015, 12:28:49 PM1/7/15
to api-d...@lists.stripe.com
ok. So how can I get the fee for that balance_transaction?
​​

Matthew Arkin

unread,
Jan 7, 2015, 12:29:30 PM1/7/15
to api-d...@lists.stripe.com

--
Matt Arkin
Kollective Solutions

On Jan 7, 2015, at 9:28 AM, Enrico Bono <enr...@startstudio.it> wrote:

ok. So how can I get the fee for that balance_transaction?
​​

Enrico Bono

unread,
Jan 7, 2015, 12:40:08 PM1/7/15
to api-discuss
Great, thanks.
--
______________
Ing. Enrico Bono
enr...@startstudio.it
www.startstudio.it

___
Le informazioni contenute in questa email e nei suoi allegati possono essere riservate e sono destinate esclusivamente ai suindicati destinatari. Chi ricevesse questo messaggio per sbaglio è pregato di informare il mittente e di cancellare immediatamente il messaggio: la diffusione, stampa, copia e ogni altro uso del messaggio, degli allegati o di loro parti da qualsiasi altro soggetto è proibito secondo le norme vigenti.
This email is confidential and may be legally privileged. It is intended solely for the addressee. Any other access, print, disclosure or use by anyone else is unauthorized. If you are not the intended recipient, please notify the sender of this e-mail immediately and delete this message, according to the laws in force.

___
Reply all
Reply to author
Forward
0 new messages