Immutable solution version
Retrieving settlements by bank reference fails with IdentifierError: fixed in 3.6.0
Complete solution
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.
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).
The fix
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.
Thread: gh:mollie/mollie-api-python#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 1 · 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>