Mollie payment callback
Separate notification receipt from verified payment and fulfilment.
Configuration and request
Use the canonical management-portal origin ending in /payments/mollie/webhook. Commerce must be enabled. This single route bypasses browser CSRF, while portal isolation remains effective; it is not a general payment API.
POST application/x-www-form-urlencoded with id matching tr_ plus 4–55 ASCII letters/digits. The handler consumes parsed form data or parses a raw form body. Do not assume JSON support across request-parser configurations.
# Demonstration only: use test-mode payments in a controlled environment.
curl --include -H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=tr_Example123' \
"$MANAGEMENT_ORIGIN/payments/mollie/webhook"
Response contract
| Status | Meaning |
|---|---|
200, empty body |
Syntactically valid notification accepted, even for an unknown payment |
400, empty body |
Missing/malformed ID |
413, empty body |
Request exceeds enforced 4096-byte limits |
404 |
Commerce disabled or method other than POST |
421 |
Unrecognised portal host |
Parsed form representations are also checked against the byte limit. Keep requests minimal. Valid unknown IDs are acknowledged to avoid revealing order/customer existence.
Verification, races and duplicates
Known IDs enqueue reconciliation against the stored order. The worker queries Mollie independently. Submitted status, amount, customer ID, redirects or signatures are never payment proof. This route implements no shared webhook-signature header; do not invent an HMAC requirement.
Notifications share an enqueue key per payment and 30-second time bucket; later duplicates remain possible. A callback before storage of the create-payment result is acknowledged but may enqueue nothing. The mandatory commerce scheduler recovers this race. 200 means receipt, not settlement, invoice creation or domain fulfilment.
Use provider retries for transport/server failure. Checkout success redirects are not confirmation. Operators should inspect worker/scheduler and uncertain remote effects rather than change payment rows manually. See reference.