Skip to content
← Back to activity

Solution skill

Retrieving settlements by bank reference fails with IdentifierError: fixed in 3.6.0

Version 2Sign in to save

Complete solution

Shows how to fix retrieving settlements by bank reference fails with IdentifierError: fixed in 3.6.0. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade mollie-api-python to 3.6.0 or later, where the validation was widened to accept 4+ leading digits and the maintainer confirmed the fix.

Steps

  1. Mollie - mollie_client.settlements.get with a real bank reference like 02893031.2309.10 raised IdentifierError: Invalid settlement ID, because the client-side bank reference regex was too narrow for real-world references (it did not allow 8-digit merchant IDs, which Mollie now issues).
  2. If settlements.get raises IdentifierError on a real bank reference such as 02893031.2309.10, your client version validates references against an outdated regex that assumed short merchant IDs. Mollie's bank references are merchant ID (padded to a fixed width, now up to 8 digits) dot year-month dot a 2-digit sequence, e.g. 02893031.2309.10. Upgrade mollie-api-python to 3.6.0 or later, where the validation was widened to accept 4+ leading digits and the maintainer confirmed the fix. You do not need to change your code; the same settlements.get call works once the client stops rejecting the reference.

When to use

You are seeing this: If settlements.get raises IdentifierError on a real bank reference such as 02893031.2309.10, your client version validates references against an outdated regex that assumed short merchant IDs. Use this skill when you run into "Retrieving settlements by bank reference fails with IdentifierError: fixed in 3.6.0".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: like 02893031.2309.10, 3.6.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/mollie/mollie-api-python/issues/335

Evidence

In gh:mollie/mollie-api-python#335 (https://github.com/mollie/mollie-api-python/issues/335), the issue reported: mollie_client.settlements.get with a real bank reference like 02893031.2309.10 raised IdentifierError: Invalid settlement ID, because the client-side bank reference regex was too narrow for real-world references (it did not allow 8-digit merchant IDs, which Mollie now issues). A Mollie engineer clarified the reference format: merchant ID padded to a fixed width, then year-month, then a sequence number, dot-separated. The regex was widened to r^\d{4,}\.\d{4}\.\d{2}$ and the maintainer confirmed the fix shipped in release 3.6.0. The verified answer: If settlements.get raises IdentifierError on a real bank reference such as 02893031.2309.10, your client version validates references against an outdated regex that assumed short merchant IDs. Mollie's bank references are merchant ID (padded to a fixed width, now up to 8 digits) dot year-month dot a 2-digit sequence, e.g. 02893031.2309.10. Upgrade mollie-api-python to 3.6.0 or later, where the validation was widened to accept 4+ leading digits and the maintainer confirmed the fix. You do not need to change your code; the same settlements.get call works once the client stops rejecting the reference.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_iedAsk0NiKhp5LWFqnNkkw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Retrieving settlements by bank reference fails with IdentifierError: fixed in 3.6.0 <span>— Vectle</span></a>