Adds automatic payments to contracts.
auto_awesome What this module does
AI-generated from the code · Odoo 16.0Lets you turn on automatic payment for contracts, so invoices created from them are posted, emailed and charged to a saved payment token without manual work.
This module adds an "Auto Pay" tab to contracts and contract templates. When you tick "Auto Pay?" on a contract, every invoice generated by that contract is automatically posted, sent to the customer using the chosen invoice email template, and paid with a stored payment token.
- On the contract you can pick the payment token to use, the invoice email template, a retry message template, a failure message template, how many retry attempts are allowed (default 3) and how many hours to wait between retries (default 24).
- On the customer form you can set a default payment token, which is used when the contract itself has none.
- If a payment fails, the invoice records the attempt and the failure time, and the retry or failure email is sent to the customer. Once the maximum number of attempts is reached, auto pay is switched off on the contract and the token is cleared.
- A scheduled job named "Contract Automatic Payments" runs every hour and retries failed payments once the waiting time has passed.
The module touches contracts, contract templates, invoices, payment transactions and customers. Two ready-made email templates are provided: "Invoice - AutoPay To Retry" and "Invoice - AutoPay Failed".
Depends on
Models and fields (4)
- res.partner · extends an existing modelpayment_token_id (Payment Token)
- account.move · extends an existing modelauto_pay_failed, auto_pay_attempts
- contract.contract · extends an existing modelpayment_token_id (Payment Token)
- contract.abstract.contract · extends an existing modelis_auto_pay (Auto Pay?), auto_pay_retries, auto_pay_retry_hours, invoice_mail_template_id (Invoice Message), pay_fail_mail_template_id (Payment Failed Message), pay_retry_mail_template_id (Payment Retry Message)
Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 16.0
Confirmed on 2026-11-03 in branch 16.0 of OCA/contract.
terminal Installation and usage
OCA documentation · Odoo 16.0Usage
Source · Odoo 16.0Enable Automatic Payment
- Navigate to a customer contract
- Check the
Auto Pay?box to enable automatic payment - Configure the options as desired
- Set the
Payment Tokento the payment token that should be used for automatic payment
Automatic Payment Settings
The following settings are available at both the contract and contract template level:
+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Description | +=======================+===============================================================================================================================================+ | Invoice Message | Message template that is used to send invoices to customers upon creation. | +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | Payment Retry Message | Message template that is used to alert a customer that their automatic payment failed for some reason and will be retried. | +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | Payment Fail Message | Message template that is used to alert a customer that their automatic payment failed and will no longer be retried. | +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | Auto Pay Retries | Amount of times to attempt an automatic payment before discontinuing and removing the payment token from the contract/account payment method. | +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | Auto Pay Retry Hours | Amount of hours that should lapse until retrying failed payments. | +-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
Payment Token
A valid payment token is required to use this module. These tokens are typically created during the website_sale checkout process, but they can also be created manually at the acquirer.
A payment token can be defined in one of two areas:
- Contract - Defining a payment token in the contract will allow for the use of this token for automatic payments on this contract only.
- Partner - Defining a payment token in the partner will allow for the use of this token for automatic payments on all contracts for this partner that do not have a payment token defined.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.