Rowhouse Software

Sage 50 API · Developer guides

Last checked November 18, 2026, against Sage's 2026.0 SDK guide

The Sage 50 US .NET SDK, plainly

The only official way to write to Sage 50 US from code is Sage's free .NET SDK: a 32-bit, .NET Framework 4.8 library that runs on the Windows machine with Sage 50, needs an application ID from Sage, and only works on a company after a Sage 50 user approves your app.

Most of this page comes from Sage's own .NET API quick start guide, version 2026.0 (PDF), which is short and worth reading in full. Where something comes from a forum or a third party, we say so. We don't have a copy of Sage 50, so we haven't run any of this.

What the Sage 50 SDK is

It's a .NET assembly called Sage.Peachtree.API, with the same namespace. It installs with Sage 50, sits in the API folder of the Sage 50 install, and is registered in the Windows GAC. Your program talks to Sage 50 company data through it without Sage 50 being open. The .NET API has been around since Sage 50 2011.

Sage's knowledgebase is blunt about languages: "This is a .NET SDK. A PHP SDK isn't currently available" (Sage KB). We found no Sage REST API for Sage 50 US and no Python or Node library from Sage. The SDK download adds sample apps and a help file that documents every class.

How to get the SDK and an application ID

You don't need a new ID for every customer install. A forum poster who wrote that they generate the IDs said that "normally it should not be necessary", and that any non-sample company needs an ID (Sage Community Hub, about six years old).

32-bit and .NET Framework 4.8 only

From the guide's known issues: "Your application has to be compiled for 32 bit and use at least .NET 4.8." The guide says nothing about .NET Core or .NET 5 and later. Its samples were written for Visual Studio 2012, and it says to reboot after installing Sage 50 or your app may not build.

In practice that means one more process. If your product is in Python, Node, Go or 64-bit .NET, you write a small 32-bit .NET Framework program on the Sage 50 machine and talk to it.

The guide has one troubleshooting fix. If you get a System.IO.FileLoadException saying a mixed mode assembly "is built against version 'v2.0.50727' of the runtime", add this to app.config. From Sage's guide:

<startup useLegacyV2RuntimeActivationPolicy="true">
  <supportedRuntime version="v2.0"/>
  <supportedRuntime version="v4.0"/>
</startup>

Connecting to a company

You create a PeachtreeSession, call Begin with your application ID, find the company, check access, then Open it. This is the guide's C# sample for the sample company, unchanged except for spacing. The guide's sample assumes AuthResult was already declared as an AuthorizationResult.

// From Sage's .NET API quick start guide, 2026.0. We haven't run it.
// the main session into the Sage 50 application
PeachtreeSession apiSession = new PeachtreeSession();
// the active Sage 50 Company
Company companyContext = null;

// start the session.
// with no application ID, you can only open Sample companies
apiSession.Begin("");

// Get CompanyIdentifer for Bellwether Garden Supply sample company
CompanyIdentifierList m_companyIdList = apiSession.CompanyList();
CompanyIdentifier companyId = m_companyIdList.Find(
    delegate(CompanyIdentifier o)
    {
        return o.CompanyName == "Bellwether Garden Supply";
    });

// Ask the Sage 50 application if this application has
// been granted access to the company.
AuthResult = apiSession.VerifyAccess(companyId);

// check if the app has authorization before
if (AuthResult == AuthorizationResult.Granted)
{
    // open the company
    companyContext = apiSession.Open(companyId);
}

The guide gives a VB.NET version of each sample too. For the objects you use once a company is open, it points you to the help file installed with the SDK.

The approval step inside Sage 50

The first time your app asks for a company, RequestAccess returns Pending. It stays that way until a Sage 50 user opens that company in Sage 50 and allows your app at the prompt. VerifyAccess tells you whether access was already given. The guide's sample:

// From Sage's .NET API quick start guide, 2026.0.
// Request authorization from Sage 50 for our third-party application to access company.
AuthorizationResult AuthResult = apiSession.RequestAccess(companyId);

The results you can get back, as the guide describes them:

ResultWhat it means
GrantedA Sage 50 user allowed your app.
PendingWaiting for a Sage 50 user to approve it.
DeniedA Sage 50 user said no.
CompanyLockedThe company is in single-user mode, so nobody can log on. It says nothing about approval.
LoginRestrictedApproved, but temporarily blocked, usually by a Sage 50 admin.
NoCredentialsYour app has no credentials with that company.
CorruptedOrTamperedSage 50 found corruption or tampering in its authorization records.
NoneNothing attempted yet. It's the starting value.

Two settings on the customer's side can block you even after approval (Sage help, 2026):

Changing your .exe means approving it again. A Sage team member on the forum: "Sage 50 takes application evidence, so every time you change the .exe, you'll have to re-authenticate" (Sage Community Hub, about eight years old). So every update you ship to a customer's PC is another trip through that prompt for them.

The company also has to have been opened in Sage 50 at least once before your app can connect. Sage 50 doesn't need to be running when you connect.

One company at a time, and no permission scopes

Both are in the guide's known issues. "Your application can only access one company at a time." And "There is no security model. If your application has access to a Sage 50 company, it will have access to all available areas of that company." Your app can't ask for read-only access to customers. It gets everything or nothing.

What the SDK can't write

The 2026.0 guide lists these limits. The SDK can't:

Two smaller ones. Creating a quote or sales order in a new company with no other AR transactions fails validation because the default AR account isn't filled in. And payments applied to both invoices and expenses can make Sage 50 ask "Do you want to save" when someone views them. There's also no List method for contacts.

The cash-basis limit is the one to ask about early. If your product creates invoices, find out whether the customer's company is cash or accrual before you promise anything.

No audit trail on invoices it creates

The guide says it straight: "Audit Trail entries are not generated for sales invoices generated through the SDK." The audit trail itself is a Premium Accounting and up feature (Sage help). If your customer's accountant relies on it, tell them before you go live.

Slow sessions and locked companies

Opening a session isn't fast. A Sage team member on the forum warned that creating a session and opening the company "might be rather lengthy for a normal web request/response cycle" and suggested doing the work in the background (Sage Community Hub, about nine years old).

Jobs like backups and year-end close put an exclusive lock on the whole company and need everyone else out (Sage help). Expect CompanyLocked during those and retry later. Apideck's guide adds that a restored backup can roll data back under your sync.

Versions and upgrades

The 2026.0 guide lists no API changes since 2024.0: no new classes, no breaking changes, no deprecations. It did fix a LoaderLock exception that a 2024 change could cause. Sage only supports the current version, Sage 50 2026, and support for 2024 ended March 4, 2026 (Sage KB). There's a separate SDK download for each release, so plan to test every one.

What the Sage developer partner program costs

You don't have to join anything to use the SDK. Sage calls it free (Sage KB). One catch: a Sage KB article last modified in January 2024 says the SDK team only responds to accounts with an active Development Partner Plan, while a Sage employee on the forum said in 2026 that enrollment is not required for an application ID. Our application ID guide has both sides. The paid part is the developer partner program. The guide describes Silver and Gold levels. Both include not-for-resale copies of Sage 50 for testing. Silver comes with one SDK support incident and Gold with five.

The last price sheet we could find is Sage's North America Developer Partner Program, August 2023. Sage 50 US and Canada are Category 1: $350 to sign up and $250 a year to renew, per product line, with 1 free support case. Acceptance is "at the sole discretion of Sage", and partners can't imply Sage endorses them. The live copy of that PDF is gone, so we link an archived copy. Ask SageDeveloperProgram@sage.com for today's price before you budget for it.

When the SDK is the right tool

Use it when you need to write to Sage 50 US and you can put a Windows program on the customer's machine. If you only read and can live with raw tables, ODBC is less work and needs no approval prompt. And check the customer's country first. This SDK does nothing for Sage 50 Canada or the UK's Sage 50 Accounts (how Sage 50 differs by country).

If the customer is on Sage 50 Cloud, the copy Sage hosts on Azure, you can't install your program next to it. Sage lists seven third-party apps that work there (Sage KB).

We're building a hosted API for Sage 50 US. It isn't live yet. Early access is here.

Sources

More Sage 50 developer guides

Rowhouse isn't Sage and isn't affiliated with Sage. Sage 50 is a trademark of The Sage Group plc. Code and quotes from Sage's docs are theirs.