Skip to main content

How to Connect WooCommerce Payments to Odoo Without Using a Third-Party Connector

Why You Might Connect WooCommerce to Odoo Directly

If you run an online store in WooCommerce and manage inventory or accounting in Odoo, you face a choice: buy a connector plugin that syncs the two systems automatically, or build a manual or semi-automated bridge yourself. A direct connection without a paid connector is possible if you are comfortable working with APIs, webhooks, and basic data mapping—or if you have a developer on staff who is.

The trade-off is real. A connector handles updates in real time and requires almost no ongoing work. A direct integration takes time to set up, requires you to monitor it, and may need troubleshooting when either system updates. But if your transaction volume is low to moderate, or if you want to avoid monthly connector fees, a direct link can work.

This guide walks through the actual steps: what data moves between the systems, which tools you will use, and how to set up the flow so orders from WooCommerce land in Odoo without manual entry.

Key Takeaways

  • WooCommerce and Odoo both expose APIs that let you read order and payment data from one system and write it to the other, but you must build the connection yourself or hire a developer.
  • Webhooks (automatic notifications when an order is placed or paid) are faster and more reliable than polling (checking WooCommerce repeatedly for new orders), and both systems support them.
  • You will need WooCommerce REST API keys, Odoo database credentials, and a server or service that runs the sync code—either your own server, a cloud function, or a workflow automation tool like Zapier or Make.
  • The minimum viable sync moves order number, customer name, items, total price, and payment status from WooCommerce to Odoo; you can add shipping address, customer email, and payment method later.
  • Testing the sync with a small batch of test orders before going live prevents orders from being duplicated or lost in Odoo.

How Data Flows Between WooCommerce and Odoo

When a customer pays in WooCommerce, the order sits in WooCommerce's database with a status (pending, processing, completed), a list of items, a total, and payment details. Odoo has its own sales order object with similar fields. A direct integration reads the WooCommerce order and creates a matching sales order in Odoo, or updates an existing one if the order already exists.

The data you move depends on what you need. At minimum: order ID, customer name, item SKU or product name, quantity, unit price, and total. Most businesses also want the customer email, billing address, shipping address, and payment method. Some want to track which payment gateway processed the order (Stripe, PayPal, Square, etc.) so they can reconcile in accounting.

The flow usually runs one direction: WooCommerce to Odoo. You do not typically push inventory back to WooCommerce this way, because that requires a second sync and introduces the risk of conflicts. If you need inventory sync, that is a separate step and usually requires a connector or a more complex setup.

Setting Up WooCommerce REST API Access

WooCommerce exposes an API that lets you read orders, customers, and products. To use it, you need to generate API credentials in WooCommerce.

Log in to your WooCommerce store as an administrator. Go to Settings → Advanced → REST API. Click "Create an API key." Give it a name (for example, "Odoo Sync"), set the User to the account that will own the key, and set Permissions to "Read" if you only need to pull data, or "Read/Write" if you plan to update order status in WooCommerce from Odoo later. WooCommerce will generate a Consumer Key and Consumer Secret. Save both—you will need them in your sync code.

The API endpoint for orders is https://yourstore.com/wp-json/wc/v3/orders. You can test it immediately by opening this URL in your browser with the Consumer Key and Secret added as query parameters, or by using a tool like Postman. If it returns a list of orders, the API is working.

Accessing Odoo's API and Database

Odoo also has a REST API, but it works differently from WooCommerce. You authenticate with your Odoo username, password, and database name, then call methods on Odoo models (like sale.order) to create or update records.

First, enable the API in Odoo. Log in as an administrator, go to Settings → Activate the Developer Mode (click the bug icon in the bottom right), then go to Settings → Technical → API Access. Odoo will show you your User ID and your database name. You will also need to generate an API token: go to your user profile (top right), click Edit, scroll to the Security section, and click "Generate Token." Save this token—it is your password for API calls.

The Odoo API endpoint is https://yourodoo.com/api/resource/sale.order. To create a sales order, you send a POST request with the order data (customer, lines, total) and your authentication token. Unlike WooCommerce, Odoo requires you to know the internal ID of the customer record, not just the name. If the customer does not exist in Odoo yet, you must create a res.partner (contact) record first.

Choosing a Sync Method: Webhooks vs. Polling

You have two ways to trigger the sync: webhooks or polling.

Webhooks are faster and more efficient. When an order is placed in WooCommerce, WooCommerce sends an HTTP POST request to a URL you control (your sync server) with the order data attached. Your code reads it and immediately creates the order in Odoo. Webhooks fire only when something happens, so you are not wasting server resources checking for changes that do not exist.

