Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Paypal error with Odoo V18

Subscribe

Get notified when there's activity on this post

This question has been flagged
PaypalV18
7 Replies
4052 Views
Avatar
Lugnot Gaëtan

Hello,

After upgrade Odoo to V18, and follow this tutoriel for Paypal i got the error "Paypal : Failed to communicate with the API. Detail :" (https://www.odoo.com/documentation/18.0/fr/applications/finance/payment_providers/paypal.html#payment-providers-paypal-configuration-odoo)
Maybe i do something wrong, but i can't see what.

Could you help me please ?

Thank you.

0
Avatar
Discard
Avatar
songaimin
Best Answer

"GET /shop/payment HTTP/1.0" 200 - 44 0.022 0.088

2025-04-26 02:10:04,041 1 INFO odoo werkzeug: 172.18.0.1 - - [26/Apr/2025 02:10:04] "GET /im_livechat/assets_embed.css HTTP/1.0" 304 - 3 0.002 0.009

2025-04-26 02:10:04,052 1 INFO odoo werkzeug: 172.18.0.1 - - [26/Apr/2025 02:10:04] "POST /im_livechat/init HTTP/1.0" 200 - 17 0.011 0.013

2025-04-26 02:10:25,377 1 INFO odoo odoo.addons.payment_paypal.models.payment_transaction: Sending '/checkout/orders' request for transaction with reference S00045-2:

{'intent': 'CAPTURE',

 'payment_source': {'paypal': {'address': {'address_line_1': '14#2702 '

                                                             'Apartment 2702, '

                                                             'Building 14, '

                                                             'Meide City East, '

                                                             'Xunzi Street',

                                           'admin_area_1': '河北省',

                                           'admin_area_2': 'handan',

                                           'country_code': 'CN',

                                           'postal_code': '056107'},

                               'email_address': 'samxx8@163.com',

                               'experience_context': {'shipping_preference': 'NO_SHIPPING'},

                               'name': {'given_name': '',

                                        'surname': 'sam163'}}},

 'purchase_units': [{'amount': {'currency_code': 'USD', 'value': 1.15},

                     'description': 'Handan Qingque E-commerce Technology Co., '

                                    'Ltd.: S00045-2',

                     'payee': {'display_data': {'brand_name': 'Handan Qingque '

                                                              'E-commerce '

                                                              'Technology Co., '

                                                              'Ltd.',

                                                'business_email': 'green-magpie@outlook.com'},

                               'email_address': 'green-magpie@outlook.com'},

                     'reference_id': 'S00045-2'}]} 

2025-04-26 02:10:26,246 1 INFO odoo werkzeug: 172.18.0.1 - - [26/Apr/2025 02:10:26] "GET /zh_CN/forum/yuan-yi-ji-chu-2?sorting=last_activity_date+desc HTTP/1.0" 200 - 37 0.023 0.087

2025-04-26 02:10:26,562 1 ERROR odoo odoo.addons.payment_paypal.models.payment_provider: Invalid API request at https://api-m.paypal.com/v2/checkout/orders with data:

{'intent': 'CAPTURE',

 'payment_source': {'paypal': {'address': {'address_line_1': '14#2702 '

                                                             'Apartment 2702, '

                                                             'Building 14, '

                                                             'Meide City East, '

                                                             'Xunzi Street',

                                           'admin_area_1': '河北省',

                                           'admin_area_2': 'handan',

                                           'country_code': 'CN',

                                           'postal_code': '056107'},

                               'email_address': 'samxx8@163.com',

                               'experience_context': {'shipping_preference': 'NO_SHIPPING'},

                               'name': {'given_name': '',

                                        'surname': 'sam163'}}},

 'purchase_units': [{'amount': {'currency_code': 'USD', 'value': 1.15},

                     'description': 'Handan Qingque E-commerce Technology Co., '

                                    'Ltd.: S00045-2',

                     'payee': {'display_data': {'brand_name': 'Handan Qingque '

                                                              'E-commerce '

                                                              'Technology Co., '

                                                              'Ltd.',

                                                'business_email': 'green-magpie@outlook.com'},

                               'email_address': 'green-magpie@outlook.com'},

                     'reference_id': 'S00045-2'}]} 

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/addons/payment_paypal/models/payment_provider.py", line 102, in _paypal_make_request

    response.raise_for_status()

  File "/usr/lib/python3/dist-packages/requests/models.py", line 1021, in raise_for_status

    raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api-m.paypal.com/v2/checkout/orders

2025-04-26 02:10:26,565 1 WARNING odoo odoo.http: PayPal: The communication with the API failed. Details:  

2025-04-26 02:10:26,568 1 INFO odoo werkzeug: 172.18.0.1 - - [26/Apr/2025 02:10:26] "POST /shop/payment/transaction/45 HTTP/1.0" 200 - 33 0.015 1.210

2025-04-26 02:10:39,435 1 INFO odoo werkzeug: 172.18.0.1 - - [26/Apr/2025 02:10:39] "GET /websocket?version=18.0-3 HTTP/1.0" 400 - 2 0.001 0.002

2025-04-26 02:11:04,201 1 INFO odoo werkzeug: 172.18.0.1 - - [26/Apr/2025 02:11:04] "GET /websocket?version=18.0-3 HTTP/1.0" 400 - 2 0.001 0.002





I encountered the same problem? It's unsolvable now...

0
Avatar
Discard
Avatar
Joel Salazar
Best Answer

I am encountering the same issue and have followed all the provided guidelines, but I continue to receive a “Failed to communicate with the API” error.

Initially, I thought the issue was related to my instance, so I set up a trial instance on Odoo Online but experienced the same error. To rule out sandbox API credential issues, I tested with live credentials but encountered the same result.

As my next step, I plan to launch a new instance running Odoo Community 17 to verify if the issue persists in that version.

I would appreciate any insights or suggestions on resolving this matter. Thank you for your time and support everyone.

0
Avatar
Discard
Avatar
Audrey Ng
Best Answer

Hi all, 

I have experienced the same issue but managed to resolve it on my end. It appears that the Odoo documentation is unclear. 


Please try these steps to configure correctly. Please note I am using sandbox environment. 

  1. Log into the Paypal developer dashboard, you will have 2 sandbox accounts set up automatically. 
    The Merchant (business) and personal (as a Consumer). 
  2. Create an API app for the merchant paypal email address.
  3. The client ID and secret key will be generated. 
  4. Log into paypal using the merchant account credentials (See Sandbox accounts for credentials).
  5. Navigate to Account settings > Website payments to set up the payment data transfer that will generate the Identity Token which we will use as our Webhook ID.


Getting your Client ID and secret key, and the merchant account credentials for Step 4.


To get your Webhook ID


Hope it helps.


Regards,

Audrey Ng

3D Photomation Pty Ltd

0
Avatar
Discard
Avatar
Speedswim
Best Answer

We're experiencing the same issue after our upgrade.

0
Avatar
Discard
Avatar
rivecon GmbH
Best Answer

Hi,

you need to manual setup your PayPal Webhook in Odoo.

You find your Webhook ID here: https://www.paypal.com/businessmanage/preferences/website

Just copy to Odoo and use the PayPal App you used before. Odoo lost the Webhook during migration.


0
Avatar
Discard
Avatar
Malte Barner
Best Answer

Hi threre, i am facing the same problem. Customers cannot use paypal to pay my invoices.

I tried to find the problem by myself...

Seems like my Odoo 18.0 instance is not sending anything about the customer to paypal (missing name, address, postal code, city, country). only my business information was shared. Customer is private without Tax-ID, without PEPPOL.

2025-02-07 11:30:38,948 1 ERROR xxxxx odoo.addons.payment_paypal.models.payment_provider: Invalid API request at https://api-m.paypal.com/v2/checkout/orders with data:

{'intent': 'CAPTURE',
'payment_source': {'paypal': {'address': {'address_line_1': '',
                                           'admin_area_1': False,
                                           'admin_area_2': False,
                                           'country_code': False,
                                           'postal_code': False},
                               'email_address': 'xxxxxx@xx.xx',
                               'experience_context': {'shipping_preference': 'NO_SHIPPING'},
                               'name': {'given_name': 'xxxx',
                                        'surname': 'xxxxx'}}},
'purchase_units': [{'amount': {'currency_code': 'EUR', 'value': 1.0},
                     'description': 'xxxxxx: '
                                    'RE_xxxxxxx',
                     'payee': {'display_data': {'brand_name': 'xxxxx '
                                                              'xxxxxx',
                                                'business_email': 'xxxx@xxx.xx'},
                               'email_address': 'xxx@xx.xxx'},
                     'reference_id': 'RE_xxxxxxxx'}]}
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/payment_paypal/models/payment_provider.py", line 102, in _paypal_make_request


0
Avatar
Discard
Avatar
Luca La Greca
Best Answer

Hi, same problem here for me

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Hide 'Apps' module from the HOME screen for users not set as 'Administrators'. Solved
V18
Avatar
Avatar
1
Jun 25
2429
Truenas Official docker odoo self hosted image no persistancy
V18
Avatar
1
May 25
2692
Import Products - Internal Notes Solved
products V18
Avatar
Avatar
Avatar
2
Sep 25
894
name_search is not working for Many2oneReference field Solved
V18 Many2oneReference
Avatar
Avatar
Avatar
2
Sep 25
1120
Error (Real-time connection lost) Odoo 18 Community Solved
V18 Odoo 18
Avatar
Avatar
Avatar
Avatar
Avatar
12
Sep 25
34733
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now