maesn

Sage Accounting API Integration

Sage Accounting is Sage's cloud accounting platform for small and medium-sized businesses, sold in the UK, Ireland, the USA, Canada, France, Spain and Germany. It covers invoicing, expense tracking, bank reconciliation, VAT reporting and multi-business management. Connect it through Maesn and you reach it with the same REST calls and the same data model as every other supported system.

Official Sage Partner
Official Sage
Partner
YOUR PRODUCT+26
Trusted by winning software teams
HubSpotTipaltiPaywiseRallyQredNordhealthFindityFintoClockinHEROHolviLanes & PlanesAgicapHubSpotTipaltiPaywiseRallyQredNordhealthFindityFintoClockinHEROHolviLanes & PlanesAgicap
Why it is fast

Sage Accounting expires a token every 5 minutes, your code never renews it

Three properties of the Sage Accounting API land in your codebase on the first day, and none of them is about accounting. Each one is a piece of infrastructure you would otherwise own for the lifetime of the integration.

Sage Accounting: Tokens expire in 5 minutes

The token cycle stays here

Sage Accounting access tokens expire after 5 minutes, and the refresh token rotates on every use. If your own store fails to save the new refresh token after a refresh call, that connection has no way back except a full re-authorisation by the end user. Maesn holds that cycle for each connected end user, so the failure mode that costs you a customer connection is not code you have to get right.

Sage Accounting: A header the login omits

Discovered once, attached from then on

Every Sage Accounting request carries an explicit X-Business header with the business GUID, and that value is not part of what authentication returns. It takes a separate call afterwards to find out which businesses the user can even reach. Maesn runs that discovery during onboarding, keeps the answer against the connection and puts the header on every later request.

Sage Accounting: Retries you cannot safely repeat

A timed-out POST is not an answer

When a POST times out against Sage Accounting you do not know whether the record was written. Retry and you risk a duplicate, skip it and you risk a missing invoice. Sage answers this with idempotency keys and a seven-day window in which the same key resolves to the same record, so the retry policy you design has a documented boundary rather than a guess.

What reaches your code is a REST call and an account key. Token rotation, business discovery and safe retries stay on this side, and the system after Sage Accounting is a configuration step rather than a second project.

A short call is usually enough to tell whether Maesn fits your use case.

Customer voice
40.000
tradespeople on HERO Software's platform

HERO Software builds against documentation it can follow

HERO Software digitises the back office for craft businesses, from the quote through to the invoice. What their engineers name is not a feature, it is how quickly the integration stopped being a research project.

The support provided is truly first class, with impressively quick response times. The documentation is thorough and easy to follow, which made integration a smooth process for me.
Ricardas Kauneckas
Full Stack Engineer, HERO Software
Why companies choose Maesn

Three reasons to reach the Sage Accounting API through Maesn

Sage Accounting is not a difficult API to call. It is an expensive one to operate, because three of its properties only break in production, and one of them breaks one connected end user at a time.

01

The token cycle is somebody's job

With a 5-minute expiry and a refresh token that rotates on every use, the risk is not that a call fails. It is that the new refresh token does not reach your storage, and that loses the connection rather than the request. Whoever owns the integration owns that as an on-call concern for as long as the connection lives. Paid once here, it does not come back with the next customer or the next market.

02

Seven markets on one connection

Sage Accounting is sold in seven countries over one base URL, so a customer in Ireland and one in Canada arrive through the same integration and the same registered app. What differs per country is the content of the books rather than the interface in front of them.

03

Several systems carry the name

Sage Accounting is not Sage Active, Sage 50 or Sage Intacct. Which one a customer runs decides the API, the portal and the credentials: Sage Active registers apps inside the customer's own account and hands out three values where this one hands out two. Maesn holds that mapping, so picking the right Sage is a configuration step.

Marketplace listing

A Sage Accounting listing is an assessment, not a form

Most providers stop at the API. Maesn does the technical enablement and the relationship, and on Sage the second one decides how far the first one travels: there is no self-serve submission form, the listing runs through Sage's partner team by hand.

Official Sage Partner
Official Sage
Partner

Technical enablement

One integration against the Unified API and one data model, identical to every other system Maesn supports. Your engineers meet the same interface here as they will for the next system.

Partnership support

Maesn is an official Sage partner and takes the listing conversation with you, from the fit assessment through the technical review. The listing carries your product's name, not ours.

What a Sage listing asks of you
Level 1

An assessment rather than a form

Listing runs through Sage's partner team and includes a review of whether your product fits their strategy. That is slower than a submission button, and it also means a listing is not something every competitor holds by default.

Level 2

A working integration first

The technical review comes with the commercial one, so the connection has to exist before the conversation is worth having. Building it through Maesn is what makes that step a demonstration rather than a project.

Level 3

Seven markets, one listing

Sage Accounting is sold across the UK, Ireland, the USA, Canada, France, Spain and Germany. A listing that lands is in front of a customer base that spans all seven, which is why the market question belongs in the plan early.

The integration runs under your product's name, and the listing is yours rather than ours. Maesn is the layer behind it.

We prepare the fit assessment and the technical review with you.

Authentication

A Sage Accounting connection is a token plus a business

Sage Accounting authenticates with OAuth 2.0 against an app you register yourself, and consent is only the first half. The token says who the user is, not which set of books they mean, and Sage refuses any request without the business on it. Sage Accounting therefore sits on the interactive list in Maesn's authentication documentation: the customer picks a business inside the connect flow, the answer is stored against the connection, and the X-Business header is attached from then on.

Auth method
OAuth 2.0
Your own app, one registration for all seven markets

One app for every customer in every market. Maesn holds the credentials, resolves the business and refreshes the 5-minute token behind them.

What Maesn holds for you
Your app credentials
The client ID and the client secret are submitted once and used for every connection you make afterwards, in all seven markets. Your code holds an account key per customer and nothing else.
The business context and the token cycle
Sage requires the X-Business header on every call and Maesn resolves it, which is exactly why the companyId parameter on Maesn's own endpoints is optional for you. Send it when you want to scope a request to one business, look the values up with GET /companies, and leave it out when the connection already carries the right one.

The business a request runs against is decided by the business GUID that travels with it, so a customer who works across several sets of books is a matter of which one you name. A parameter set by mistake reaches the wrong books rather than failing, which is worth a test of its own before launch.

How your customer connects
  1. 1

    Your customer starts in your product

    You send them into the flow and Maesn opens Sage Accounting's consent screen. It carries the name of the app you registered, so the connection reads as yours rather than as a third party's.

  2. 2

    They pick the business

    Sage returns to Maesn, and the interactive flow shows the businesses that customer can reach. The selection page can carry your colours. What comes out is the business GUID every later request needs in its X-Business header.

  3. 3

    You work with one account key

    Maesn stores the connection and returns an account key. From there every request carries your Maesn API key plus that account key, the same two headers you already send for every other system in the catalogue.

The same shape appears on the sibling product: Sage Active asks for a company after consent too, with a different header and a different portal behind it, and the rest of the Sage portfolio splits again from there. Unified authentication is what makes that a one-time cost: the consent screen, the business selection, the refresh cycle and the account key behave the same way here as they do for a system that needs nothing but a key.

Staying in sync

Sage Accounting data stays fresh on one scheduled read

It runs without asking anyone, on the same filter and the same pagination as every other system you connect. 25 of the 37 objects are marked as available on request for events and the remaining 12 carry no event support in the matrix, so an event your product depends on is a question of enablement.

What Sage Accounting pushes on its own

Nothing that is switched on. Every event column is either a request or a blank, so a change inside a customer's business stays invisible until something goes and reads it. If events on a specific object would change your product, that is a conversation to have rather than a roadmap item to wait for.

What you run instead

One scheduled read, with the same filter and the same pagination you use for every other system. The change-detection code you point at Sage Accounting is the code you already wrote, aimed at a different account key, and the interval stays a product decision rather than a limit the system imposes on you.

