#Sam_Praveen-customer-transaction
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ just to make sure we're aligned, could you provide the prefix for the ID of a Transaction object that you're referring to?
txn_xxxxxxxxxxxxxx
Gotcha, so you're looking at Balance Transactions. Balance Transactions represent funds moving through your Stripe account, and aren't directly related to a Customer.
The type field on the Balance Transaction object will give you an understanding of the type of action that created the Balance Transaction, and then you can look at the source field to find the related Stripe object.
For example, if type is charge then source will have a Charge object that you can work backwards from to the find the related Customer.
Ok so what will be the API to check this in backword?
You'll start by retrieving the Balance Transaction object:
https://stripe.com/docs/api/balance_transactions/retrieve
And you can use our expand functionality to expand the source when retrieving the Balance Transaction to condense the process:
https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok Thanks for this. One more question related to the same. Instead of Transaction ID if I provide Charge id like this ch_xxxxxxxx then?