odoo/odoo#69809

Created by Simon Goffin (sig)
label
odoo-dev:12.0-payment_stripe-checkout-webhook-backport
head
a1ff4dc25534467e138cdb26f5b52df7dd33b79c
target
12.0
merged
3 years ago by Simon Goffin (sig)
forward-ports

[IMP] payment_stripe: support webhooks

Allow configuring a webhook in Stripe to send s2s notifications to Odoo
when a Checkout payment is completed. Note that SetupIntent and
PaymentIntent events are not listened to, since they are handled 'live'
with the customer actively present; the main use case for Stripe
webhooks is a Checkout session that gets interrupted before the customer
is redirected to Odoo (e.g. network loss, browser crash, closing the
tab, etc.).

The webhook should be configured to send its events to
<base_url>/payment/stripe/webhook and should only subscribe to
checkout.session.completed events to avoid spamming the Odoo server with
useless notifications.

opw-2488452
opw-2451463
opw-2449738

BACKPORT of commit: dc4f6ad04f8bf3800c650d878b08e44775b95628

Should not be merged beyond 14.0 (14.0 excluded)