Overview
Customers increasingly ask to split a purchase into instalments at checkout. This module adds a buy-now-pay-later provider to Odoo Payments with public and secret keys and a merchant code. It performs a pre-scoring request to decide when the option is offered, creates the checkout session, and supports capture and refund from the transaction. It works with eCommerce, including the express payment block on product pages.
Usage steps
- 1
Configure the provider
Open the payment provider and fill Public API Key, Secret API Key and Merchant Code. These fields are visible only to system administrators. Choose the supported currencies.
- Fields: Public API Key, Secret API Key, Merchant Code
- Supported Currencies
- 2
Register the webhook
Press the register webhook action to create the callback at the gateway. The webhook ID is stored on the provider. A remove action deletes it when needed.
- Actions: register and remove webhook
- Field: Webhook ID
- 3
Compatibility and pre-scoring
When the cart loads, compatible providers are filtered by currency and a pre-scoring payload built from the order is sent. Only eligible orders see the option. Payment methods are loaded from data.
- Method _get_compatible_providers
- Pre-scoring request payload
- 4
Create the checkout session
On payment the checkout payload with buyer, items and amount is sent and the customer is redirected. After payment the return route /payment/... gateway handles success, cancel or failure. The status updates the transaction.
- Return route with status
- Templates gateway_templates
- 5
Webhook and notifications
The public webhook /payment/webhook/gateway receives updates and the transaction is matched from them. The handler processes authorised and closed statuses. Sale orders follow the payment state.
- Route /payment/webhook/gateway
- csrf disabled for the webhook
- 6
Capture and refund
From the transaction the accountant captures the authorised amount or refunds. References for capture, cancel and refund are stored on the transaction. Partial amounts are supported.
- Fields: Capture, Cancel, Refund Reference
- Methods _send_capture_request, _send_refund_request
- 7
Express payment on shop
The website sale templates and controller add an instalment message and express payment values to the product and cart pages. Customers see the split amount early. It increases conversion.
- Template website_sale_templates
- Product and cart pages
Screens
Illustrative mockups with placeholder data.
—
Added by this module
Roles
| Role |
|---|
| Accountant |
| eCommerce manager |
| Customer |
Dependencies
Want to know more or try this app? Contact us
We can arrange a demo or a trial and answer your questions about Buy Now Pay Later Gateway.