|
| 1 | +==================================== |
| 2 | +Subscriptions and automatic payments |
| 3 | +==================================== |
| 4 | + |
| 5 | +By default, the **Subscriptions** app will automatically generate quotations and invoices for |
| 6 | +customers, but it can also support automatic payments. Setting up automatic payments requires |
| 7 | +additional configuration, including choosing an automatic payment provider and either setting up a |
| 8 | +customer portal or an eCommerce website. Here's an overview of how to get started. |
| 9 | + |
| 10 | +Choosing an automatic payment provider |
| 11 | +====================================== |
| 12 | + |
| 13 | +Setting up automatic recurring payments requires using a payment provider that supports |
| 14 | +:ref:`tokenization <payment_providers/tokenization>`, which lets customers save their payment |
| 15 | +details with a chosen provider. The following payment providers support tokenization: |
| 16 | + |
| 17 | +- Adyen |
| 18 | +- Authorize.net |
| 19 | +- Flutterwave |
| 20 | +- Razorpay |
| 21 | +- Stripe |
| 22 | +- Worldline |
| 23 | +- Xendit |
| 24 | + |
| 25 | +Once a payment provider has been selected, an account must be created on their website and API |
| 26 | +credentials must be requested. The API credentials allow Odoo to communicate with the payment |
| 27 | +provider's services. Once the API credentials have been generated, payment providers can be |
| 28 | +:ref:`enabled <payment_providers/add_new>` and made available to customers in either the Accounting |
| 29 | +or Sales apps. |
| 30 | + |
| 31 | +Setting up customer portals and eCommerce websites |
| 32 | +================================================== |
| 33 | + |
| 34 | +Once you've set up an automatic payment provider, customers can sign up for automatic payments |
| 35 | +through an eCommerce website or through an online customer portal. An eCommerce website allows |
| 36 | +customers to view the product catalog and make purchases directly through the website. Granting |
| 37 | +customers portal access lets them view their quotations and sales orders, pay invoices, manage |
| 38 | +subscriptions, and more. |
| 39 | + |
| 40 | +.. important:: |
| 41 | + Building an eCommerce website requires the :doc:`Website <../../websites/website>` app. |
| 42 | + |
| 43 | +Contract in exception |
| 44 | +===================== |
| 45 | + |
| 46 | +On rare occasions, automatic payments can fail to register properly, which results in a |
| 47 | +:guilabel:`Payment Failure` tag on the sales order and the :guilabel:`Contract in exception` |
| 48 | +checkbox being automatically ticked in the :guilabel:`Subscription` section of the sales order's |
| 49 | +:guilabel:`Other Info` tab. |
| 50 | + |
| 51 | +Being marked :guilabel:`Contract in exception` prevents scheduled actions from running, which |
| 52 | +keeps the system from accidentally double-charging the customer if the automatic payment actually |
| 53 | +went through. Because the status of the payment failed to register with the system, users must |
| 54 | +manually check if the payment has been made before automatic payments and other scheduled actions |
| 55 | +can resume. |
| 56 | + |
| 57 | +To do this, navigate to :menuselection:`Subscriptions app --> Subscriptions --> Quotations`. |
| 58 | +Click into the desired subscription, then check the Chatter to see if the payment was made. |
| 59 | + |
| 60 | +If the payment *was not* made, first enter :doc:`developer mode <../../general/developer_mode>`. |
| 61 | +Then, click the :guilabel:`Other Info` tab, and untick the checkbox next to :guilabel:`Contract |
| 62 | +in exception`. Reload the sales order and confirm that the :guilabel:`Payment Failure` tag is |
| 63 | +gone. |
| 64 | + |
| 65 | +If the payment *was* made, a new invoice must be made and posted manually. This automatically |
| 66 | +updates the next invoice date of the subscription. Once the invoice is created, enter |
| 67 | +:doc:`developer mode <../../general/developer_mode>` and navigate to the new sales order. Click |
| 68 | +the :guilabel:`Other Info` tab, and untick the checkbox next to :guilabel:`Contract in |
| 69 | +exception`. Reload the sales order and confirm that the :guilabel:`Payment Failure` tag is gone. |
| 70 | + |
| 71 | +.. figure:: renewals/contract-in-exception.png |
| 72 | + :alt: The contract in exception option selected with the payment failure tag shown. |
| 73 | + |
| 74 | +The :guilabel:`Contract in exception` option selected with the :guilabel:`Payment Failure` tag |
| 75 | +shown. |
| 76 | + |
| 77 | +In both cases, once the :guilabel:`Contract in exception` checkbox is no longer ticked, Odoo |
| 78 | +handles renewals automatically again. If the subscription remains in :guilabel:`Payment Failure`, |
| 79 | +it is ignored by Odoo until the sales order is closed. |
| 80 | + |
| 81 | +.. seealso:: |
| 82 | + - :doc:`../../finance/payment_providers` |
| 83 | + - :doc:`../../general/users/portal` |
0 commit comments