#Iamshankhadeep - destination payment object
1 messages ยท Page 1 of 1 (latest)
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
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
Yes, you can the the details of that on the balance_transaction:
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-exchange_rate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So when retrieving the charge object you can using expansion to include the balance transaction object: expand[]=balance_transaction
https://stripe.com/docs/expand
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
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
Did that reveal the info you need?
yes sir, It absolutely did,
nice, excellent, glad to hear it ๐
keep doing this good work, this world needs someone like you. ๐ฅ