ml-connector
Sage 50Adyen

Sage 50 and Adyen integration

Sage 50 keeps your books. Adyen processes the card and online payments. Connecting the two means the money Adyen collects shows up in Sage 50 without anyone typing it in. When a payment settles in Adyen, ml-connector posts the matching customer receipt and bank entry into Sage 50, and it reconciles Adyen settlement reports so processor fees and net deposits land on the right nominal accounts. ml-connector handles the very different setup on each side, since Sage 50 is local desktop software with no API and Adyen is a cloud REST platform.

How Sage 50 works

Sage 50 is desktop accounting software, sold as Sage 50 US with a .NET SDK and Sage 50 Accounts in the UK with Sage Data Objects. There is no cloud REST API and no base URL, so integration runs through a local Windows process that opens the company data files. Authentication is a Sage 50 username and password verified locally, not OAuth or an API key, and only one session can hold the company file open at a time. Relevant entities include customers, sales invoices, customer receipts, bank transactions, journal entries, and GL or nominal accounts. Sage 50 has no webhooks, so changes are detected by polling on a schedule.

How Adyen works

Adyen exposes payments, captures, refunds, payouts or transfers, disputes, and reconciliation reports through versioned REST APIs over HTTPS, each product area on its own base URL. Calls authenticate with an X-API-Key header or Basic auth, scoped to a company or merchant account, and the live endpoint needs a merchant-specific URL prefix. Adyen pushes events as HMAC-SHA256 signed webhooks, including AUTHORISATION, CAPTURE, REFUND, CHARGEBACK, and REPORT_AVAILABLE. Adyen is a payments platform, not an ERP, so it has no native invoices, vendors, purchase orders, or GL accounts; settlement and reconciliation reports are the canonical source for accounting data.

What moves between them

Data moves from Adyen into Sage 50. As Adyen authorises, captures, and refunds payments, ml-connector turns those events into customer receipts and bank transactions in Sage 50 against the matching customer and bank account. When Adyen issues a settlement, the REPORT_AVAILABLE webhook triggers a download of the reconciliation report, and ml-connector posts the net deposit and the processor fees to the correct nominal accounts as a journal entry. Chargebacks and refunds are written as offsetting entries so the ledger tracks reversed revenue. Sage 50 is the system of record for the books, so ml-connector never pushes accounting entries back into Adyen.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the Adyen side it sends the API key on every REST call and verifies the HMAC-SHA256 signature on each incoming webhook before processing, rejecting any notification that fails the check. On the Sage 50 side a small Windows agent runs as a scheduled task or tray app in an interactive session next to the install, opens the company file with the dedicated Sage 50 user login, and writes records through the SDK. The agent must hold the only open session on that company file, so it uses a dedicated integration user rather than the one a person logs in with. Adyen webhooks drive the timing, but because Sage 50 has no API to push to, the agent applies queued entries on its own poll loop and reconciles against Adyen settlement reports. Adyen may resend the same notification, so the pspReference is used as the dedup key, and before creating any receipt the agent checks Sage 50 for an existing reference to avoid duplicate postings. Adyen rate limits return a 429-style error, so calls back off and retry, and every record carries a full audit trail with error replay if a Sage 50 write fails.

A real-world example

A regional retailer with about 80 staff sells both in store and online and takes all card payments through Adyen, while the finance team runs the books in Sage 50 US on a server at head office. Before the integration, an accountant downloaded Adyen settlement reports every few days and hand-keyed the deposits, the card revenue, and the processor fees into Sage 50, and refunds and chargebacks were often missed until a bank reconciliation flagged them. With Sage 50 and Adyen connected, each settlement posts itself into the ledger with fees split out, and refunds and chargebacks are written as they happen. The monthly bank reconciliation now matches on the first pass, and the manual report entry is gone.

What you can do

  • Post Adyen card receipts and bank entries into Sage 50 as payments settle, with no manual entry.
  • Reconcile Adyen settlement reports into Sage 50 nominal accounts, splitting net deposits from processor fees.
  • Record Adyen refunds and chargebacks in Sage 50 as offsetting entries so reversed revenue stays accurate.
  • Verify every Adyen webhook signature and bridge the Adyen API key to your local Sage 50 user login.
  • Run a local Windows agent with retries, duplicate checks, and a full audit trail on every record.

Questions

Which direction does data move between Sage 50 and Adyen?
Data moves from Adyen into Sage 50. Payment receipts, refunds, chargebacks, and settlement entries flow from Adyen into the Sage 50 ledger. Sage 50 is the system of record for the books, so ml-connector does not push accounting entries back into Adyen.
How does the integration work if Sage 50 has no cloud API?
Sage 50 is desktop software with no REST API, so ml-connector runs a small Windows agent next to the install that opens the company file through the Sage 50 SDK using a dedicated integration user login. The agent must hold the only open session on the company file, so it should not share the user account a person logs in with interactively. The machine needs to stay on and signed in for the agent to apply entries.
How are Adyen webhooks secured and kept from posting duplicates?
Every Adyen webhook is signed with HMAC-SHA256, and ml-connector verifies that signature before processing and rejects anything that fails. Because Adyen can resend the same notification, the pspReference is used as a deduplication key, and the agent also checks Sage 50 for an existing reference before creating a receipt so the same payment is never posted twice.

Related integrations

Connect Sage 50 and Adyen

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started