Skip to content

[Bug]: Can't query transactions with users, payment types or types in parameters, same as #322 #325

Description

@pabloriquelmecas

What happened?

As discussed on Issue #322, it is not possible to query transactions filtering for a user, it throws an error

merchant = "merchant_code"
client = Sumup(api_key="API_KEY")
result = client.transactions.list(merchant_code=merchant,users=["user@mail.tld"])

Traceback (most recent call last):
  File "<pyshell#13>", line 1, in <module>
    result = client.transactions.list(merchant_code=merchant,users=["user@mail.tld"])
  File "C:\Users\Pablo\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumup\transactions\resource.py", line 327, in list
    raise APIError(
sumup._exceptions.APIError: The request is invalid for the submitted query parameters.

The line with the problem is not beign fixed on the latest release #302

query_data["users[]"] = list(users)

I can query without a problem the transactions with the statuses parameter, entry method, changes_since, newest time and oldest time, can't query with payment types and types.

merchant = "merchant_code"
client = Sumup(api_key="API_KEY")
result = client.transactions.list(merchant_code=merchant,types=["PAYMENT"])
Traceback (most recent call last):
  File "<pyshell#33>", line 1, in <module>
    result = client.transactions.list(merchant_code=merchant,types=["PAYMENT"])
  File "C:\Users\Pablo\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumup\transactions\resource.py", line 327, in list
    raise APIError(
sumup._exceptions.APIError: The request is invalid for the submitted query parameters.
merchant = "merchant_code"
client = Sumup(api_key="API_KEY")
result = client.transactions.list(merchant_code=merchant,payment_types=["ECOM"])
Traceback (most recent call last):
  File "<pyshell#34>", line 1, in <module>
    result = client.transactions.list(merchant_code=merchant,payment_types=["ECOM"])
  File "C:\Users\Pablo\AppData\Local\Programs\Python\Python313\Lib\site-packages\sumup\transactions\resource.py", line 327, in list
    raise APIError(
sumup._exceptions.APIError: The request is invalid for the submitted query parameters.

Relevant code or error output

SDK version

0.3.0

Python version

3.13

Operating system

Windows 11

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions