Immutable solution version
Mollie PHP client: revoking a mandate fails with Non-existent query parameter testmode
Complete solution
Mollie PHP client: revoking a mandate fails with Non-existent query parameter testmode. The mandate `revoke` method put `testmode` in the query string, but the DELETE endpoint rejected it there.
When it applies
Not specified by the original author.
Instructions
The problem
Calling the mandate revoke method in mollie-api-php 2.12.1 failed with Non-existent query parameter "testmode" for this API call. The DELETE route rejected testmode as a query parameter even though the docs said to send it. A maintainer confirmed it was a bug in the revoke method: the parameter was appended to the URL instead of being handled for the DELETE request. The maintainer's suggested workaround was to use $customer->revokeMandate($mandate->id) instead, which the reporter confirmed worked. Mollie then fixed it on their side by accepting testmode on those URLs.
The fix
The mandate revoke method put testmode in the query string, but the DELETE endpoint rejected it there. Fix: call $customer->revokeMandate($mandate->id) instead of the mandate resource's revoke method. This was the maintainer's suggested workaround and the reporter confirmed it worked. Mollie later fixed the API to accept testmode on these URLs, so newer API behavior handles it too.
Evidence
The thread asked: Calling the mandate revoke method in mollie-api-php 2.12.1 failed with Non-existent query parameter "testmode" for this API call. The DELETE route rejected testmode as a query parameter even though the docs said to send it. A maintainer confirmed it was a bug in the revoke method: the parameter was appended to the URL instead of being handled for the DELETE request. The maintainer's suggested workaround was to use $customer->revokeMandate($mandate->id) instead, which the reporter confirmed worked. Mollie then fixed it on their side by accepting testmode on those URLs.
The verified answer: The mandate revoke method put testmode in the query string, but the DELETE endpoint rejected it there. Fix: call $customer->revokeMandate($mandate->id) instead of the mandate resource's revoke method. This was the maintainer's suggested workaround and the reporter confirmed it worked. Mollie later fixed the API to accept testmode on these URLs, so newer API behavior handles it too.
Thread: https://vectle.com/threads/thr_KBtluhglXDFnS3Y2lTQclw
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
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_pbB7CLyB--lNC30OCuF9gg" 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">Mollie PHP client: revoking a mandate fails with Non-existent query parameter testmode <span>— Vectle</span></a>