|
5 | 5 | `Adyen <https://www.adyen.com/>`_ is a Dutch company that offers several online payment |
6 | 6 | possibilities. |
7 | 7 |
|
8 | | -.. seealso:: |
9 | | - - :ref:`payment_providers/add_new` |
10 | | - - :doc:`../payment_providers` |
11 | | - |
12 | | -.. note:: |
13 | | - Adyen works only with customers processing **more** than **10 million annually** or invoicing a |
14 | | - **minimum** of **1.000** transactions **per month**. |
15 | | - |
16 | | -Configuration |
17 | | -============= |
18 | | - |
19 | | -.. seealso:: |
20 | | - :ref:`payment_providers/add_new` |
21 | | - |
22 | | -First, reach Adyen support to enable :guilabel:`multiple partial capture` for you. |
23 | | - |
24 | | -Credentials tab |
25 | | ---------------- |
26 | | - |
27 | | -Odoo needs your **API Credentials** to connect with your Adyen account, which comprise: |
28 | | - |
29 | | -- **Merchant Account**: The code of the merchant account to use with Adyen. |
30 | | -- :ref:`API Key <adyen/api_and_client_keys>`: The API key of the webservice user. |
31 | | -- :ref:`Client Key <adyen/api_and_client_keys>`: The client key of the webservice user. |
32 | | -- :ref:`HMAC Key <adyen/hmac_key>`: The HMAC key of the webhook. |
33 | | -- :ref:`Checkout API URL <adyen/urls>`: The base URL for the Checkout API endpoints. |
34 | | -- :ref:`Recurring API URL <adyen/urls>`: The base URL for the Recurring API endpoints. |
35 | | - |
36 | | -You can copy your credentials from your Adyen account, and paste them in the related fields under |
37 | | -the **Credentials** tab. |
38 | | - |
39 | | -.. important:: |
40 | | - If you are trying Adyen as a test, with an Adyen *test account*, head to |
41 | | - :menuselection:`Accounting --> Configuration --> Payment Providers`. There, click on |
42 | | - :guilabel:`Adyen`, enable :guilabel:`Test Mode` and enter your credentials in the |
43 | | - :guilabel:`Credentials` tab. |
44 | | - |
45 | | -.. _adyen/api_and_client_keys: |
46 | | - |
47 | | -API Key and Client Key |
48 | | -~~~~~~~~~~~~~~~~~~~~~~ |
49 | | - |
50 | | -In order to retrieve the API Key and the Client Key, log into your Adyen account, go to |
51 | | -:menuselection:`Developers --> API Credentials`. |
52 | | - |
53 | | -- If you already have an API user, open it. |
54 | | -- If you don't have an API user yet, click on **Create new credential**. |
55 | | - |
56 | | -Go to :menuselection:`Server settings --> Authentification` and copy or generate your **API Key**. |
57 | | -Be careful to copy your API key as you'll not be allowed to get it later without generating a new |
58 | | -one. |
59 | | - |
60 | | -Now, head to :menuselection:`Client settings --> Authentification` and cody or generate your |
61 | | -**Client Key**. This is also the place where you can :ref:`allow payments to be made from your |
62 | | -website <adyen/allowed_origins>`. |
63 | | - |
64 | | -.. _adyen/hmac_key: |
65 | | - |
66 | | -HMAC key |
67 | | -~~~~~~~~ |
68 | | - |
69 | | -In order to retrieve the HMAC Key, you'll need to configure a `Standard Notification` webhook. For |
70 | | -this, log into your Adyen account then go to :menuselection:`Developers --> Webhooks --> Add webhook |
71 | | ---> Add Standard notification`. |
72 | | - |
73 | | -.. image:: adyen/adyen-add-webhook.png |
74 | | - :align: center |
75 | | - :alt: Configure a webhook. |
76 | | - |
77 | | -There, in :menuselection:`General --> Server configuration --> URL`, enter your server address |
78 | | -followed by `/payment/adyen/notification`. |
79 | | - |
80 | | -.. image:: adyen/adyen-webhook-url.png |
81 | | - :align: center |
82 | | - :alt: Enter the notification URL. |
83 | | - |
84 | | -Then enter :menuselection:`Security --> HMAC Key --> Generate`. Be careful to copy the key as you |
85 | | -will not be allowed to do it later without generating a new one. |
86 | | - |
87 | | -.. image:: adyen/adyen-hmac-key.png |
88 | | - :align: center |
89 | | - :alt: Generate a HMAC key and save it. |
90 | | - |
91 | | -You have to save the webhook to finalize its creation. |
92 | | - |
93 | | -.. _adyen/urls: |
94 | | - |
95 | | -API URLs |
96 | | -~~~~~~~~ |
97 | | - |
98 | | -All Adyen API URLs include a customer area-specific prefix generated by Adyen. To configure the |
99 | | -URLs, proceed as follows: |
100 | | - |
101 | | -#. Log into your Adyen account, then go to :menuselection:`Developers --> API URLs`. |
102 | | -#. Copy the :guilabel:`Prefix` for your live Customer area (i.e., **data center**) and save it for |
103 | | - later. |
104 | | - |
105 | | - .. image:: adyen/adyen-api-urls.png |
106 | | - :alt: Copy the prefix for the Adyen APIs |
107 | | - |
108 | | -#. In Odoo, :ref:`navigate to the payment provider Adyen <payment_providers/add_new>`. |
109 | | -#. In the :guilabel:`Checkout API URL` field, enter the following URL and replace `yourprefix` with |
110 | | - the prefix you previously saved: |
111 | | - `https://yourprefix-checkout-live.adyenpayments.com/checkout` |
112 | | -#. In the :guilabel:`Recurring API URL` field, enter the following URL and replace `yourprefix` with |
113 | | - the prefix you previously saved: |
114 | | - `https://yourprefix-pal-live.adyenpayments.com/pal/servlet/Recurring`. |
115 | | - |
116 | 8 | .. note:: |
117 | | - If you are trying Adyen as a test, you can use the following URLs instead: |
118 | | - |
119 | | - - :guilabel:`Checkout API URL`: `https://checkout-test.adyen.com` |
120 | | - - :guilabel:`Recurring API URL`: `https://pal-test.adyen.com/pal/servlet/Recurring` |
121 | | - |
122 | | -Adyen Account |
123 | | -------------- |
124 | | - |
125 | | -.. _adyen/allowed_origins: |
126 | | - |
127 | | -Allow payments from a specific origin |
128 | | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
129 | | - |
130 | | -To allow payment originated from your website, follow the steps in :ref:`adyen/api_and_client_keys` |
131 | | -to navigate to your API user and go to :menuselection:`Add allowed origins`, then add the URLs from |
132 | | -where payments will be made (the URLs of the servers hosting your Odoo instances). |
133 | | - |
134 | | -.. image:: adyen/adyen-allowed-origins.png |
135 | | - :align: center |
136 | | - :alt: Allows payments originated from a specific domain. |
137 | | - |
138 | | -Place a hold on a card |
139 | | ----------------------- |
140 | | - |
141 | | -Adyen allows you to capture an amount manually instead of having an immediate capture. |
142 | | - |
143 | | -To set it up, enable the **Capture Amount Manually** option on Odoo, as explained in the |
144 | | -:ref:`payment providers documentation <payment_providers/manual_capture>`. |
145 | | - |
146 | | -Then, open your Adyen Merchant Account, go to :menuselection:`Account --> Settings`, and set the |
147 | | -**Capture Delay** to **manual**. |
148 | | - |
149 | | -.. image:: adyen/adyen_capture_delay.png |
150 | | - :align: center |
151 | | - :alt: Capture Delay settings in Adyen |
152 | | - |
153 | | -.. caution:: |
154 | | - - If you configure Odoo to capture amounts manually, make sure to set the **Capture Delay** to |
155 | | - **manual** on Adyen. Otherwise, the transaction will be blocked in the authorized state in |
156 | | - Odoo. |
| 9 | + Adyen only works with customers processing **more than 10 million annually** or invoicing a |
| 10 | + **minimum of 1000 transactions per month**. |
| 11 | + |
| 12 | +.. _payment_providers/adyen/configure_dashboard: |
| 13 | + |
| 14 | +Adyen configuration |
| 15 | +=================== |
| 16 | + |
| 17 | +#. Create an Adyen account if necessary and log into your Adyen Customer Area. |
| 18 | + |
| 19 | + .. tip:: |
| 20 | + Log into your **Test account** to try the integration without charging customers. |
| 21 | + Switch to your **Live account** once you are ready to accept payments. |
| 22 | + |
| 23 | +#. `Contact the Adyen support team <https://docs.adyen.com/platforms/quickstart-guide/support#contact-adyen-support>`_ |
| 24 | + to enable the **Multiple partial capture** feature. |
| 25 | +#. In the Adyen Customer Area, go to :menuselection:`Developers --> API credentials` and click the |
| 26 | + relevant API credential user name in the list or click :guilabel:`Create new credential` to |
| 27 | + create a new one. |
| 28 | +#. In the :guilabel:`Server settings` section, click :guilabel:`Generate API key`, then click the |
| 29 | + :icon:`fa-copy` (:guilabel:`Copy API key`) icon and save the value for :ref:`later |
| 30 | + <payment_providers/adyen/configure_odoo>`. |
| 31 | +#. In the :guilabel:`Client settings` section, click :guilabel:`Generate client key`, then |
| 32 | + click the :icon:`fa-copy` (:guilabel:`Copy API key`) icon and save the value for :ref:`later |
| 33 | + <payment_providers/adyen/configure_odoo>`. |
| 34 | +#. Enter your Odoo website URL in the :guilabel:`Add allowed origins` field, then click |
| 35 | + :guilabel:`Add`. |
| 36 | +#. Click :guilabel:`Save changes` at the bottom of the page. |
| 37 | +#. Go to :menuselection:`Developers --> Webhooks` in the left menu and click :guilabel:`Create new |
| 38 | + webhook`. |
| 39 | +#. In the :guilabel:`Create new webhook` popup, click :guilabel:`Add` on to the :guilabel:`Standard |
| 40 | + webhook` line. |
| 41 | +#. On the :guilabel:`Webhook generation` form, in the :guilabel:`Server configuration` section, |
| 42 | + enter your Odoo database :guilabel:`URL` followed by `/payment/adyen/notification`. |
| 43 | +#. In the :guilabel:`Security` section, click :guilabel:`Generate` under :guilabel:`HMAC`, then |
| 44 | + click the :icon:`fa-copy` (:guilabel:`Copy HMAC to the clipboard`) icon and save the value for |
| 45 | + :ref:`later <payment_providers/adyen/configure_odoo>`. |
| 46 | +#. Click :guilabel:`Save configuration` at the bottom of the page. |
| 47 | +#. Go to :menuselection:`Developers --> API URLs`, then copy the :guilabel:`Prefix` and save it |
| 48 | + for :ref:`later <payment_providers/adyen/configure_odoo>`. |
| 49 | + |
| 50 | +.. _payment_providers/adyen/configure_odoo: |
| 51 | + |
| 52 | +Odoo configuration |
| 53 | +================== |
| 54 | + |
| 55 | +#. :ref:`Navigate to the Adyen payment provider<payment_providers/add_new>`. |
| 56 | +#. Fill in the :guilabel:`Merchant account`, :guilabel:`API Key`, :guilabel:`Client Key`, |
| 57 | + :guilabel:`HMAC Key`, and :guilabel:`API URL Prefix` fields with the values saved at the |
| 58 | + :ref:`Adyen configuration step <payment_providers/adyen/configure_dashboard>`. |
| 59 | +#. Configure the remaining options as needed. |
| 60 | +#. Set the :guilabel:`State` field to :guilabel:`Enabled`. |
| 61 | + |
| 62 | +.. tip:: |
| 63 | + If you want to :ref:`test Adyen without affecting live transactions |
| 64 | + <payment_providers/test-mode>`, use your **Test account** credentials, enter |
| 65 | + `https://checkout-test.adyen.com` in the :guilabel:`API URL Prefix` field, and set the |
| 66 | + :guilabel:`State` field to :guilabel:`Test Mode`. |
| 67 | + |
| 68 | +Manual capture |
| 69 | +============== |
| 70 | + |
| 71 | +To enable :ref:`manual capture <payment_providers/manual_capture>` for Adyen payments, follow |
| 72 | +these steps: |
| 73 | + |
| 74 | +#. :ref:`Navigate to the Adyen payment provider <payment_providers/add_new>`. |
| 75 | +#. Go to the :guilabel:`Configuration` tab and enable :guilabel:`Capture Amount Manually`. |
| 76 | +#. Log in to your Adyen Customer Area, then go to :menuselection:`Settings` and click |
| 77 | + :guilabel:`Company` in the :guilabel:`Account management` section. |
| 78 | +#. In the :guilabel:`General` section, click the :icon:`fa-pencil` (:guilabel:`Edit property`) |
| 79 | + icon next to the :guilabel:`Capture Delay` field. |
| 80 | +#. In the popup, set the :guilabel:`Capture delay` field to :guilabel:`Manual` and click |
| 81 | + :guilabel:`Save`. |
157 | 82 |
|
158 | 83 | .. note:: |
159 | | - - After **7 days**, if the transaction has not been captured yet, the customer has the right to |
160 | | - **revoke** it. |
| 84 | + - If the transaction is not captured within 7 days, the customer is entitled to revoke it. |
| 85 | + - You can :ref:`manually capture <payment_providers/manual_capture>` and :ref:`refund |
| 86 | + <payment_providers/refunds>` payments directly from your Adyen Customer Area. |
161 | 87 |
|
162 | 88 | .. seealso:: |
163 | 89 | :doc:`../payment_providers` |
0 commit comments