#KarlS

1 messages · Page 1 of 1 (latest)

sterile junco
reef hearth
#

Hm.. yes, the source item.

#

Api refers to it as a BalanceTransaction.

#

Given this Txn: txn_3JNIxqG30Vl6ne6N15BlSloo

#

Specifically, what do I expand to see that the balance transaction was refunded?

sterile junco
#

You will want to look up the charge from the balance transaction's source field

#

That will have the refunded amount and a list of related refund objects if applicable

reef hearth
#

ok.. but can i expand charges when I request the balance transaction?

sterile junco
#

IIRC there should only be one charge

#

It should be in the source field, unless I am mistaken. Do you have a balance transaction with multiple charges?

reef hearth
#

OK, but can I expand the balance transaction when I fetch it?

sterile junco
#

Yes, you can perform expansion while retrieving a balance transaction

reef hearth
#

Not that I know of. I'm looking at what is returned from getting a balance transaction and wondering if can expand the charges.

#

*the charge

#

Ahh, ok. So this is where I have an issue with the documentation.

sterile junco
#

I think it would look something like this var service = new BalanceTransactionService(); var options = BalanceTrasactionGetOptions(); options.AddExpand("source"); service.Get("txn_1JK4FlJmquaq3Lbpx6HxSXMT");

reef hearth
#

It is unclear to me exactly what string name I pass to expand the charge. I don't see it documented.

#

hm... i was doing this.

#

var expands = new List<string>();
expands.Add("charge");

sterile junco
#

Ah I see. Yes, a balance transaction isn't always related to a charge, it can be related to many kinds of objects so the id will go in to the source field.

reef hearth
#

testing "sourec" as option for expand.

#

ok! source works as the expanded name item. Can you show me in the documentation where I would know to pass "source" as the expand option? That is unclear to me.

sterile junco
#

Or do you mean the part on expansion in general?

reef hearth
#

I see (just trying to understand) looking

#

I can see that the charge is "expandable" so then I should be able to add "charge" to my expandable list when I call to fetch a refund object and it would then expand charge details.

#

If that it is, then I understand!

#

*is it

sterile junco
#

Correct, that is exactly what the doc means there

reef hearth
#

thank you for clarifying. Have a good rest of your day!