To set up a webhook in WooCommerce, go to Settings → Advanced → Webhooks. Click "Add Webhook," choose the event (for example, "Order Created"), set the Delivery URL to your sync server (for example, https://myserver.com/sync-order), and choose the format (JSON). WooCommerce will send a POST request to that URL every time an order is created. Your server must respond with a 200 status code within 5 seconds, or WooCommerce will retry.

Polling means your code runs on a schedule (every 5 minutes, every hour) and checks WooCommerce for new orders. It is simpler to set up if you do not have a server, because you can use a cloud scheduler like AWS Lambda or Google Cloud Scheduler to run the code. But it is less efficient—you are making API calls even when there are no new orders—and orders take longer to appear in Odoo.

For most small to medium businesses, webhooks are worth the extra setup. If you do not have a server, a workflow automation tool like Zapier or Make can receive the webhook and run your sync code in the cloud.

Building or Automating the Sync

You have three options: write the sync code yourself, use a no-code automation tool, or hire a developer.

Writing code yourself requires knowledge of Python, JavaScript, or another language. You write a script that receives the WooCommerce webhook (or runs on a schedule), fetches the order data from WooCommerce, checks whether the customer exists in Odoo, creates the customer if needed, and then creates the sales order in Odoo. Libraries like the WooCommerce Python library and the Odoo Python RPC library make this easier. You host the script on your own server, a VPS, or a cloud function (AWS Lambda, Google Cloud Functions, Azure Functions).

No-code automation tools

Hiring a developer is the fastest route if you do not have the time or skill to build it yourself. A developer can write a custom sync in a few days, host it, and hand you a dashboard to monitor it. Cost varies widely depending on complexity and your location, but expect $1,000 to $5,000 for a basic sync.

Testing the Sync Before Going Live

Before you route real orders through the sync, test it thoroughly. Create a test order in WooCommerce (or ask your developer to create one). Watch the sync code run. Check Odoo to see whether the order appeared, whether all fields are correct, and whether the customer was created if needed.

Common issues: the customer name is blank because WooCommerce stores first and last name separately; the total is wrong because tax or shipping was not included; the order appears twice because the sync ran twice; the customer was not found in Odoo because the email did not match. Test these scenarios before going live.

If you are using webhooks, WooCommerce logs every webhook delivery. Go to Settings → Advanced → Webhooks, click your webhook, and scroll to "Delivery Log." You can see whether the request was sent, what status code your server returned, and what the response was. If a delivery failed, WooCommerce will retry it automatically.

Once you are confident the sync is working, run it on a small batch of real orders (your first 10 or 20) and verify them in Odoo before opening it to all orders.

Monitoring and Troubleshooting the Sync

After the sync is live, check it regularly. Set up logging so you know when orders are synced and when errors occur. If an order does not appear in Odoo within a few minutes, investigate: check the webhook delivery log in WooCommerce, check your server logs, and check Odoo's activity log to see whether an error was recorded.

Common problems: the API token expired (Odoo tokens expire after a period of inactivity); the customer record was deleted in Odoo but the sync still tries to link to it; a product SKU changed and the sync cannot find the product; the sync is creating duplicate orders because it ran twice. Most of these are easy to fix once you know they happened.

If you are using a no-code tool, the tool usually has a dashboard that shows you which tasks succeeded and which failed. Check it weekly. If you wrote the code yourself, set up email alerts so you know immediately when something breaks.

Frequently Asked Questions

Do I need to use a connector if I have a developer?

No. A developer can build a direct sync for less than a year of connector fees if your order volume is moderate. The trade-off is that you own the code and must maintain it if WooCommerce or Odoo updates their API. A connector is maintained by the vendor, so you do not have to worry about that.

What if a customer places an order in WooCommerce but already exists in Odoo?

Your sync code should check whether the customer exists by email or phone before creating a new one. If the customer exists, link the order to the existing customer record. This prevents duplicate customers and keeps your Odoo database clean.

Can I sync inventory from Odoo back to WooCommerce?

Yes, but it requires a second sync running in the opposite direction. This is more complex because you must handle conflicts (what if inventory changes in both systems at the same time?) and it usually requires a connector or a more sophisticated custom setup. Start with orders only, then add inventory sync later if you need it.

What happens if the sync fails and an order is not created in Odoo?

If you are using webhooks, WooCommerce will retry the delivery automatically. If you are polling, the next scheduled run will pick up the order. Either way, you should monitor the logs so you know it happened and can investigate. Some setups send an alert email when a sync fails so you can fix it immediately.

Is a direct sync secure?

As secure as a connector, if you follow best practices: use HTTPS for all API calls, store API keys in environment variables (not in code), rotate tokens regularly, and limit API permissions to only what you need. Do not share your API keys or tokens, and do not commit them to version control.