#Pipe-API

1 messages · Page 1 of 1 (latest)

naive herald
#

Hi, are you able to share more? Which API are you using? What value are you looking to get?

#

@scarlet bluff - created the thread so we can keep all communications here

scarlet bluff
#

In the stripe dashboard I can see this:

#

Clicking on the application_fee I can see this:

#

Where in the API I can get the 6.45CAD amount?

I tried to get the charge and expand application_fee -> balance_transaction

But the returned value is in GBP

#

Where I can get the 6.45CAD displayed on the stripe dashboard

#

?

pastel moss
#

👋 stepping in as pgskc needs to step away

#

Hmm can't remember if we just return the exchange rate or the actual FX'd amount for the BT

#

but you are looking in the right place

#

No we should show the converted amount on the BT

#

Can you provide that balance_transaction ID real quick in text so I don't have to type it out?

scarlet bluff
#

yes

#

give some minutes

#

txn_19hfP7DL41Gs7DjndrGvoFhd

#

the application fee is: fee_A1iqosRisH7QBc

pastel moss
#

Yeah that looks right then

#

Ah wait

#

Okay sorry, I misunderstood. You are charging the customer in USD, which is converted to CAD to settle in the Connected Account, but then taking an app fee which converts to GBP for your platform account.

scarlet bluff
#

yes

pastel moss
#

In that case you want the balance transaction of the payment on the Connected Account

#

Wow that is an old payment

scarlet bluff
#

What Im trying to do is
Calculate what our app has earned with every payment
User tip 50USD to another user
you convert that to 64.48CAD
We take 5USD as application fee
You convert that to 6.45CAD

From those 6.45 CAD, we pay you (stripe) 2.17CAD of fee

So I want to calculate that 6.45CAD - 2.17CAD = 4.26CAD

But having the application fee in a different currency, I can't see how can I do that

pastel moss
#

Right

#

So you want to retrieve the payment in this case

#

And look at the balance transaction for that

#

The payment on the Connected Account

#

So for your example above. You would retrieve py_19hfP7FzkX1R1St8TMmZG0Ud

#

And you can expand the balance transaction at the same time

scarlet bluff
#

So I need to get details about the "charge" of the applicationFee?

#

Let me try that... will back to you then

pastel moss
#

Sure let me know

scarlet bluff
#

It worked!
Thanks...
Will that process apply for every case?
Or should I put an if somewhere with a condition?

I mean, I can be sure that
if the charge was processed by you in X currency,
then
charge->application_fee->charge->currency will be equal to X always?

pastel moss
#

If you want to see the application fee amount in the Connected Account's settlement currency then the above is the way you do so.

#

If you want to see the app fee in your platform's settlement currency, then you retrieve the app fee balance transaction on your platform

scarlet bluff
#

Great.... thank you @pastel moss you were so helpful!
Have a nice day