Connect PrestaShop to Epsylon
A module to install on your store, an API key to paste, your references aligned and one cron line: shop stock follows the workshop, and web orders land in Epsylon. Around twenty minutes.
Version 1.0.0 · PrestaShop 1.7.6 → 8.x · PHP 7.4
Before you start
- An Epsylon account with the e-commerce module (Shop plan)
- A PrestaShop store, 1.7.6 or newer, up to 8.x
- PHP 7.4 minimum on the hosting
- Access to your hosting's task scheduler (crontab)
Step-by-step installation
1. Create the API key in Epsylon
In Epsylon: Settings → Integrations → API keys → Create a key. Give it a clear name (“PrestaShop store”) and pick the relevant store.
- The key and secret are shown only once, at creation: copy them immediately.
- A key is bound to one store: with several stores, create one key per shop.
- Required permissions: read and write:orders. Add write:stock only if you plan to push stock from the shop back to Epsylon.
A key created without explicit permissions only gets “read”. It answers reads correctly and rejects every write. The module's connection test queries /v1/me and names the missing permissions — it cannot report success on an insufficient key.2. Enable PrestaShop on the Epsylon side
Still under Settings → Integrations, open the PrestaShop panel and enable it. While the integration is off, Epsylon rejects orders sent by the shop.
- Seller assigned to web orders. Otherwise Epsylon creates a system user “prestashop_bot” that will own these documents.
- Document type created on order receipt: draft, sales order or invoice.
- Notification email, optional: you get a message for every synced order.
3. Install the module on PrestaShop
Download the ZIP archive at the top of this page, then in PrestaShop: Modules → Module Manager → Upload a module → select the file.
- Compatible with PrestaShop 1.7.6 through 8.x, PHP 7.4 minimum.
- The module creates its own log table and registers three hooks: order validation, status change, quantity update.
- To upgrade, simply upload the new archive: your settings are kept.
4. Enter the connection details
Open the module configuration. Enter your Epsylon instance URL, the key and the secret, save, then click “Test connection”.
- The URL is your instance, for example https://app-epsylon.fr — no trailing slash and no /api.
- The test shows which store and company the key grants access to: that is how you catch a key pasted from another store.
- The secret field shows dots once saved. Leaving it untouched keeps the stored value.
5. Align your references
This is what everything hinges on. Catalogues are matched by reference: the “Reference” field on the PrestaShop product must be strictly identical to the Epsylon SKU — case, dashes and spaces included.
- Simple products: product.reference ↔ Epsylon product SKU.
- Combinations: each combination's own reference ↔ the Epsylon variant SKU. A combination with no reference of its own cannot be synced, and its orders will come through under the parent reference.
- Different or missing reference: the order still arrives, but as a free-text line at the shop price with a 20% default VAT rate, and no stock movement.
- Before the first sync, export both catalogues and compare. An hour of work that saves weeks of stock drift.
6. Set up the scheduled task
This is the one real difference from WooCommerce. PrestaShop triggers no periodic task of its own: the downward sync must be called by your hosting scheduler. The module screen shows the exact line to copy, token included.
- Hourly suits most shops. Tighten it if your stock moves fast.
- The URL is protected by a token generated at install. You can regenerate it from the module screen — remember to update the cron line.
- A “Sync now” button triggers a cycle by hand, and “Full resync” re-reads everything after an incident.
- If your shop uses custom order states for cancellations or returns, declare their IDs in the dedicated field: without them, stock reserved in Epsylon will not be released.
Without a scheduled task, orders still reach Epsylon (they are sent in real time), but shop stock stops coming down. It is the most common failure mode, and the quietest: everything looks fine until the first oversell.
What happens on each order
Nothing is validated on your behalf: a web order becomes a draft you check.
The order is placed on your site
The module sends the order to Epsylon as soon as it is validated, then on every state change: payment accepted, shipped, cancelled or refunded. PrestaShop's three native cancellation states are recognised out of the box; if you created your own, declare them in the module configuration.
Epsylon creates the document
A document of the type you chose is created as a draft, in the customer's name, with billing and delivery addresses and the payment method in the comments.
Lines are matched to your products
Each line is looked up by reference, first among products then among variants. When found, it takes Epsylon's price and VAT rate — not the site's. For a simple product the quantity is reserved against the store's stock; for a variant it is not (see the note below).
You validate as usual
The document stays a draft until you check it. If the order moves into a cancellation state the module recognises, Epsylon releases the reserved quantity — for simple products, the only ones reservation applies to.
A web order reserves stock, it does not deduct it. The definitive movement happens when you validate the document, exactly as for a counter sale. One caveat worth knowing: Epsylon does not track reserved stock per variant. In practice, selling a combination places no reservation at all, and the quantity published to the shop is the raw stock. On a catalogue made mostly of combinations, reservation therefore does not apply — stock stays accurate, but nothing is set aside between order and validation.
Troubleshooting
- “Connection established” but permissions are reported missing
- The key lacks some rights. In Epsylon, open Settings → Integrations → API keys and add the permissions named in the message, or create a new key from that screen.
- “Key or secret rejected by Epsylon (401)”
- The key or secret has a stray space, or the key was revoked. The secret is only shown at creation and cannot be retrieved: generate a new key if you lost it.
- “Valid key but IP not allowed (403)”
- The key carries an IP allowlist that excludes your hosting. Add your PrestaShop server's outbound IP, or remove the restriction.
- Orders come through, but stock never comes down
- The scheduled task is missing, or the token was regenerated after it was set up. Check the cron line shown in the module screen, and call the URL manually in a browser to read the response.
- Stock shown online is lower than in Epsylon
- That is expected: the shop publishes available stock, net of quantities reserved by ongoing orders and repairs.
- The shop price does not match Epsylon's
- PrestaShop stores prices tax-excluded and applies the product's tax rule afterwards. The module converts Epsylon's tax-inclusive price using Epsylon's VAT rate: if the PrestaShop tax rule carries a different rate, the displayed price diverges. Align both, or leave price sync off.
- A combination comes through under the parent reference
- The combination has no reference of its own in PrestaShop. Fill it in on the Combinations tab of the product, reusing the Epsylon variant SKU.
Changelog
- Stock and price sync from Epsylon, products and combinations, in paginated batches.
- Incremental sync: only items changed since the last cycle are re-fetched.
- Real-time order push: creation, payment, shipping, cancellation (native states plus any custom states you declare).
- Connection test checking the key's actual permissions.
- Sync log readable from the module screen.
- Scheduled task protected by a regenerable token.
On WooCommerce instead?
An equivalent extension exists for WooCommerce. And for everything else, Epsylon's public API is documented and open: any site can read stock from it and post its orders to it.