Title: Australcode Facturación Electrónica SII &amp; Stock for Bsale
Author: australcode
Published: <strong>4 juli 2026</strong>
Last modified: 6 oktober 2026

---

Plugins zoeken

![](https://ps.w.org/australcode-dte-stock-sync-bsale/assets/banner-772x250.png?
rev=3644133)

![](https://ps.w.org/australcode-dte-stock-sync-bsale/assets/icon-256x256.png?rev
=3595667)

# Australcode Facturación Electrónica SII & Stock for Bsale

 Door [australcode](https://profiles.wordpress.org/australcode/)

[Download](https://downloads.wordpress.org/plugin/australcode-dte-stock-sync-bsale.3.9.2.zip)

 * [Details](https://nl.wordpress.org/plugins/australcode-dte-stock-sync-bsale/#description)
 * [Beoordelingen](https://nl.wordpress.org/plugins/australcode-dte-stock-sync-bsale/#reviews)
 *  [Installatie](https://nl.wordpress.org/plugins/australcode-dte-stock-sync-bsale/#installation)
 * [Ontwikkeling](https://nl.wordpress.org/plugins/australcode-dte-stock-sync-bsale/#developers)

 [Ondersteuning](https://wordpress.org/support/plugin/australcode-dte-stock-sync-bsale/)

## Beschrijving

**Australcode Facturación Electrónica SII & Stock** makes SII-compliant facturación
electrónica — boletas, facturas and credit notes (DTE) issued from your orders —
for any WooCommerce store in Chile, with automatic emission and dispatch guides 
in Pro. Real-time sync of products, stock and prices from Bsale to WooCommerce. 
The Free version already includes real-time webhook stock updates, credit notes,
and on-demand stock audit — with no per-document or per-boleta fees. Mature plugin
in production since 2023, now part of the Australcode family.

It covers the full lifecycle of a Chilean e-commerce transaction: from product catalog
sync to manual or automatic emission of the SII-compliant tax document required 
for each WooCommerce order.

_Australcode is an independent developer. This plugin is a third-party integration
for Bsale and WooCommerce; it is not affiliated with, endorsed by, or sponsored 
by Bsale, Defontana SpA, or the WooCommerce/Automattic trademark holders._

#### Free version

Everything you need to run a typical Chilean e-commerce store with WooCommerce +
Bsale:

 * **Product sync** — One-way synchronization from Bsale to WooCommerce. Imports
   product catalog including variants, SKUs, prices, and stock levels.
 * **Single-office stock** — Stock from one configured Bsale office, with optional
   reserve buffer for in-person sales.
 * **Real-time stock updates via webhooks** — Bsale stock changes propagate to WooCommerce
   in seconds.
 * **Manual emission of boleta and factura** — Issue documents from the order admin
   screen. Document type auto-detected from customer billing data (RUT empresa  
   factura, otherwise boleta).
 * **Credit notes (notas de crédito)** — Manual emission for refunds.
 * **Chilean checkout fields** — Adds RUT field with module-11 validation. Compatible
   with both Block-based Checkout and Classic Checkout.
 * **Order metabox** — Per-order Bsale status, PDF link, document type, and re-emit
   controls.
 * **Email PDF to customer** — Automatic dispatch of the emitted document to the
   customer’s email.
 * **Stock audit (on-demand)** — Run-when-needed audit comparing WooCommerce and
   Bsale stock. Discrepancy detection and traceability, with an optional email summary
   of the discrepancies found.
 * **Diagnostics** — Dashboard with API/webhook status, logs viewer with filters
   and retention policy, traceability ledger (read-only).
 * **HPOS compatible** — Declares compatibility with WooCommerce High-Performance
   Order Storage and Cart/Checkout Blocks.

#### Pro version

Adds workflow automation, multi-warehouse support, and advanced B2B features:

 * **Auto-emission post-payment** — Documents emitted automatically when WooCommerce
   orders reach configurable statuses (processing, completed, etc.). The killer 
   time-saver.
 * **Multi-office stock aggregation** — Sum stock across multiple Bsale offices.
 * **Stock transfer modes** — Auto-move stock to main office via internal transfer
   or dispatch guide (guía de despacho) when an order requires stock from a secondary
   office.
 * **Sales notes (nota de venta) + automatic credit notes from refunds** — Full 
   B2B workflow automation.
 * **Dispatch guides (guías de despacho)** — Inter-office stock transfers with electronic
   dispatch document.
 * **Dynamic document attributes** — Custom attributes (e.g. WooCommerce order number)
   injected into each emitted document.
 * **Scheduled audits** — Up to 3 daily automatic audit runs comparing WooCommerce
   Bsale stock, with optional auto-correction. Results go to the same notification
   email as on-demand audits.
 * **Custom field mapping** — Map WooCommerce custom checkout fields (from third-
   party plugins) to Bsale invoice fields (rut_empresa, razón social, giro, dirección,
   comuna, ciudad).
 * **Stock-per-office display on frontend** — Optional product page widget showing
   available stock per office.
 * **Per-shipping-method office routing** — Emit documents from a specific Bsale
   office based on the WooCommerce shipping method (multi-warehouse).
 * **Daily auto-link by SKU** — Cron job that auto-links unlinked WooCommerce products
   to Bsale variants by SKU match.

#### Pricing

Pro is sold as an annual subscription (or one-time lifetime license) with 1 site
activation per license. A 5-site license is also available.

Learn more and purchase at https://bsale.australcode.io

#### Requirements

 * WooCommerce 7.0 or later
 * A Bsale account with API access
 * WordPress 6.1 or later, PHP 7.4 or later

#### Bsale

Bsale is a Chilean SaaS platform for POS, inventory, and facturación electrónica(
electronic tax document emission) compliant with SII (Servicio de Impuestos Internos,
the Chilean tax authority). It is the de-facto choice for many Chilean small and
medium e-commerce businesses to handle their day-to-day operations and tax compliance.

This plugin is an unaffiliated third-party integration. “Bsale” is a trademark of
its respective owner.

### External services

This plugin connects to two third-party services. Both are used only for the features
described, and only as a result of an action you take (entering your Bsale API token,
or activating a Pro license). No data is sent on a fresh install before you configure
these features.

#### Bsale API (bsale.io / bsale.cl)

What it is: Bsale is the Chilean POS and electronic invoicing platform this plugin
integrates with. The plugin is an unaffiliated third-party integration.

Data sent and when:

 * Your Bsale API access token is sent with every request, to authenticate.
 * Product, variant, SKU, price and stock queries are sent when you sync your catalog,
   when Bsale stock webhooks arrive, and by a background check every few minutes
   that verifies recent stock movements once.
 * Branch and price-list names are refreshed in the background about once a week,
   and when you open the settings page if they are more than a day old.
 * When a tax document is emitted (boleta, factura, credit note, dispatch guide),
   the order data required by the SII (customer RUT, razón social, line items, amounts)
   is sent to Bsale so it can issue the legal document.

This happens because the plugin’s purpose is to mirror your Bsale catalog into WooCommerce
and to emit SII-compliant documents through Bsale. The connection is configured 
by you: you enter your own Bsale API token under “Bsale  Configuración”.

 * Terms of Service: https://www.bsale.cl/sheet/condiciones-uso
 * Privacy Policy: https://www.bsale.cl/sheet/politica-privacidad

#### Freemius (freemius.com)

What it is: Freemius is the Merchant of Record and licensing provider used to manage
the optional Pro license (checkout, activation, account, and updates).

Data sent and when:

 * When you opt in (optional — you can skip it), your admin email and site URL are
   sent to Freemius so it can manage your account and license. The plugin is fully
   functional without opting in.
 * Your license key and site URL are sent to Freemius when you activate, validate,
   or deactivate a Pro license through the native Freemius account screens, and 
   periodically while a Pro license is active to re-check its status and deliver
   updates.
 * The free version does not require an account and works without contacting Freemius.
 * Terms of Service: https://freemius.com/terms/
 * Privacy Policy: https://freemius.com/privacy/

## Schermafbeeldingen

[⌊Plugin dashboard with sync status, stock health, and recent activity.⌉⌊Plugin 
dashboard with sync status, stock health, and recent activity.⌉[

Plugin dashboard with sync status, stock health, and recent activity.

[⌊Configuration page with Bsale API connection, default office, and document type
preferences.⌉⌊Configuration page with Bsale API connection, default office, and 
document type preferences.⌉[

Configuration page with Bsale API connection, default office, and document type 
preferences.

[⌊Order metabox with Bsale document status, PDF link, and re-emit controls.⌉⌊Order
metabox with Bsale document status, PDF link, and re-emit controls.⌉[

Order metabox with Bsale document status, PDF link, and re-emit controls.

[⌊Stock audit interface showing discrepancies between WooCommerce and Bsale.⌉⌊Stock
audit interface showing discrepancies between WooCommerce and Bsale.⌉[

Stock audit interface showing discrepancies between WooCommerce and Bsale.

[⌊Upgrade page showing the Pro features (Bsale → Mejorar a Pro).⌉⌊Upgrade page showing
the Pro features (Bsale → Mejorar a Pro).⌉[

Upgrade page showing the Pro features (Bsale  Mejorar a Pro).

## Installatie

 1. Install the plugin from **Plugins  Add New** in your WordPress admin, or upload
    its folder to `/wp-content/plugins/australcode-dte-stock-sync-bsale`.
 2. Activate the plugin from the WordPress admin “Plugins” menu.
 3. Navigate to **Bsale  Configuración** (the admin is in Spanish).
 4. Enter your Bsale API access token (available in your Bsale account).
 5. Select your default office (sucursal) and configure document type preferences.
 6. Configure the Bsale webhook URL in your Bsale account to enable real-time stock
    updates.

To unlock Pro features, go to **Bsale  Mejorar a Pro** and complete checkout through
Freemius. Your Pro license activates automatically after purchase. (The admin is
in Spanish; once Pro is active the same screen is labelled **Licencia**.)

## FAQ

### Do I need a Bsale account?

Yes, you need an active Bsale account with API access. The plugin connects to your
existing Bsale account via API token.

### What’s the difference between Free and Pro?

Free covers everything a typical Chilean e-commerce store needs: product/stock sync,
manual emission of boletas and facturas, RUT validation, single-office stock, on-
demand audit, real-time webhook updates. Pro adds workflow automation (auto-emission
post-payment, scheduled audits, daily SKU auto-link), multi-warehouse support (multi-
office stock aggregation, stock transfer between offices, per-shipping-method routing),
and advanced B2B features (custom field mapping, dynamic document attributes, sales
notes, automatic credit notes from refunds). The Pro features are distributed as
a separate plugin (from australcode.io) and are not included in this free version.

See the [Pro page](https://bsale.australcode.io) for the full comparison.

### Can I move from Free to Pro without losing my configuration?

Yes. Your Bsale account connection and general settings (API connection, document
types, tax options) are stored independently of the Pro features, so when you move
to the Pro version your existing configuration carries over — no re-entry needed.

### What happens if I stop using Pro?

The free version is fully functional on its own — it keeps handling product/stock
sync and manual emission of boletas and facturas. The Pro features are provided 
by the separate Pro version and are not part of this free plugin.

### Is it compatible with the WooCommerce Block-based Checkout?

Yes, the plugin is compatible with both the Block-based Checkout (WooCommerce 8.0
+) and the Classic Checkout. Chilean tax fields (RUT, razón social, giro) are added
to both.

### Can I emit boleta or factura selectively per order?

Yes. The order metabox allows manual override of the document type per order, useful
for B2B orders where the customer requests a factura instead of a boleta. This works
in both Free and Pro.

### Does the plugin support multiple Bsale offices (sucursales)?

Yes — in Pro. Free supports a single configured office. Pro adds multi-office stock
aggregation (sum of available units across selected offices) plus stock transfer
modes for inter-office logistics.

### What happens if a tax document emission fails?

Failed emissions are logged with the error reason. The order metabox includes a “
Re-emit” button to retry manually. The plugin also has an automatic retry mechanism(
Pro feature, configurable, opt-in) for transient failures.

### Does rotating WordPress’s security salts affect the plugin?

No. Since 3.8.8 the Bsale token is encrypted with the plugin’s own key, stored in
the database when it is first needed. To keep the key out of the database, define`
ACBSL_ENCRYPTION_KEY` in `wp-config.php`; a token saved earlier moves to it on the
next request. Once it is in use, do not change or remove that constant: the token
becomes unreadable and you will have to enter it again.

### Is the plugin HPOS compatible?

Yes, the plugin declares compatibility with HPOS (High-Performance Order Storage)
and uses the WooCommerce data abstraction layer for all order operations.

### Does the plugin work without Bsale (offline mode)?

No. The plugin is a Bsale integration — it requires an active Bsale account and 
API access to function. The plugin’s value is precisely the connection between WooCommerce
and Bsale.

### How does Pro licensing work?

Pro is sold as an annual subscription (or a one-time lifetime license) through Freemius(
Merchant of Record). After checkout your Pro license activates automatically; you
can manage, sync or deactivate it from the native Freemius account screen. Freemius
re-validates the license periodically while it is active. If Freemius is temporarily
unreachable, your Pro features keep working — only an explicit change (refund, revocation,
expiration) deactivates them.

### Where can I find the plugin’s documentation?

Visit https://bsale.australcode.io for plugin documentation, support, and source
code.

### What does the plugin cover besides issuing documents?

 * **Catalog sync** — products, variants, SKUs, prices and stock come from Bsale
   into WooCommerce, with real-time stock webhooks. Multi-office stock is a Pro 
   feature.
 * **Stock audit and traceability** — an on-demand audit compares WooCommerce and
   Bsale stock, and a read-only ledger records every stock movement.
 * **No per-document fees** — the free version issues boletas, facturas and credit
   notes at no cost per document; Pro is a flat subscription or lifetime license.
 * **Open source under GPLv2** — the full source of the free version is on WordPress.
   org. The plugin is in production since 2023.

### How much does Pro cost?

Pro is sold as an annual subscription (or one-time lifetime license) with one site
activation per license. A 5-site license is also available. Current pricing is on
[bsale.australcode.io](https://bsale.australcode.io).

### Can I place the stock-by-branch widget somewhere else?

The stock-by-branch widget is a Pro feature. By default it renders under the add-
to-cart form, which only exists on the standard product page. For page builders 
or custom templates, use the shortcode:

    ```
    [acbsl_stock_by_office]
    ```

Inside a product template it picks up the current product on its own. Elsewhere,
name it explicitly:

    ```
    [acbsl_stock_by_office product_id="123"]
    ```

### Can I change the widget from my own code?

Yes, in Pro, through these filters and actions:

 * `acbsl_should_render_stock_widget` (filter) — decide whether the widget renders.
   Receives the default verdict (the product has a Bsale mapping) and the product
   ID. Return false to hide it, true to force it.
 * `acbsl_stock_by_office` (filter) — the branch rows before they are cached and
   sent to the browser. Each row is `office_name`, `available`, `in_stock`. Use 
   it to hide branches that are not open to the public, reorder them, or rename 
   them. Note it runs before the 5-minute cache, so a per-visitor callback would
   leak the first visitor’s result to everyone.
 * `acbsl_stock_widget_html` (filter) — the widget’s final markup. Return an empty
   string to suppress it.
 * `acbsl_before_stock_widget` / `acbsl_after_stock_widget` (actions) — run right
   before and after the widget is emitted. Both receive the product ID.

### Can I tune the webhook endpoint from my own code?

Yes, through these filters. The defaults fit Bsale’s traffic, so most stores never
need them:

 * `acbsl_webhook_max_payload_bytes` (filter) — largest request body the endpoint
   accepts, in bytes. Defaults to 1 MB; larger requests get HTTP 413.
 * `acbsl_webhook_rate_limit_per_min` (filter) — requests per minute per IP that
   have not proven they come from your Bsale account (no matching `cpnId` or token).
   Defaults to 60. Return 0 to disable the limit.
 * `acbsl_webhook_rate_limit_per_min_authenticated` (filter) — the same limit for
   requests that carry your account’s `cpnId`. Defaults to 1200, well above a Bsale
   burst, because Bsale sends every notification from a few IPs. Requests that carry
   the webhook token are not limited.
 * `acbsl_webhook_queue_time_budget` (filter) — seconds each queue run may spend
   processing webhooks one by one. Defaults to 60, or half of `max_execution_time`
   if that is lower.

### Can I tune how long the plugin works per request?

Yes, through these filters. Long jobs run in steps and resume where they left off,
so a lower value means more steps, not less work:

 * `acbsl_preload_time_budget` (filter) — seconds each step of the product, stock
   and price sync spends downloading pages from Bsale before handing back to the
   browser. Defaults to 8.
 * `acbsl_product_audit_time_budget` (filter) — seconds each step of the product
   audit spends reading Bsale’s catalog. Defaults to 120.
 * `acbsl_audit_fetch_time_budget` (filter) — seconds each step of the stock audit
   spends reading Bsale’s stock. Defaults to 0.8 × (60 × branches + 120).
 * `acbsl_audit_fetch_pages_per_chunk` (filter) — pages of Bsale stock the stock
   audit reads between progress saves. Defaults to 10.
 * `acbsl_audit_fetch_max_hops` (filter) — how many steps the stock audit may take
   before it stops and reports. Defaults to 12.
 * `acbsl_get_all_max_pages` (filter) — safety cap on the pages read when the plugin
   walks a whole Bsale list. Defaults to 2000. Receives the endpoint as second argument.

### Can I restyle the widget with CSS?

Yes (Pro). The widget inherits your theme’s colours and fonts, so it usually needs
no work. To adjust the “in stock” badge text colour, set this custom property on
your theme’s stylesheet:

 * `--acbsl-badge-green-text` — text colour of the in-stock badge. Defaults to `#
   146c2e`.

Every other element uses standard classes you can target directly: `.acbsl-stock-
by-office` (container), `.acbsl-stock-toggle` (button), `.acbsl-stock-results` (
results panel).

## Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

## Bijdragers & ontwikkelaars

“Australcode Facturación Electrónica SII & Stock for Bsale” is open source software.
De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

 *   [ australcode ](https://profiles.wordpress.org/australcode/)

[Vertaal “Australcode Facturación Electrónica SII & Stock for Bsale” in je eigen taal.](https://translate.wordpress.org/projects/wp-plugins/australcode-dte-stock-sync-bsale)

### Interesse in ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/australcode-dte-stock-sync-bsale/),
haal de [SVN repository](https://plugins.svn.wordpress.org/australcode-dte-stock-sync-bsale/)
op, of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/australcode-dte-stock-sync-bsale/)
via [RSS](https://plugins.trac.wordpress.org/log/australcode-dte-stock-sync-bsale/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 3.9.2

 * **Improved:** the “Emitir documento Bsale” bulk action in the orders list no 
   longer waits for Bsale: each order is queued and its document is issued in the
   background, usually within a minute or two. The orders list shows “En cola para
   Bsale” until it is done, and any error stays on the order with its Retry button.
   Measured in a store: issuing one order from the list took 8 to 22 seconds of 
   page load.
 * **Improved:** issuing a document reads each product’s stock once. When stock 
   is moved between branches before issuing (Pro), the stock check reuses that reading,
   and the plugin only asks Bsale whether a product has unlimited stock when its
   stock is not enough.

#### 3.9.1

 * **Fixed:** when Bsale took longer than 30 seconds to answer while creating an
   automatic document (Pro), the order was marked with an error even though Bsale
   had created the boleta or factura. The plugin now retries after 2, 4 and 6 minutes
   with the same sale identifier, so Bsale returns the document it already created
   and the order records it, without issuing a second one. Dispatch guides are not
   retried automatically.

#### 3.9.0

 * **Improved:** automatic documents are issued in the background (Pro). Changing
   an order’s status no longer waits for Bsale: the payment, the checkout and the
   order screen respond right away, the order gets a note, and the boleta or factura
   follows, usually within a minute or two.
 * **Improved:** fewer calls to Bsale per document: the customer is updated in Bsale
   only when something changed, the stock check reads each product once, and finding
   a sales note that the store converted in Bsale searches only that branch.
 * **Improved:** every page of the store and the admin costs less. The plugin settings
   load with WordPress’s other options, the Bsale token is only decrypted when it
   is used, and maintenance checks run once an hour instead of on every request.
 * **Improved:** the branch stock widget answers faster and gives up after 4 seconds
   if Bsale is slow, so the button can be retried (Pro). The admin screens no longer
   wait for Bsale to draw the connection badge, and the settings page reads branches
   and price lists from a local copy refreshed weekly.
 * **Improved:** the product sync only saves products that changed, downloads data
   in fewer requests, and the “Sync stock” bulk action runs in the background when
   more than 20 products are selected. Logs, statistics and audits run with fewer
   queries.

Older entries ship with the plugin, in `changelog.txt`.

## Meta

 *  Versie **3.9.2**
 *  Laatst geüpdatet **2 weken geleden**
 *  Actieve installaties **Minder dan 10**
 *  WordPress versie ** 6.1 of nieuwer **
 *  Getest t/m **7.1.3**
 *  PHP versie ** 7.4 of nieuwer **
 *  Taal
 * [English (US)](https://wordpress.org/plugins/australcode-dte-stock-sync-bsale/)
 * Tags
 * [boleta](https://nl.wordpress.org/plugins/tags/boleta/)[bsale](https://nl.wordpress.org/plugins/tags/bsale/)
   [dte](https://nl.wordpress.org/plugins/tags/dte/)[facturacion electronica](https://nl.wordpress.org/plugins/tags/facturacion-electronica/)
   [sii](https://nl.wordpress.org/plugins/tags/sii/)
 *  [Geavanceerde weergave](https://nl.wordpress.org/plugins/australcode-dte-stock-sync-bsale/advanced/)

## Waarderingen

Er zijn nog geen beoordelingen ingediend.

[Je beoordeling](https://wordpress.org/support/plugin/australcode-dte-stock-sync-bsale/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/australcode-dte-stock-sync-bsale/reviews/)

## Bijdragers

 *   [ australcode ](https://profiles.wordpress.org/australcode/)

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/australcode-dte-stock-sync-bsale/)