The 5-minute token sits underneath that read, and it changes how a long job behaves. A backfill that runs for an hour crosses twelve token boundaries, so where the token cycle lives decides whether the job finishes or dies halfway through with a partial import behind it.

A scheduled read is where the cost of a per-system integration usually shows up, because every system filters and pages differently. One way to filter and page keeps that job identical across the catalogue, and what you would otherwise handle in the event model stays a separate path that Sage Accounting does not use today. The retries underneath both of them are the other half of the same picture: idempotency on POST is what makes a failed call safe to repeat, which matters more on a system whose token can expire mid-job.

Before you start

What a Sage Accounting integration needs on day one

The prerequisite list in Maesn's documentation is one line long, and the work sits in the app registration behind it. The callback URL and the sandbox are the two teams tend to reach late.

A Sage Accounting account with a valid subscription
That is the entire documented prerequisite. The developer surface is reached from a paying account rather than from a separate signup, so whoever registers the app needs an account that is actually subscribed.
One app, registered in Sage's developer portal
You create the app in Sage's developer self-service portal with your application's name, your homepage URL and the callback URL https://api.maesn.dev/auth/callback/sageaccounting. The app name is what your customers see on the consent screen, so it belongs to your product rather than to us.
Two values, handed over once
The finished app shows a client ID and a client secret. Both go to your Maesn contact one time rather than per customer, and the handshake that consumes them runs here from then on. There is no per-country app and no subscription key, which is where Sage Accounting is simpler than its sibling.
A sandbox you can have on day one
Sage Accounting has a free trial account you can register yourself, and Maesn's own sandbox table lists an environment for it as well. Token rotation and business discovery are the two behaviours you want to have watched working before a customer is on the other end of them.

We walk through the app registration, the callback URL and the sandbox with you.

The data model

One shape for Sage Accounting, and for the system after it

Sage Accounting is sold across seven markets on one base URL, and every request has to name the business it belongs to. A shared shape is what keeps both of those out of the code you write.

Two objects make the full round trip

Accounts, customers and suppliers read today, and customers and suppliers also create and update, so those two go in and come back changed. The one document write is the booking proposal, which carries an invoice you hold into the ledger. That direction is the point of it, so reading one back is a request rather than a default.

Customers and suppliers, not contacts

Partner data on Sage Accounting runs through customers and suppliers as separate objects, and both are readable and writable. The generic contacts object is not the way in here, so a data model that treats every business partner as one contact record needs its mapping decided before the first sync rather than after it.

On demand is a conversation

Objects that are not switched on today are not refusals. Name the ones your product needs before you scope the feature and you get either a yes with a timeline or a clear no, and both are more useful than a number.

What is switched on here covers the ledger accounts and both sides of the partner record. Whatever you read comes back in the shared common data model, so a customer record from Sage Accounting has the same shape as one from any other connected system, and the mapping you write once keeps working when the next system arrives.

It is a short list that covers two jobs completely instead of many partly. The two objects you can read, create and update are customers and suppliers, both sides of the partner record, so keeping customer and supplier data in sync runs end to end today. The second is the document write: a booking proposal carries an invoice, bill or credit note you already hold into the ledger, which is the shape most of accounts payable automation actually needs. A reporting or reconciliation workflow is the case that would need objects nobody has asked for yet. The rest of the catalogue is in the integrations directory, reachable on the same account key and the same data model.

Tell us which objects your use case needs and we will confirm what is possible.

Sage Accounting FAQ

Sage Accounting API questions

Does Sage Accounting have an API?

Yes, and the useful part is what reaching it directly costs. Three things sit in front of the calls themselves: OAuth 2.0 against an app you register in Sage's developer portal, access tokens that expire after 5 minutes with refresh tokens that rotate on every use, and an X-Business header carrying the business GUID that authentication never returns and a separate call has to discover. Through Maesn you send ordinary REST calls with an account key and none of those three reach your code.

What is Sage Accounting?

