Skip to content

Cancel Payment in Testmode Throws Runtime Error #390

Closed

Description

@jwarne-mollie

When trying to delete a payment and passing through the testmode param, the client throws the following error:

File "/usr/local/lib/python3.12/site-packages/mollie/api/client.py", line 204, in _get_testmode
   data["testmode"] = params.get("testmode") or True
   ~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object does not support item assignment

Note this was for a pointofsale payment, where isCancellable = false, however this should throw a 422 error instead.

Activity

  1. geertjanvdenbosch commented on Dec 3, 2025

    @geertjanvdenbosch
    Collaborator

    Hi @jwarne-mollie ,

    What version of the client are you using?

  2. jwarne-mollie commented on Dec 8, 2025

    @jwarne-mollie
    Author

    Hey @geertjanvdenbosch, this was with v3.8, but I just checked the changelog for v3.9.1 it seems this was already fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions