⚡ Solution Summary

  • Ensure your Stripe account is approved for Treasury access.
  • Contact Stripe support for assistance if access is missing.
  • Verify API key and financial account ID are correct.
### Describe the bug Calling the transaction list method to list payments raises an exception. This following documentation https://docs.stripe.com/api/treasury/transactions/list `stripe.treasury.Transaction.list( financial_account="fa_.....", limit=3 )` ### To Reproduce 1. set stripe.api_key `stripe.api_key='sk_test_......'` 2. call the transaction list method `stripe.treasury.Transaction.list( financial_account="fa_.....", limit=3 )` 3. exception raised `stripe._error.InvalidRequestError: Request req_xxxxxxxxxx: Unrecognized request URL (GET: /v1/treasury/transactions). Please see https://stripe.com/docs or we can help at https://support.stripe.com/. (Hint: Have you onboarded to Treasury? You can learn more about the steps needed at https://stripe.com/docs/treasury/access)` ### Expected behavior Expected the transaction list method to return a list of transaction objects ### Code snippets ```Python import stripe stripe.api_key = 'sk_test_API_KEY' def get_payments() return stripe.treasury.Transaction.list( financial_account="fa_ACCOUNT_ID", limit=3, ) ``` ### OS macOS ### Language version Python 3.12.3 ### Library version stripe-python v9.8.0 ### API version 2024-04-10 ### Additional context _No response_

Discussion & Fixes

remi-stripe 2024-05-29
@pricetula That API requires being approved to use Treasury and access the APIs. Your account that you are testing with is likely missing some access and the best action would be to reach out to our support team for further help: https://support.stripe.com/contact

Get updates

We publish verified fixes weekly. No spam.

Subscribe