⚡ 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