#hananafzal88-Connect
1 messages · Page 1 of 1 (latest)
Hi there, have you tried using the balance transaction API? https://stripe.com/docs/api/balance_transactions/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes @broken idol can you provide me the api endpoint url for getting all the transactions transfered into bank for a connected account
var options = new BalanceTransactionListOptions
{
Limit = 3,
};
var service = new BalanceTransactionService();
StripeList<BalanceTransaction> balanceTransactions = service.List(
options);
but in that api i am not sending any connected account id
please remove your apiKey from discord, it's a public place, thanks
its a test
Still, it's better to remove it.
Done
now please tell me that here is no account_id param
so how i will get specific account id balance transactions?
are you using .NET SDK?
yes
Great, you can pass in the stripeAccountID via the RequestOptions
StripeConfiguration.ApiKey = "{{PLATFORM_SECRET_KEY}}";
var customerOptions = new CustomerCreateOptions
{
Email = "person@example.edu",
};
var requestOptions = new RequestOptions();
requestOptions.StripeAccount = "{{CONNECTED_ACCOUNT_ID}}";
var customerService = new CustomerService();
Customer customer = customerService.Create(customerOptions, requestOptions);
Here is an example with CustomerService
So in your case, you just need to create a RequestOptions, and pass it to the BalanceTransactionService, i.e.,
options, requestOptions);
ok great
You can find more details in this doc https://stripe.com/docs/connect/authentication
var options = new BalanceTransactionListOptions
{
Limit = 3,
};
var service = new BalanceTransactionService();
StripeList<BalanceTransaction> balanceTransactions = service.List(
options);
one more thing if i dont want to set any limit and get all the list then what i should do
The max limit is 100, so I'd recommend using pagination https://stripe.com/docs/api/pagination
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
there is no option to get unlimited records?
I'm afraid not, we don't want to cause OutOfMemory errors in your servers and ours.
ohhh ok
thanks buddy
@broken idol how can i capply pagination
i mean there is no option to give him pageno and pagesize
so how i will achieve pagination functionality
You can use starting_after or ending_before for pagination cursors. Or use the SDK's built-in auto-pagination https://stripe.com/docs/api/pagination/auto
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.