2021-07-09 13:29:30 +00:00
======
2023-05-10 14:04:30 +00:00
PayPal
2021-07-09 13:29:30 +00:00
======
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
`Paypal <https://www.paypal.com/> `_ is an American online payment provider available worldwide, and
one of the few that does not charge a subscription fee.
2016-09-21 15:06:48 +02:00
2023-11-22 17:27:25 +01:00
.. note ::
While PayPal is available in `over 200 countries/regions
<https://www.paypal.com/webapps/mpp/country-worldwide>`_, only ` a selection of currencies are
supported <https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies>`_.
2023-05-10 14:04:30 +00:00
Settings in PayPal
==================
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
To access your PayPal account settings, log into PayPal, open the :guilabel: `Account Settings` , and
open the :guilabel: `Website payments` menu.
2016-09-21 15:06:48 +02:00
2023-05-10 14:04:30 +00:00
.. image :: paypal/paypal-account.png
:align: center
:alt: PayPal account menu
2021-07-09 13:29:30 +00:00
.. important ::
2023-09-19 13:36:47 +02:00
Note that for PayPal to work **in Odoo** , the options :ref: `Auto Return <paypal/auto-return>` and
:ref: `PDT <paypal/pdt>` **must** be enabled.
2021-07-09 13:29:30 +00:00
2023-05-10 14:04:30 +00:00
.. _paypal/auto-return:
2021-07-09 13:29:30 +00:00
2023-05-10 14:04:30 +00:00
Auto Return
-----------
2021-07-09 13:29:30 +00:00
2023-05-10 14:04:30 +00:00
The **Auto Return** feature automatically redirects customers to Odoo once the payment is processed.
2021-07-09 13:29:30 +00:00
2023-05-10 14:04:30 +00:00
From :guilabel: `Website payments` , go to :menuselection:`Website preferences --> Update --> Auto
return for website payments --> Auto return` and select :guilabel:` On`. Enter the address of your
Odoo database (e.g., `https://yourcompany.odoo.com` ) in the :guilabel: `Return URL` field, and
:guilabel: `Save` .
2021-07-09 13:29:30 +00:00
.. note ::
2023-05-10 14:04:30 +00:00
Any URL does the job. Odoo only needs the setting to be enabled since it uses another URL.
2022-01-24 11:34:42 +00:00
2023-05-10 14:04:30 +00:00
.. _paypal/pdt:
2022-01-24 11:34:42 +00:00
2023-05-10 14:04:30 +00:00
Payment Data Transfer (PDT)
---------------------------
2022-01-24 11:34:42 +00:00
2023-05-10 14:04:30 +00:00
:abbr: `PDT (Payment Data Transfer)` allows to receive payment confirmations, displays the payment
status to the customers, and verifies the authenticity of the payments. From :menuselection:`Website
preferences --> Update`, scroll down to :guilabel:` Payment data transfer` and select :guilabel:` On`.
2019-05-13 11:17:42 +02:00
2023-05-10 14:04:30 +00:00
.. tip ::
PayPal displays your **PDT Identity Token** as soon as :ref: `Auto return <paypal/auto-return>`
and :ref: `Payment Data Transfer (PDT) <paypal/pdt>` are enabled. If you need the **PDT Identity
Token**, disable and re-enable :guilabel: `Payment data transfer` to display the token again.
2019-05-13 11:17:42 +02:00
2023-05-10 14:04:30 +00:00
PayPal Account Optional
2021-07-09 13:29:30 +00:00
-----------------------
2017-04-28 17:19:52 +02:00
2023-05-10 14:04:30 +00:00
We advise not to prompt customers to log in with a PayPal account upon payment. It is better and
more accessible for customers to pay with a debit/credit card. To disable that prompt, go to
:menuselection: `Account Settings --> Website payments --> Update` and select :guilabel: `On` for
:guilabel: `PayPal account optional` .
2017-04-28 17:19:52 +02:00
2019-05-13 11:17:42 +02:00
Payment Messages Format
-----------------------
2017-04-28 17:19:52 +02:00
2023-05-10 14:04:30 +00:00
If you use accented characters (or anything other than primary Latin characters) for customer names
or addresses, then you **must** configure the encoding format of the payment request sent by Odoo to
PayPal. If you do not, some transactions fail without notice.
2017-04-28 17:19:52 +02:00
2022-01-24 11:34:42 +00:00
To do so, go to `your production account <https://www.paypal.com/cgi-bin/customerprofileweb
2023-05-10 14:04:30 +00:00
?cmd=_profile-language-encoding>`_. Then, click :guilabel:` More Options` and set the two default
encoding formats as :guilabel: `UTF-8` .
2017-04-28 17:19:52 +02:00
2020-01-03 11:16:17 +01:00
.. tip ::
2022-01-24 11:34:42 +00:00
- For Encrypted Website Payments & EWP_SETTINGS error, please check the `Paypal documentation
2023-08-24 14:21:38 +02:00
<https://developer.paypal.com/docs/online/>`_.
2022-01-24 11:34:42 +00:00
- Configure your :ref: `Paypal Sandbox account <paypal/testing>` , then follow this
`link <https://sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding> `_
to configure the encoding format in a test environment.
2023-05-10 14:04:30 +00:00
Settings in Odoo
================
.. seealso ::
:ref: `payment_providers/add_new`
Credentials
-----------
Odoo needs your **API Credentials** to connect with your PayPal account. To do so, go to
:menuselection: `Accounting --> Configuration --> Payment Providers` and :guilabel: `Activate` PayPal.
Then, enter your PayPal account credentials in the :guilabel: `Credentials` tab:
- :guilabel: `Email` : the login email address in Paypal;
- :guilabel: `PDT Identity Token` : the key used to verify the authenticity of transactions.
Extra fees
----------
You can charge :ref: `extra fees <payment_providers/features/extra_fees>` to customers choosing to
pay with PayPal in order to cover the transaction fees PayPal charges you.
.. note ::
- You can refer to `Paypal Fees <https://www.paypal.com/webapps/mpp/paypal-fees> `_ to set up
fees.
- `Traders in the EU <https://europa.eu/youreurope/citizens/consumers/shopping/pricing-payments/index_en.htm> `_ are not allowed to charge extra fees for paying with credit cards.
2022-01-24 11:34:42 +00:00
.. _paypal/testing:
2017-04-28 17:19:52 +02:00
2019-05-13 11:17:42 +02:00
Test environment
================
2022-01-24 11:34:42 +00:00
Configuration
-------------
2017-04-28 17:19:52 +02:00
2023-05-10 14:04:30 +00:00
Thanks to PayPal sandbox accounts, you can test the entire payment flow in Odoo.
2017-04-28 17:19:52 +02:00
2023-05-10 14:04:30 +00:00
Log into the `Paypal Developer Site <https://developer.paypal.com/> `_ using your PayPal credentials,
which creates two sandbox accounts:
2017-04-28 17:19:52 +02:00
2022-01-24 11:34:42 +00:00
- A business account (to use as merchants, e.g.,
2023-05-10 14:04:30 +00:00
`pp.merch01-facilitator@example.com <mailto:pp.merch01-facilitator@example.com> `_ );
2022-01-24 11:34:42 +00:00
- A default personal account (to use as shoppers, e.g.,
`pp.merch01-buyer@example.com <mailto:pp.merch01-buyer@example.com> `_ ).
2017-04-28 17:19:52 +02:00
2023-05-10 14:04:30 +00:00
Log into PayPal sandbox using the merchant account and follow the same configuration instructions.
Enter your sandbox credentials in Odoo (:menuselection:`Accounting --> Configuration --> Payment
Providers --> PayPal` in the :guilabel:` Credentials` tab, and make sure the status is set on
:guilabel: `Test Mode` .
2017-04-28 17:19:52 +02:00
2019-05-13 11:17:42 +02:00
Run a test transaction from Odoo using the sandbox personal account.
2017-04-28 17:19:52 +02:00
2020-01-06 16:51:35 +01:00
.. seealso ::
2022-05-03 00:44:13 +00:00
- :doc: `../payment_providers`