diff --git a/content/applications/finance/payment_providers/razorpay.rst b/content/applications/finance/payment_providers/razorpay.rst index dc3e055635..db12717620 100644 --- a/content/applications/finance/payment_providers/razorpay.rst +++ b/content/applications/finance/payment_providers/razorpay.rst @@ -2,53 +2,85 @@ Razorpay ======== -`Razorpay `_ is an online payments provider established in India and -covering more than 100 payment methods. +`Razorpay `_ is an online payments provider established in India that +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 `. + +#. :ref:`Navigate to the Razorpay payment provider ` 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: -Configuration on Razorpay Dashboard -=================================== +Razorpay configuration +---------------------- -#. Log into `Razorpay Dashboard `_ and go to - :menuselection:`Settings --> API Keys`. Generate the new keys and copy the values of the - :guilabel:`Key Id` and :guilabel:`Secret Key` fields and save them for later. -#. | Go to :menuselection:`Settings --> Webhooks`, click on :guilabel:`Create New Webhook`, - and enter your Odoo database URL followed by `/payment/razorpay/webhook` in - the :guilabel:`Webhook URL` text field. +#. `Create a Razorpay account `_ if necessary and log into the + `Razorpay Dashboard `_. +#. Go to the :guilabel:`Payments` tab at the top of the page. +#. Toggle the :guilabel:`Test Mode` switch in the left menu to try the integration without + charging customers. Toggle it off once you are ready to accept real payments. +#. Click :guilabel:`Account & Settings` in the left menu, then, under :guilabel:`Website and app + settings`, select `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 `_. +#. | 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`. #. 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`, - :guilabel:`payment.failed`, :guilabel:`refund.failed` and :guilabel:`refund.processed` - checkboxes are ticked. -#. Click on :guilabel:`Create Webhook` to finalize the configuration. +#. Enable the following events: :guilabel:`payment.authorized`, :guilabel:`payment.captured`, + :guilabel:`payment.failed`, :guilabel:`refund.failed`, and :guilabel:`refund.processed`. +#. Click :guilabel:`Create Webhook` to finalize the configuration. .. _payment_providers/razorpay/recurring_payments: .. important:: - The :guilabel:`Recurring payments` feature must - be activated if you want to make recurring payments. - Send a request to the `Razorpay Support team `_ to - enable recurring payments. + The `Recurring payments `_ feature must + be activated to accept recurring payments. To enable this feature, submit a request to the + `Razorpay Support team `_. .. _payment_providers/razorpay/configure_odoo: -Configuration on Odoo -===================== +Odoo configuration +------------------ -#. :ref:`Navigate to the payment provider Razorpay ` and change its - state to :guilabel:`Enabled`. +#. Activate :ref:`developer mode `. +#. :ref:`Navigate to the Razorpay payment provider `. #. 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`. -#. 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 `). .. important:: - If you configure Odoo to capture amounts manually: + If you configure Odoo to :ref:`capture amounts manually `: - - Be aware that the **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 - **voided**. + - **Manual voiding** of a transaction is not supported by Razorpay. + - Transactions that remain uncaptured for more than **five days** are automatically **voided**. .. seealso:: - - :doc:`../payment_providers` + :doc:`../payment_providers`