From 92ad3e86581408d96d2433a5b273d3ce2d6dfa8e Mon Sep 17 00:00:00 2001 From: Demesmaeker Date: Thu, 25 Nov 2021 11:30:46 +0000 Subject: [PATCH] [ADD] general/payment_acquirers: add doc on Stripe Webhook Setup and ease the way to get the api keys task-2574512 closes odoo/documentation#1335 Signed-off-by: Antoine Vandevenne (anv) --- .../general/payment_acquirers/stripe.rst | 47 +++++++++++++++---- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/content/applications/general/payment_acquirers/stripe.rst b/content/applications/general/payment_acquirers/stripe.rst index 55050f82a..c9a26c8bb 100644 --- a/content/applications/general/payment_acquirers/stripe.rst +++ b/content/applications/general/payment_acquirers/stripe.rst @@ -14,23 +14,50 @@ Configuration Credentials tab --------------- -Odoo needs your **API Credentials** to connect with your Stripe account, which comprise: +Odoo needs your **API Credentials** to connect with your Stripe account, which comprises: -- Publishable Key: The key solely used to identify the account with Stripe. -- Secret Key: The key to sign the merchant account with Stripe. -- Webhook Signing Secret: If a webhook is enabled on your Stripe account - (:menuselection:`Developers --> webhooks`), this signing secret must be set to authenticate the - messages sent from Stripe to Odoo. - -To retrieve the publishable and secret keys, log into your Stripe dashboard and go to -:menuselection:`Developers --> API Keys --> Standard Keys` +- :ref:`Publishable Key `: The key solely used to identify the account with Stripe. +- :ref:`Secret Key `: The key to sign the merchant account with Stripe. +- :ref:`Webhook Signing Secret `: When you enable your webhook on your Stripe + account, this signing secret must be set to authenticate the messages sent from Stripe to Odoo. .. important:: If you are trying Stripe as a test, in the **test mode**, change the **State** to *Test Mode*. We recommend doing this on a test Odoo database, rather than on your main database. +.. _stripe/api_keys: + +Publishable and Secret keys +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To retrieve the publishable and secret keys, follow this `link to your API keys +`_, or log into your Stripe dashboard and go to +:menuselection:`Developers --> API Keys --> Standard Keys`. + +.. _stripe/webhook: + +Webhook Signing Secret +~~~~~~~~~~~~~~~~~~~~~~ + +To retrieve the webhook signing secret, you first need to create a webhook. + +To do so, follow this `link to your webhooks `_, or log into +your Stripe dashboard and go to :menuselection:`Developers --> Webhooks`. Then, click on **Add +endpoint** in your **Hosted endpoints**. A form opens, where you'll need to add the following data: + +- | In the **Endpoint URL**, enter your Odoo database's URL followed by ``/payment/stripe/webhook``. + | For example: ``https://yourcompany.odoo.com/payment/stripe/webhook`` +- At the end of the form, you can **Select events** to listen to. Click on it and, in the + **Checkout** section, select **checkout.session.completed**. + +.. note:: + It is possible to select other events, but they are currently not processed by Odoo. + +When you click on **Add endpoint**, your Webhook is configured. You can then click on **reveal** to +display your signing secret. + Enable local payment methods -**************************** +---------------------------- Local payment methods are payment methods that are only available for certain merchants and customers countries and currencies.