Skip to Content
Menu
This question has been flagged
3 Replies
3197 Views

Using Odoo v17 community edition.  Within Odoo I have a simple ecommerce website setup.  I have activated Stripe in order to take payments on the site.  When I go into the stripe setup screen with odoo it asks for 2 pieces of information - the publishable key and the secret key.  I look those up on my stripe account and enter copy them in.  Then within the odoo setup it has a selectable button to 'generate your webhook'.  When I make this selection i receive an error message saying - "Validation Error - Stripe: The communication with the API failed. Stripe gave us the following info about the problem: 'Not a valid URL'".


Does anyone know what might be causing this message / error?  Thank you in advance for any  advice or suggestions that you can offer.

Avatar
Discard
Best Answer

Solution / Check 1: Check System Parameters

1. Log into Odoo

2. Activate Developer Mode:

   - Click on Settings (gear icon)

   - Click "Activate developer mode" at the bottom of the menu

3. Go to Settings > Technical > System Parameters

4. Find "web.base.url" parameter

5. Make sure its value starts with "https://" (e.g., https://domain.com)

6. If it doesn't start with "https://", edit and add it

7. Save changes


Solution / Check 2: Update Odoo Configuration File

1. Locate your Odoo configuration file (usually odoo.conf)

2. Open the file in a text editor

3. Add or update these two lines:


   proxy_mode = True
   x_forwarded_for = True


4. Save the file

5. Restart your Odoo server for changes to take effect


After completing both steps, try creating the Stripe webhook again.

Avatar
Discard
Author Best Answer

Hi Marc,

would you know where/how i can make that change (or where it is getting those extra backslashes from)?

Avatar
Discard
Best Answer

Hi Johnny, 

Here are some troubleshooting steps you can follow to resolve this issue:

1. Verify Webhook URL:

  • Double-check the URL you've entered in the Odoo Stripe setup for the webhook endpoint. Ensure there are no typos or extra spaces.
  • Make sure the URL format is correct, including the protocol (http:// or https://).

2. Public URL Requirement:

  • Stripe webhooks require a publicly accessible URL. If your Odoo website is behind a firewall or requires authentication, you'll need to set up a publicly accessible endpoint to receive Stripe webhook notifications.

Here are some possible solutions depending on your setup:

  • Public Webserver: If your Odoo website is hosted on a public web server, you can likely use the same URL for your website as the webhook endpoint.
  • Tunneling Services: If your Odoo instance is behind a firewall, you might consider using a tunneling service like ngrok (https://ngrok.com/) to create a temporary public URL for testing purposes. However, this wouldn't be ideal for a production environment.

Additional Tips:


Avatar
Discard
Author

Hi Marc,
Thank you kindly for your response and feedback. I may be missing something but as per your first point where you said to double check the URL I entered...

I actually didn't enter any URL. The setup i did within Odoo for Stripe was simply to enter the publishable key and the secret key values within the setup screen. The only other thing I did on the setup screen was to select the 'generate your webhook' button. This is the point at which the error comes up for me where it complains about the URL. Again, I haven't entered a URL anywhere but I assume it is picking up on the URL associated with my site. Also, when I contacted Stripe to see if they could offer any suggestions they indicated the the URL they see on their end (that my setup is trying to specify/use has the following format...

http://\\mysite.net/payment/stripe/webhook

i'm not sure where those extra \\ come from but maybe could be the reason it is complaining?

Hi Jonny,

Yes it could be the reason.

Author

johnny doe
1 day ago
Author
Hi Marc,

would you know where/how i can make that change (or where it is getting those extra backslashes from)?

Related Posts Replies Views Activity
1
May 25
904
0
Aug 24
946
2
Feb 24
1537
2
Mar 25
3200
0
Dec 24
861