Tuesday, January 27, 2026
1 change · 19.0
Resolved issues and error corrections
Odoo now safely handles Stripe webhook notifications that do not match an existing Odoo transaction, such as some in-person card payments. Instead of returning an error that could cause Stripe to disable the webhook endpoint, Odoo acknowledges and ignores these unrelated events so online payments keep working.
Original PR description
Prior to this commit, receiving a Stripe webhook notification for a transaction that does not exist in Odoo (e.g., Point of Sale "card_present" payments) would cause an Internal Server Error (500). The issue occurred because the controller attempted to call `_verify_signature(tx_sudo)` even when `tx_sudo` was empty. Inside `_verify_signature`, accessing `tx_sudo.provider_id` on an empty record triggered a "ValueError: Expected singleton" crash. Consequently, Stripe would interpret these 500 errors as a server failure and automatically disable the webhook endpoint, breaking online payments. This commit fixes the issue by checking if `tx_sudo` exists before proceeding with signature verification. If no transaction is found, Odoo now logs a warning and returns a 200 OK status to gracefully acknowledge and ignore the extraneous event. opw-5439528 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr