Payments¶
Payments are fully headless (see specs/04-payments.md): the checkout and
portal render the provider UI on the site, Odoo owns transactions and order
confirmation. Requires the odusite_payment addon.
Stripe (first supported provider)¶
- In Odoo: Invoicing/Website → Configuration → Payment Providers → Stripe. Set the Publishable Key and Secret Key (test keys first), state Test Mode or Enabled, and publish the provider.
- Create a Stripe webhook endpoint pointing at
https://<odoo>/payment/stripe/webhook(this is a stock Odoo route and must be reachable from the internet). Put the Webhook Signing Secret into the provider form. - Nothing Stripe-specific is configured on the site: the publishable key and
the PaymentIntent client secret are delivered through the API at checkout
time. The browser loads
js.stripe.comdirectly.
Flow (what to expect operationally)¶
- Site asks Odoo for compatible providers for the document (order/invoice).
- Site creates a
payment.transactionthrough the API; for Stripe the response carries the PaymentIntent client secret. - Customer pays in the embedded Stripe Payment Element.
- Stripe notifies Odoo via the webhook; Odoo confirms the order / reconciles the invoice exactly as with the stock website.
- The site polls the transaction state and shows the confirmation page.
Failed/stuck transactions are visible in Odoo under Payment Transactions as usual.
Other providers¶
Redirect-based providers (PayPal & co.) are supported by the generic redirect flow (the site auto-submits the provider form returned by the API), but each provider should be validated before production use — see the roadmap. Zero-amount orders confirm without any provider.