Leon Order Sync for Tripletex

Description

Leon Order Sync for Tripletex connects your WooCommerce shop directly to Tripletex, the Norwegian accounting system. When an order is completed, the plugin creates the customer, the order and the invoice in Tripletex for you – no more typing orders by hand.

Your data goes straight from your shop to Tripletex. There is no third-party service in between, no subscription and no tracking.

This is an independent plugin by Leon Le. It is not affiliated with, endorsed or sponsored by Tripletex AS or by WooCommerce / Automattic. Tripletex and WooCommerce are trademarks of their respective owners.

Features

  • Connect in minutes – enter your consumer and employee tokens, choose sandbox or production and click “Test connection”.
  • Customer sync – finds existing Tripletex customers by email and/or organization number and only creates new ones when needed. Never creates duplicates. Optionally use one shared “Kontantkunde” for private customers.
  • Orders to invoices – when an order is completed (or when its payment completes, or it is processing – your choice), the order and invoice are created in Tripletex in the background, never slowing down checkout.
  • Rules per payment method – manual, order only, or order + invoice for each payment gateway, plus a rule for orders without a payment method.
  • Correct VAT and totals – WooCommerce tax rates are mapped to Tripletex VAT types (25%, 15%, 12% and 0% out of the box). Sales without VAT to customers outside Norway, including Svalbard and Jan Mayen, are booked as exports (code 52) rather than domestic 0%. Lines use the amounts WooCommerce calculated, after discounts and including VAT, also in shops that enter prices without VAT. Shipping and fees taxed at several rates are split per rate. Revenue and VAT per rate and the invoice total match the order to the øre. If a total still differs by up to 1 NOK, a rounding line is added; a larger difference stops the push.
  • Organization number field at checkout (classic and block checkout), or use a field you already have.
  • Never guesses a customer – when several Tripletex customers match, or the email matches a customer with a different organization number, you choose on the order screen and the choice is remembered.
  • Safe by design – one job per order, duplicate protection and automatic retries. Instead of failing every order, syncing pauses when the tokens are revoked, Tripletex stays down, the site is copied to staging or another Tripletex company is connected, and resumes when you confirm.
  • Logs and retry – see what happened for every order, a sync status column in the order list, and one-click retry for failed orders.
  • Translation-ready – English source strings; a Norwegian (Bokmål) translation will be offered through translate.wordpress.org.
  • Compatible with WooCommerce High-Performance Order Storage (HPOS).

Orders that are invoiced in Tripletex

An invoice is an accounting record; the only valid way to reverse it is a credit note. So after an order is invoiced:

  • Delivery statuses (Processing, On hold, Completed, shipping statuses from other plugins) can be changed freely.
  • Refunds – partial, full, or choosing “Refunded” – are allowed, and the order is labelled “Needs credit note” with the amount. Refunds made in the admin cannot exceed what was invoiced; refunds reported by a payment gateway always go through.
  • Cancelled, Pending payment, Failed, trash and delete are blocked everywhere (admin, bulk actions, REST API, WP-CLI, other plugins).
  • Order lines and prices cannot be edited. A fingerprint taken at invoicing labels any order that still drifts from its invoice as “Mismatch with Tripletex invoice”.

If only the order was sent (no invoice yet), cancelling is allowed and the order is labelled “Delete order in Tripletex”. Orders that were never sent behave exactly as in WooCommerce. Labels appear in the order list and on the order screen, where you mark them as done once handled in Tripletex.

Requirements

  • WooCommerce 8.0 or newer
  • A Tripletex account with API access (the “Integrasjoner” module on some plans)
  • PHP 8.0 or newer with the sodium extension (standard since PHP 7.2)

External services

This plugin connects to the Tripletex API (Tripletex AS, Norway) to create customers, orders and invoices in your Tripletex account. It is required for the plugin to work.

  • When: only after you have entered your Tripletex tokens. Calls are made when you test the connection, when you open the VAT mapping settings, and in the background when an order is sent to Tripletex. Nothing is sent before you connect.
  • Where: https://tripletex.no/v2 (production) or https://api-test.tripletex.tech/v2 (sandbox), depending on your setting.
  • What: your API tokens (to create a session); the customer’s name, email, phone number, billing address and organization number; and the order lines (product names, SKUs, quantities, prices, VAT), order date and reference.

Tripletex terms of service: https://www.tripletex.no/avtalevilkar/
Tripletex privacy policy: https://www.tripletex.no/personvernerklaering/

The plugin does not send any data to the plugin author or any other party.

Screenshots

Installation

  1. Install and activate the plugin (WooCommerce must be active).
  2. In Tripletex, create an API consumer token and an employee token. We recommend a dedicated employee with access only to customers, orders and invoices.
  3. Go to WooCommerce Tripletex, choose the environment, paste your tokens and click Save, then Test connection.
  4. Check the Payment methods, Customers and Advanced VAT mapping tabs.
  5. Complete a test order and see it appear in Tripletex.

FAQ

Does the plugin send invoices to my customers?

Not by default, so customers who already paid by card do not receive an invoice. You can turn on “Send invoice to customer” in the settings; Tripletex then uses the customer’s default delivery method.

My business customers are invoiced in the contact person’s name

The block checkout hides the Company field by default. Edit the Checkout page, select the checkout block and turn on “Company” so business customers can enter their company name next to the organization number.

What happens if Tripletex is down?

The order is retried automatically (by default 3 times, waiting 2, 4 and 8 minutes). If it still fails, it is marked as failed and you can retry it from the order screen or the Logs tab.

Can an order be invoiced twice?

No. The Tripletex IDs are stored on the order and a lock prevents parallel processing. A retry after a timeout first checks Tripletex for an order or invoice created by the previous attempt.

Are my tokens safe?

Tokens are encrypted in the database with libsodium and are never shown again after saving. You can define your own key with define( 'LLTW_ENCRYPTION_KEY', '...' ); in wp-config.php. Logs never contain tokens, and personal data in logs is masked.

Which products are supported?

Simple and variable products, shipping, fees, coupons and taxes from WooCommerce core. Orders must be in NOK. Gift cards, subscriptions, bundles and multi-currency are not supported yet.

What is not included?

Automatic payment registration, automatic credit notes, bulk sync of older orders, choosing the delivery channel (EHF, eFaktura, Vipps) and sync monitoring are planned for a separate Pro add-on. The free version is complete on its own and has no locked features. You can join the Pro waiting list from the plugin’s settings.

What is removed when I delete the plugin?

Deleting the plugin from the Plugins screen removes its settings, the encrypted tokens, the log table and its scheduled jobs. Nothing in Tripletex is touched. The Tripletex order and invoice numbers stored on your WooCommerce orders are kept: they are part of your accounting trail, and they stop an order from being invoiced twice if you install the plugin again.

Does the plugin send anything to the author?

No. The only external link is the optional “Join the Pro waitlist” button, which opens a Google Form in a new tab when you click it.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Leon Order Sync for Tripletex” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.1.0

  • First release.