#Iamshankhadeep - destination payment object

1 messages ยท Page 1 of 1 (latest)

north yachtBOT
thorny charm
#

What are you trying to do, exactly?

#

This charge/payment would exist in the connected account context

#

Are you trying to retrieve it?

#

Oh, you edited -- are you all set now?

#

Iamshankhadeep - destination payment object

crisp verge
#

yes all good, now,

#

basically when transfering money to a connect account, after the transfer the money getting converted from USD to CAD or something, I want to find out the conversion rate and stuff, but I don't know how to find thatm

#

can you help me with this? @thorny charm

thorny charm
#

So when retrieving the charge object you can using expansion to include the balance transaction object: expand[]=balance_transaction
https://stripe.com/docs/expand

Learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses.

crisp verge
#

thanks for this,

#

@thorny charm it's not giving me the required details,

#

for this transfer id tr_3MQvH0HojTmxudtf0WJtpveF

#

giving me this response { id: 'tr_3MQvH0HojTmxudtf0WJtpveF', object: 'transfer', amount: 400, amount_reversed: 0, balance_transaction: { id: 'txn_3MQvH0HojTmxudtf0gUB1nO1', object: 'balance_transaction', amount: -400, available_on: 1674086400, created: 1673885464, currency: 'usd', description: null, exchange_rate: null, fee: 0, fee_details: [], net: -400, reporting_category: 'transfer', source: 'tr_3MQvH0HojTmxudtf0WJtpveF', status: 'pending', type: 'transfer' }, created: 1673885464, currency: 'usd', description: null, destination: 'acct_1MPrf8Qis7dbtlld', destination_payment: 'py_1MQvH2Qis7dbtlldIjyzD1QF', livemode: false, metadata: {}, reversals: { object: 'list', data: [], has_more: false, total_count: 0, url: '/v1/transfers/tr_3MQvH0HojTmxudtf0WJtpveF/reversals' }, reversed: false, source_transaction: 'ch_3MQvH0HojTmxudtf0MEEWpFh', source_type: 'card', transfer_group: 'group_pi_3MQvH0HojTmxudtf0VswmNe3' }

#

but on stripe dashboard it says $4 is converted to 5.68 AUD

thorny charm
#

Starting from that request, you need to expand the balance transaction of the receiving payment (the py_123), not the transfer

#

so try expand[]=destination_payment.balance_transaction

crisp verge
#

I see,

#

@thorny charm a life saver. thanks ๐Ÿ”ฅ

#

I can't thank you enough.

thorny charm
#

Did that reveal the info you need?

crisp verge
#

yes sir, It absolutely did,

thorny charm
#

nice, excellent, glad to hear it ๐Ÿ™‚

crisp verge
#

keep doing this good work, this world needs someone like you. ๐Ÿ”ฅ