Sage Accounting is Sage's cloud accounting platform for small and medium-sized businesses, sold across the UK, Ireland, the USA, Canada, France, Spain and Germany. It handles invoicing, expense tracking, bank reconciliation, VAT reporting and multi-business management. It is a different product from Sage Active, Sage 50 and Sage Intacct, which matters for an integration because each of those has its own API, its own portal and its own credentials.

How does Sage Accounting token expiry work, and what does Maesn do with it?

Access tokens last 5 minutes and the refresh token rotates on every use, so each refresh invalidates the token you used to get it. If your own store fails to save the new one, that connection has no way back except a full re-authorisation by the end user, which is a customer-visible outage rather than a retry. Through Maesn that cycle is held for each connected end user instead of in your code.

What is the X-Business header in Sage Accounting?

It is the business GUID that identifies which set of books a request applies to, and Sage requires it on every call. The value cannot be derived from authentication: a separate call afterwards is needed to discover which businesses the user has access to. Maesn runs that discovery during onboarding, stores the selection against the connection and injects the header on every subsequent request.

Do I have to send a company ID on Sage Accounting requests through Maesn?

No. Sage requires the business on every request, Maesn resolves it, and the companyId parameter on Maesn's endpoints is therefore optional for you. Include it when you want to scope a request to a specific business, and use GET /companies in the authentication section to look the available IDs up. One thing to know: a company parameter you set by mistake reaches the wrong set of books rather than failing, so it is worth a test of its own before launch.

What is idempotency in the Sage Accounting API, and does Maesn handle it?

Idempotency is what makes a repeated request resolve to the same record instead of to a second one. Without it, a POST that fails on the network leaves you unable to tell whether the record was created, and retrying blindly can duplicate it. Sage supports it with an idempotency key and a seven-day window, in which the same key resolves to the same record, so a retry policy built around that window is safe by design.

Does the Sage Accounting API support webhooks?

No object in the coverage matrix carries an enabled webhook today. 25 of the 37 objects are marked as available on request and the remaining 12 carry no event support in the matrix, so change detection today is a read you schedule, with the same filter and pagination as every other system in the catalogue. If events on a particular object would change your product, ask us about that object rather than about webhooks in general.

Which data can I read and write through the Sage Accounting API?

Accounts, customers and suppliers are readable today. Customers and suppliers are also writable and updatable, and booking proposals can be created. That last one is the document route: in business terms a booking proposal is an invoice, bill or credit note you already hold, posted into the ledger. Invoices and bills are not enabled as writable objects today, so this is the path that carries a document in. Of the remaining objects in the 37-row matrix, 22 are marked as available on request rather than unavailable, so naming the objects your use case needs gets you a specific answer where a total would only give you a size.

Is Sage Accounting the same in all seven countries?

The API is. Sage Accounting reaches the UK, Ireland, the USA, Canada, France, Spain and Germany through one base URL and one target system, so you register one app rather than one per market. What differs per country is the content of the books, tax rates and the chart of accounts, and that difference lands in your data rather than in a second integration.

Is there a Sage Accounting sandbox?

Yes, and there are two routes to one. Sage offers a free trial account you can register yourself, and Maesn provides a sandbox as well. Both are worth using here rather than testing against a customer's live books, because the two behaviours you most want to watch, token rotation and business discovery, only show themselves over time and under load.

Can I get listed in the Sage marketplace?

Yes, and it is a conversation rather than a form. There is no self-serve submission: listing runs through Sage's partner team by hand and includes an assessment of whether your product fits their strategy. Maesn is an official Sage partner and goes through that process with you, including the technical side of the review.

Why integrate Sage Accounting through Maesn instead of directly?

Because the work that lasts is not the calls. Direct means owning a 5-minute token cycle with rotating refresh tokens where one failed write to your own store costs you a connection, a business discovery step that authentication does not give you and a retry policy that has to be idempotent, for one system. Through Maesn you build once against one data model, and the 30+ other accounting and ERP systems are then reachable on the same interface with the same account key.
Ship your ERP and accounting integrations. Connect once.
Book a demo