|
| 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 | +Setting up a payment processor that supports automatic payments |
| 11 | +=============================================================== |
| 12 | + |
| 13 | +Setting up automatic recurring payments requires using a payment provider that supports |
| 14 | +tokenization. Tokenization lets customers save their payment details, such as credit card or banking |
| 15 | +account information, for automatic billing. The following payment providers support tokenization: |
| 16 | + |
| 17 | +- :doc:`Adyen <../../finance/payment_providers/adyen>` |
| 18 | +- :doc:`Authorize.net <../../finance/payment_providers/authorize>` |
| 19 | +- :doc:`Flutterwave <../../finance/payment_providers/flutterwave>` |
| 20 | +- :doc:`Razorpay <../../finance/payment_providers/razorpay>` |
| 21 | +- :doc:`Stripe <../../finance/payment_providers/stripe>` |
| 22 | +- :doc:`Xendit <../../finance/payment_providers/xendit>` |
| 23 | + |
| 24 | +Here are the steps to setting up automatic payments. |
| 25 | + |
| 26 | +#. Choose a payment provider that supports tokenization. |
| 27 | +#. Follow the provider's own setup guide to create an account and begin configuring their API |
| 28 | + credentials in Odoo. |
| 29 | +#. :ref:`Enable <payment_providers/add_new>` the payment provider. |
| 30 | +#. :ref:`Configure the payment methods <payment_providers/payment_methods>` for the chosen payment |
| 31 | + provider. |
| 32 | +#. :ref:`Configure the tokenization <payment_providers/tokenization>` for the chosen payment |
| 33 | + provider. |
| 34 | + |
| 35 | +How customers can set up automatic payments |
| 36 | +=========================================== |
| 37 | + |
| 38 | +Once these steps are complete, payment providers will be able to create tokens with customers' saved |
| 39 | +payment details during the checkout process. Saved payment details can then be used for future |
| 40 | +online or recurring subscription charges. Customers will also be able to log into their |
| 41 | +:doc:`customer portal <../../general/users/portal>` and enter their payment information there. |
| 42 | + |
| 43 | +Some payment providers will automatically save customers' payment information as part of the |
| 44 | +checkout process. Others will give them the option to save their information for future payments. If |
| 45 | +customers choose not to save their payment information, they will not be able to make automatic |
| 46 | +payments. |
| 47 | + |
| 48 | +.. important:: |
| 49 | + Building an **eCommerce** website requires the :doc:`Website <../../websites/website>` app. |
| 50 | + |
| 51 | +What happens if an automatic payment fails? |
| 52 | +=========================================== |
| 53 | + |
| 54 | +When an automatic payment fails, the sales order is updated with: |
| 55 | + |
| 56 | +- a :guilabel:`Payment Failure` tag |
| 57 | +- the :guilabel:`Contract in exception` checkbox ticked (in the :guilabel:`Subscription` section of |
| 58 | + the :guilabel:`Other Info` tab). |
| 59 | + |
| 60 | +Being marked :guilabel:`Contract in exception` prevents scheduled actions from running, which keeps |
| 61 | +the system from accidentally double-charging the customer if the automatic payment actually went |
| 62 | +through. Because the status of the payment failed to register with the system, users must manually |
| 63 | +check if the payment has been made before automatic payments and other scheduled actions can resume. |
| 64 | + |
| 65 | +To do this, navigate to :menuselection:`Subscriptions app --> Subscriptions --> Quotations`. Click |
| 66 | +into the desired subscription, then check the Chatter to see if the payment was made. |
| 67 | + |
| 68 | +If the payment *was not* made, first enter :doc:`developer mode <../../general/developer_mode>`. |
| 69 | +Then, click the :guilabel:`Other Info` tab, and untick the checkbox next to :guilabel:`Contract in |
| 70 | +exception`. Reload the sales order and confirm that the :guilabel:`Payment Failure` tag is gone. |
| 71 | + |
| 72 | +If the payment *was* made, a new invoice must be made and posted manually. This automatically |
| 73 | +updates the next invoice date of the subscription. Once the invoice is created, enter |
| 74 | +:doc:`developer mode <../../general/developer_mode>` and navigate to the new sales order. Click the |
| 75 | +:guilabel:`Other Info` tab, and untick the checkbox next to :guilabel:`Contract in exception`. |
| 76 | +Reload the sales order and confirm that the :guilabel:`Payment Failure` tag is gone. |
| 77 | + |
| 78 | +.. figure:: renewals/contract-in-exception.png |
| 79 | + :alt: The contract in exception option selected with the payment failure tag shown. |
| 80 | + |
| 81 | +The :guilabel:`Contract in exception` option selected with the :guilabel:`Payment Failure` tag |
| 82 | +shown. |
| 83 | + |
| 84 | +In both cases, once the :guilabel:`Contract in exception` checkbox is no longer ticked, Odoo handles |
| 85 | +renewals automatically again. If the subscription remains in :guilabel:`Payment Failure`, it is |
| 86 | +ignored by Odoo until the sales order is closed. |
| 87 | + |
| 88 | +.. seealso:: |
| 89 | + - :doc:`../../finance/payment_providers` |
| 90 | + - :doc:`../../general/users/portal` |
0 commit comments