How to integrate with Tripletex: Three tokens, and a row number you never send
Tripletex is quick to call and unusual to authenticate. A token you hold and a token your customer holds combine into a third that carries every request, the company you are addressing travels in the username half of the header, and a journal line you are adding has to announce which row it will occupy. None of the three is hard once you know it, and two of them are easy to miss until something fails.


What you need before the first call
Tripletex does not hand out one credential. Before anything runs you need two, and they come from two different places: one is issued to you as the builder, the other is created by the customer whose data you are reading.
The one that is yours is the consumer token. Tripletex issues it once your registration for version 2 of the interface is complete, and it identifies your integration across every customer you will ever connect. It is not per customer and it is not per company. Treat it the way you treat any application secret.
The one that is theirs is the employee token, created inside the customer’s own Tripletex under user settings and the API access tab. That needs an administrator on their side, and it is worth knowing before you write the onboarding copy that tells them to go and make one.
Tripletex states that each employee token must be given a set of entitlements when it is created. A token made without the rights your integration needs is a valid token that cannot reach your data, so tell your customer which objects you will be reading before they create it rather than after the first call comes back short.
There is a separate test environment with its own consumer and employee tokens, and it behaves like production against Tripletex’s test estate rather than a mock. Ours came back quickly. That is worth saying because it is not the norm in this corner of the market: several Nordic systems make you wait days, or require a national identity scheme before they will talk to you at all.
The three token types, the registration route for the consumer token and the entitlement rule come from Tripletex’s authentication and tokens documentation and the description published with its interface specification, checked 22 September 2026. That the test environment arrived quickly and came with both tokens is our own engineer’s account of building it.
Three tokens, and only one of them travels
The consumer token and the employee token are not credentials you send. They are inputs. You exchange them for a session token, and the session token is what every later request actually carries.
The exchange is a single call that takes three required values: your consumer token, an employee token that was created against that same consumer token, and an expiration date. All three are mandatory, and the third one is the part that surprises people. You are not given a lifetime, you choose one.
From there, authentication is plain Basic access authentication with the session token as the password. If you are assembling the header yourself it is the company identifier, a colon and the session token, Base64 encoded. There is also a call to delete a session explicitly, which is the clean way to end access rather than waiting for the date to pass.
Tripletex added a rule that a session could not be created with an expiry more than six months out, returning Expiration date is not allowed to be older than 6 months when you tried. It then reverted the change, and says it will be re-implemented with no date announced. It does not apply today. It is the kind of thing worth a note in your own runbook, because a long-lived session created now may not be creatable later.
Through Maesn none of this reaches you. Your consumer token is configured on your tenant once, your customer enters their employee token when they connect, and the session is derived here and derived again when it runs out. Unified authentication is why that looks the same as a system with a plain redirect: what you hold afterwards is an account key, and account keys behave identically across the catalogue.
The three required parameters on the session creation call, the Basic authentication scheme and the explicit session deletion call come from the published interface specification, checked 22 September 2026. The six month cap and its reversal come from Tripletex’s own notice on session token expiry.
Employee or accountant, and why it reaches the header
Tripletex has two kinds of login, and the difference is not a permission level. It decides how many companies are reachable at all.
Log in as an employee and you are always inside one specific company. That is the single-entity case, and there is nothing to choose. Log in as an accountant and you reach many, which is the multi-entity case, and now something has to say which one you mean.
Tripletex puts that somewhere most systems do not: the username half of the authentication header. Zero or blank means the company of the employee whose token you are using. Any other value means one of an accountant’s client companies, and there is a dedicated call that lists the ones a given login may access.
If your product will serve accounting offices, the company choice is a question your onboarding has to ask, because nothing downstream can infer it. If it will only ever serve single companies, you send zero and never think about it again. Deciding which of those you are building is cheaper before the first connection than after the hundredth.
Through Maesn the choice is made when the connection is created, and the resolved company travels with the account key rather than with your requests. That is the whole of it on your side, and it is the same shape of answer you get on any system in the catalogue that has a tenant concept.
The username semantics, the zero-or-blank default and the call that lists an accountant’s accessible companies come from the published interface specification, checked 22 September 2026. That the distinction is poorly explained in practice, and that it is the thing most worth knowing in advance, is our own engineers’ account of building against it.
New journal lines carry a row number, not an id
This is the one that fails quietly the first time, and nothing in the shape of the object warns you.
A journal entry in Tripletex carries its lines as an array on the entry itself. Updating a line that already exists works the way you would expect: you supply its id and the fields you are changing. Adding a new line does not, because a line that does not exist yet has no id to supply. What Tripletex wants instead is its position. If the entry already holds three lines, the one you are adding announces that it is row four.
That means you cannot construct the update from the data you are writing. You have to know what is already there, which makes a read the unavoidable first half of every write.
The entry also has a version, and a change has to carry the version it is changing. The usual sequence is therefore the same read either way: fetch the entry, take its version and its occupied rows, then send the update. One read serves both requirements.
Through Maesn there is no row field in the shape you send, and there is no version for you to carry. The read happens before your write goes out, the rows in use are counted and the new line is numbered here. It is a small piece of machinery and it is the kind that is easy to get almost right: numbering from the count rather than from the highest occupied row is correct until someone deletes a line.
The row index requirement on new lines, the version on an update and the read that has to precede the write are our own engineer’s account of building this integration. Neither the row behaviour nor its consequence is described in Tripletex’s published documentation, which is why it is here.
Paging works, the total count does not
Tripletex pages natively and does it well. A list call takes a start index and a count, and the response comes back as an envelope with the values inside it. It also takes a sorting pattern and a fields parameter that selects which attributes you want back, including attributes of nested resources, which is more control than most systems in this category offer.
Filtering is typed and specific to the endpoint rather than generic. The accounts endpoint alone accepts filters on identifier, number, whether the account is a bank account, whether it is inactive, whether it is applicable for supplier invoices, its ledger type, whether it is a balance account, and its SAF-T code.
The one thing not to build on is the total. The envelope carries a field for the size of the full result, and Tripletex marks it deprecated in its own documentation. On the accounts endpoint our engineers found no total coming back at all, which is why the pagination over that read is ours rather than theirs.
Writing that loop once per system is exactly the work that one way to filter and page removes. The loop you point at Tripletex is the loop you point at the next system, and a deprecated count on one endpoint of one system stops being something your code has to know.
The paging parameters, the sorting and fields patterns, the typed filters on the accounts endpoint and the deprecation marker on the full result size come from the published interface specification, checked 22 September 2026. The missing total on that endpoint is our own engineer’s observation.
A real event system, and what to do until you use it
Tripletex publishes a genuine subscription model, which is not something every system in this catalogue can say. An event names an object and a verb together, so creating, updating and deleting the same object are three separate subscriptions rather than one stream you filter.
The delivery carries the subscription it belongs to, the event name, the identifier of the object it concerns and the object itself. With one exception: on a delete the object is null. You are told what went away, not what it contained, so anything your product needs to know about a deleted record has to have been stored before it went.
Those events are not switched on through Maesn today, so change detection on this connection is a read on a schedule you choose. They are available on request, and the schedule you write now keeps working either way, because the event model is a separate path rather than a replacement for polling.
Not requests per company. Tripletex counts them per employee and per consumer, so two integrations reaching the same customer do not share one budget. It publishes no number, which sounds unhelpful until you notice what it publishes instead: every response carries how many calls the current period allows, how many are left and how many seconds remain. A scheduled read can pace itself against the real figure instead of a documented one.
The subscription model, the event envelope, the null object on a delete and the rate limit headers come from the published interface specification, checked 22 September 2026. That we do not currently surface those events comes from our integration documentation and from our own engineer. We have not hit the rate limit, so what happens beyond the 429 is not something we can describe from experience.
What Maesn covers, and what stays with you
Everything above is real work, and most of it is the same work for every customer you connect. That is the part to do once.
| Handled here | Stays with you |
|---|---|
| The two token exchange and the session derived from it | Which objects your use case needs |
| Deriving a new session when the expiry date passes | Telling your customer to create an employee token |
| The company resolved at connection time | Whether your product serves accounting offices at all |
| Reading the entry and numbering a new journal row | What your model does with a deleted line |
| Paging the accounts read without a total count | The interval your schedule runs on |
| One error shape across every system you reach | Your own retries and alerting |
The objects reachable today are a smaller set than Tripletex as a whole. Accounts, journal entries and tax rates are readable, and journal entries can also be created and updated, which is a working posting path rather than a read-only view. The rest of the catalogue is available on request, and which parts you need is worth settling before you design around it. The scope, and what it takes to widen it, is on the Tripletex API page.
One thing genuinely stays yours whichever route you take. Tripletex expresses every entry in Norwegian kroner underneath whatever currency you posted in, and shows both. Posting in euros or dollars therefore means sending an exchange rate with the entry. No integration layer can decide which rate your business should use, so that is a decision about your own data rather than a mapping problem.
The live scope comes from our integration documentation, checked 22 September 2026, and from the engineer who built the connection. The kroner behaviour and the exchange rate requirement are her account of working with it. Tripletex runs its own developer programme with a changelog worth watching if you are building directly.
Frequently asked questions
How long does a Tripletex session token last?
What goes in the username field of the Basic auth header?
How do I add a line to an existing journal entry?
Does Tripletex return a total count when paging?
Can I filter and sort Tripletex results on the server?
Is there an official Tripletex SDK?
What happens when you hit the Tripletex rate limit?

How to Integrate with Procountor: Run It Unattended
Procountor has two ways in, and the unattended one stops at every endpoint that asks for a second factor. What that means for tokens, syncing and tax mapping.
Lennart Svensson · 28 Aug 2026
QuickBooks Online Webhooks: Events, Retries and Recovery
QuickBooks Online webhooks cover 29 entity types and expect HTTP 200 in three seconds. Why Intuit still asks you to poll change data capture.
Lennart Svensson · 25 Aug 2026
Lexware Office Pagination: The 406 and One Page Size
Lexware Office validates the page size and rejects a bad one with 406, the same code it uses for an unsupported media type. What that means for your read loop.
Lennart Svensson · 20 Aug 2026Build once on the Unified API.
Tripletex makes a session from two tokens, hides the company in the username field and numbers journal rows by position. The next system will draw every one of those lines somewhere else. Build against one interface and each difference turns into a field you read instead of a project you schedule.