Your online store and your ERP, finally telling the same story.
We connect Salla, Zid, Shopify and WooCommerce stores to ERPNext or your existing ERP, so that every online order, payment, return, stock movement and customer reaches your accounts automatically, and each sale produces one ZATCA-compliant e-invoice from the right system. It suits Saudi retailers and brands whose team still re-keys orders, chases stock differences or can't say which system issues the tax invoice.
Page updated · by the Origin Ecommerce team
- To report each B2C simplified invoice to ZATCA
- 24 hours
- Issuing invoices under your VAT number must be onboarded
- Every device
Two systems, two versions of the truth.
Most Saudi stores start simply: orders arrive in Salla, Zid or Shopify, and someone types them into the accounting system at the end of the day. That works at twenty orders a week. At two hundred, it becomes the bottleneck nobody budgeted for.
- Manual re-keying: orders, shipping fees, discounts and payment-gateway charges are copied by hand, and errors surface only at month-end reconciliation.
- Stock mismatch: the store sells an item the warehouse no longer has, or hides stock that is sitting on the shelf, because the two systems update at different times.
- Unclear tax invoice: the store generates an invoice, the ERP generates another, and nobody is sure which one is the legal tax invoice, or whether both were reported to ZATCA.
- Returns and refunds: a refund in the store isn't matched by a credit note in the books, so VAT returns and stock both drift.
- Payment reconciliation: payouts from mada, card, Apple Pay and buy-now-pay-later providers arrive as net batches that are hard to match to individual orders.
Which system issues the tax invoice?
Decide this before writing any code. Under Phase 2, every invoice must be generated by an onboarded solution, carry a cryptographic stamp and QR code, and be reported to ZATCA's Fatoora platform. Online sales to consumers are typically simplified tax invoices, which must be reported within 24 hours of issuance.
There are two clean answers. Either the store's invoicing (or an app it uses) is the e-invoicing solution, and the ERP records the sale without issuing a second invoice; or the ERP issues the invoice when the order arrives, and the store's own invoice is switched off or treated as an order confirmation. What you must avoid is both systems issuing and reporting an invoice for the same sale.
Returns follow the same rule. A refund or partial return needs a credit note that references the original invoice and goes through the same reporting flow.
B2B orders from VAT-registered buyers are different again: a standard tax invoice must be cleared by ZATCA before the buyer receives it. If your store takes trade orders, the design must handle both flows. Our ZATCA Phase 2 integration page explains clearance and reporting in detail.
Three ways to connect, in plain language.
There is no single right architecture. The choice depends on your order volume, how many channels you sell on, and how much your processes differ from the standard.
Third-party vendors advertise paid Salla and Zid connectors for ERPNext, and Frappe publishes a free connector for Shopify. We assess any existing connector on its merits before recommending a build.
| Approach | How it works | Good fit when | Watch out for |
|---|---|---|---|
| Direct connector | An app inside the ERP or store calls the other system’s API and listens for its webhooks | One store, standard order flow, a maintained connector exists | Limited control over mapping; check who maintains it and how it handles returns and ZATCA |
| Middleware | A small integration service sits between the systems, queues events and retries failures | Several channels (store, marketplace, POS) or high order volume | One more component to host and monitor |
| Custom integration | Purpose-built sync for your data model, pricing and invoice rules | B2B price lists, bundles, multi-warehouse or unusual workflows | Needs clear documentation and an owner after launch |
Every major platform exposes the events we need.
A reliable integration reacts to events (an order is created, paid, refunded) rather than polling for changes every few minutes. Each platform documents its own APIs and webhooks:
| Platform | Examples of webhook events | Notes |
|---|---|---|
| Salla | order.created, order.updated, order.refunded, invoice.created, product.quantity.low, customer.created | Merchant API at api.salla.dev; webhooks are verified by signature or token |
| Zid | order.create, order.status.update, order.payment_status.update, product.create | Order webhooks can be filtered by status, delivery option or payment method |
| Shopify | orders/create, orders/paid, orders/cancelled, refunds/create, inventory_levels/update, customers/create | Subscriptions via app configuration or the GraphQL Admin API |
| WooCommerce | order.created, order.updated, product.updated, customer.created | REST API with webhooks configured in WooCommerce settings |
| ERPNext | Receives data through its REST API | Frappe's free Ecommerce Integrations app covers Shopify order, customer and inventory sync |
One flow, from checkout to the general ledger.
- Orders to sales orders or invoices, with line items, discounts, coupons, shipping fees and VAT carried across exactly as the customer paid them.
- Customers, including B2B buyers' VAT numbers and addresses where your store collects them.
- Stock levels from the ERP back to the store, per warehouse or branch, so you stop overselling.
- Products and prices, in whichever direction your team manages them, with SKU as the shared key.
- Payments and gateway fees, recorded so that settlement batches reconcile against orders.
- Cancellations, returns and refunds as credit notes linked to the original invoice.
- Fulfilment and shipment status back to the store, so customers see accurate tracking.
- ZATCA status for each invoice: reported, cleared, rejected or awaiting retry, visible to finance.
From messy spreadsheets to a flow you can trust.
We start with a short discovery session with your finance and e-commerce leads, because the right design depends on how money and stock actually move in your business. You receive a written integration design and scope before development starts.
If you don't have an ERP yet, we can implement ERPNext as part of the same project through our ERP and ZATCA solutions service. If you are still choosing a store platform, see Salla vs Zid vs Shopify.
- 01
Map current order, stock, invoice and refund flows
- 02
Decide which system issues the ZATCA invoice
- 03
Agree data mapping: SKUs, taxes, customers, warehouses
- 04
Build and test against store and ZATCA sandboxes
- 05
Run in parallel, then switch over
- 06
Monitor sync and ZATCA status after launch
Also searched as
Questions answered.
Can you connect my Salla or Zid store to ERPNext?
Yes. Salla and Zid both publish merchant APIs and webhooks for orders, products and customers, and ERPNext has a REST API, so the two can be connected reliably. We first check whether an existing connector fits your order flow and ZATCA set-up. If none does, we build an integration that handles orders, stock, returns and invoices the way your finance team works.
Should my store or my ERP issue the ZATCA e-invoice?
Either can work, as long as only one of them does it. If your store's invoicing already meets Phase 2 for your business, the ERP can simply record the sale. If you need one consistent invoice process across online, B2B and branch sales, issuing from the ERP is usually cleaner. We map your flows and recommend one, with the trade-offs in writing.
How are returns and refunds handled?
A return or refund in the store creates a credit note in the ERP that references the original invoice, adjusts VAT and, where goods come back, returns them to stock. Under ZATCA Phase 2, credit notes follow the same reporting or clearance flow as the original invoice, so the integration sends them to Fatoora too.
Will stock update in real time?
Close to it. Orders reach the ERP through webhooks within moments of being placed, and stock changes are pushed back to the store as they happen or on a short schedule, depending on the platform's API limits. We also run a periodic full reconciliation, so a missed event can't leave the two systems out of step for long.
We sell on several channels. Can everything flow into one ERP?
Yes. When orders come from a store, a marketplace and in-store POS, a middleware layer usually works best: it receives events from each channel, applies one set of mapping rules and posts everything to the ERP in a consistent format. Stock is then allocated from a single source, which is what stops overselling across channels.
Talk to us about your project.
Tell us what you sell, the systems you use and your timeline. We reply with initial recommendations and a suggested next step for a free consultation.
Sources
Facts on this page were checked against these sources on the dates shown. Rules and prices change, so confirm anything critical with the source.
- ZATCA, Detailed Guidelines for E-Invoicing, version 2 (May 2023) (accessed 16 October 2026)
- Salla Developers, Webhooks (store events) (accessed 16 October 2026)
- Zid Developers, Webhooks (accessed 16 October 2026)
- Shopify Developers, Webhooks (accessed 16 October 2026)
- WooCommerce REST API documentation (webhooks) (accessed 16 October 2026)
- Frappe Cloud Marketplace, Ecommerce Integrations app (Shopify, Unicommerce, Zenoti) (accessed 16 October 2026)
- Example third-party listing: ERPNext Salla connector (vendor claim, not tested) (accessed 16 October 2026)
- Example third-party listing: ERPNext Zid connector (vendor claim, not tested) (accessed 16 October 2026)
Ready to start?
Book a free consultation. We review your goals and current setup, recommend the right approach and follow up with a written proposal covering scope, timeline and cost.
Prefer to talk first?
Email info@originsoftwares.com. Share your goal and we will suggest the fastest route to launch.
