[IMP] payment_providers/razorpay: connect button

task-4922616

closes odoo/documentation#14813

X-original-commit: 5b1f9db639
Signed-off-by: Audrey Vandromme (auva) <auva@odoo.com>
This commit is contained in:
Audrey (auva)
2025-08-01 15:02:52 +00:00
parent 33893d7ef4
commit 965c07f17b

View File

@@ -2,53 +2,85 @@
Razorpay Razorpay
======== ========
`Razorpay <https://razorpay.com/>`_ is an online payments provider established in India and `Razorpay <https://razorpay.com/>`_ is an online payments provider established in India that
covering more than 100 payment methods. supports more than 100 payment methods.
.. _payment_providers/razorpay/oauth-connection:
Create a Razorpay account with Odoo (Indian companies only)
===========================================================
.. note::
- This method is only available for Indian companies.
- This flow does not support the :ref:`test mode <payment_providers/test-mode>`.
#. :ref:`Navigate to the Razorpay payment provider <payment_providers/supported_providers>` and
click :guilabel:`Connect`.
#. Go through the account creation process and enter the verification codes when prompted.
.. tip::
If you already have a Razorpay account, enter your Razorpay credentials, select the account
you want to link to your Odoo database (if applicable), then click :guilabel:`Continue`.
#. At the end of the process, click :guilabel:`Authorize`. If all required information
has been submitted, you are then redirected to Odoo, and the payment provider is
:guilabel:`Enabled`.
.. _payment_providers/razorpay/manual-connection:
Manual credentials and webhook input
====================================
.. _payment_providers/razorpay/configure_dashboard: .. _payment_providers/razorpay/configure_dashboard:
Configuration on Razorpay Dashboard Razorpay configuration
=================================== ----------------------
#. Log into `Razorpay Dashboard <https://dashboard.razorpay.com/>`_ and go to #. `Create a Razorpay account <https://accounts.razorpay.com/>`_ if necessary and log into the
:menuselection:`Settings --> API Keys`. Generate the new keys and copy the values of the `Razorpay Dashboard <https://dashboard.razorpay.com/>`_.
:guilabel:`Key Id` and :guilabel:`Secret Key` fields and save them for later. #. Go to the :guilabel:`Payments` tab at the top of the page.
#. | Go to :menuselection:`Settings --> Webhooks`, click on :guilabel:`Create New Webhook`, #. Toggle the :guilabel:`Test Mode` switch in the left menu to try the integration without
and enter your Odoo database URL followed by `/payment/razorpay/webhook` in charging customers. Toggle it off once you are ready to accept real payments.
the :guilabel:`Webhook URL` text field. #. Click :guilabel:`Account & Settings` in the left menu, then, under :guilabel:`Website and app
settings`, select `API Keys <https://dashboard.razorpay.com/app/website-app-settings/api-keys>`_.
#. Copy the values of the :guilabel:`Key Id` and :guilabel:`Secret Key` fields and save them for
later.
#. Click :guilabel:`Account & Settings` in the left menu, then, under :guilabel:`Website and app
settings`, select `Webhooks <https://dashboard.razorpay.com/app/website-app-settings/webhooks>`_.
#. | Click :guilabel:`Add New Webhook`, then enter your Odoo database URL followed by
`/payment/razorpay/webhook` in the :guilabel:`Webhook URL` field.
| For example: `https://example.odoo.com/payment/razorpay/webhook`. | For example: `https://example.odoo.com/payment/razorpay/webhook`.
#. Fill the :guilabel:`Secret` field with a password of your choice and save it for later. #. Fill the :guilabel:`Secret` field with a password of your choice and save it for later.
#. Make sure the :guilabel:`payment.authorized`, :guilabel:`payment.captured`, #. Enable the following events: :guilabel:`payment.authorized`, :guilabel:`payment.captured`,
:guilabel:`payment.failed`, :guilabel:`refund.failed` and :guilabel:`refund.processed` :guilabel:`payment.failed`, :guilabel:`refund.failed`, and :guilabel:`refund.processed`.
checkboxes are ticked. #. Click :guilabel:`Create Webhook` to finalize the configuration.
#. Click on :guilabel:`Create Webhook` to finalize the configuration.
.. _payment_providers/razorpay/recurring_payments: .. _payment_providers/razorpay/recurring_payments:
.. important:: .. important::
The :guilabel:`Recurring payments` feature must The `Recurring payments <https://razorpay.com/docs/payments/recurring-payments/>`_ feature must
be activated if you want to make recurring payments. be activated to accept recurring payments. To enable this feature, submit a request to the
Send a request to the `Razorpay Support team <https://razorpay.com/support/#request>`_ to `Razorpay Support team <https://razorpay.com/support/#request>`_.
enable recurring payments.
.. _payment_providers/razorpay/configure_odoo: .. _payment_providers/razorpay/configure_odoo:
Configuration on Odoo Odoo configuration
===================== ------------------
#. :ref:`Navigate to the payment provider Razorpay <payment_providers/add_new>` and change its #. Activate :ref:`developer mode <developer-mode>`.
state to :guilabel:`Enabled`. #. :ref:`Navigate to the Razorpay payment provider <payment_providers/add_new>`.
#. In the :guilabel:`Credentials` tab, fill the :guilabel:`Key Id`, :guilabel:`Key Secret`, and #. In the :guilabel:`Credentials` tab, fill the :guilabel:`Key Id`, :guilabel:`Key Secret`, and
:guilabel:`Webhook Secret` with the values you saved at the step :guilabel:`Webhook Secret` with the values you saved during
:ref:`payment_providers/razorpay/configure_dashboard`. :ref:`payment_providers/razorpay/configure_dashboard`.
#. Configure the rest of the options to your liking. #. Configure the remaining options as needed.
#. Set the :guilabel:`State` field to :guilabel:`Enabled` (or :guilabel:`Test Mode` if you are
trying Razorpay as a :ref:`test <payment_providers/test-mode>`).
.. important:: .. important::
If you configure Odoo to capture amounts manually: If you configure Odoo to :ref:`capture amounts manually <payment_providers/manual_capture>`:
- Be aware that the **manual voiding** of a transaction is not supported by Razorpay. - **Manual voiding** of a transaction is not supported by Razorpay.
- After **five days**, if the transaction hasn't been captured yet, it'll automatically be - Transactions that remain uncaptured for more than **five days** are automatically **voided**.
**voided**.
.. seealso:: .. seealso::
- :doc:`../payment_providers` :doc:`../payment_providers`