#stefanmoona-refund-amount
1 messages · Page 1 of 1 (latest)
the ones here
I can get the converted amount and converted currency from the balance transaction object but no converted amount refunded
im not sure why
Can you share the field you're referring to from the API ref? I'm not aware of these! https://stripe.com/docs/api/balance_transactions/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this is the example of my balance transaction object
"balance_transaction": {
"amount": 9865,
"available_on": 1638316800,
"created": 1637769661,
"currency": "gbp",
"description": null,
"exchange_rate": 0.82208,
"fee": 0,
"fee_details": [],
"id": "txn_3JzNsnED5xkfDv2c1U1g6aLv",
"net": 9865,
"object": "balance_transaction",
"reporting_category": "charge",
"source": "ch_3JzNsnED5xkfDv2c1F2AHC4C",
"status": "pending",
"type": "charge"
},
im not sure why either, maybe my organization did something to stripe?
Ah, I think I understand now
A refund will be represented as a separate Balance Transaction object (see the type field?)
You can filter by type when using the List endpoint: https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Does that help?
mhm
{
"amount": -8700,
"available_on": 1638316800,
"created": 1637843028,
"currency": "gbp",
"description": "REFUND FOR CHARGE",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"id": "txn_3JzOV0ED5xkfDv2c0PCXWDEU",
"net": -8700,
"object": "balance_transaction",
"reporting_category": "refund",
"source": "re_3JzOV0ED5xkfDv2c0s5TH9Ql",
"status": "pending",
"type": "refund"
},
so this is the refund one
You can expand the source field which will be a Refund object
And in there is a charge field so you can relate the 2: https://stripe.com/docs/api/refunds/object#refund_object-charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
{
"amount": -4700,
"available_on": 1638316800,
"created": 1637833488,
"currency": "gbp",
"description": "REFUND FOR CHARGE",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"id": "txn_3JzNh5ED5xkfDv2c14C8kjGu",
"net": -4700,
"object": "balance_transaction",
"reporting_category": "refund",
"source": {
"amount": 4700,
"balance_transaction": "txn_3JzNh5ED5xkfDv2c14C8kjGu",
"charge": "ch_3JzNh5ED5xkfDv2c1BVovUdw",
"created": 1637833488,
"currency": "gbp",
"id": "re_3JzNh5ED5xkfDv2c1xOVN5uT",
"metadata": {
"transferId": "tr_3JzNh5ED5xkfDv2c1XqMYj4z"
},
"object": "refund",
"payment_intent": "pi_3JzNh5ED5xkfDv2c13XLxGjA",
"reason": null,
"receipt_number": null,
"source_transfer_reversal": null,
"status": "succeeded",
"transfer_reversal": "trr_1JzeVYED5xkfDv2c4ekrZTeD"
},
"status": "pending",
"type": "refund"
}
from the manual export, I can get both "converted amount" and "converted amount refunded", can you tell me which ones corresponds to those in this object?
Let me check
Yeah that's not available on a single Balance Transaction object
You'll need to combine the associated objects for the Charge and the Refund
If you expand that Charge field (on the Refund) then you'll have the amount (converted amount)
okay so I have the charge object, just realized it has a refund object inside charge.
the charge["amount"] would be the Amount
the charge["refunds"]["data"][0]["amount"] is the Converted Amount Refunded?
then what's the Converted Amount? whats the difference between amount and converted amount
converted should be when its converted to another currency?
Yes if there was a conversion between the presentment and settlement currency
so converted amount is the?
amount inside the balance_transaction? refund? charge?
Well 'it depends'
Are you using Connect? Are you using presentment currencies where it'll settle in a different currency?
im not sure about the connect
basically my organization just want the manual exports for payment, but done through the API so we can automate the process
and one of our customer will be doing currency conversion
ill ask about your question
Have you seen the reports API? https://stripe.com/docs/reports/api
You'll get the same CSV export that you get from the Dashboard, but can be automated via the API
hmm that might work, I'll look into it
Ill figure it out with the organization what to do
thanks for sticking with me, youve been very helpful
Sure, np!