ml-connector
Sage X3Adyen

Sage X3 and Adyen integration

Sage X3 runs your operations and finance. Adyen processes your online payments. Connecting the two keeps your cash accounts aligned with payment activity. When Adyen captures a payment, settles a batch, or processes a refund, ml-connector posts the corresponding GL entries into Sage X3's general ledger and updates your customer accounts. No more manual reconciliation of Adyen settlements against your cash accounts.

How Sage X3 works

Sage X3 is an on-premise and cloud ERP targeting mid-market manufacturers, distributors, and services companies. It exposes GL accounts, GL entries, and customer records through REST (api1) with HTTP Basic Auth, or GraphQL (Xtrem) with OAuth2 client credentials. Access tokens expire in five minutes and refresh tokens are valid thirty days. Sage X3 does not support native outbound webhooks, so polling is required for data changes. On-premise deployments are dominant; the server URL, port, and folder name are customer-specific with no central registry.

How Adyen works

Adyen is a global payment platform for accepting and processing payments across online and in-person channels. It exposes payment events, captures, refunds, disputes, and settlement reports via REST webhooks sent as HTTP POST to a configured endpoint with HMAC-SHA256 signature verification. Key events include AUTHORISATION, CAPTURE, REFUND, CANCELLATION, and REPORT_AVAILABLE. Adyen also provides a REST Management API for reading settlement and transaction history, authenticated via API Key header or Basic Auth, both scoped to company or merchant account.

What moves between them

Adyen payment and settlement webhooks flow into Sage X3. When Adyen sends a CAPTURE or REFUND event, ml-connector posts a GL entry into Sage X3's cash or accounts receivable accounts to reflect the payment movement. Settlement reports from Adyen are fetched via the REST Management API and reconciled against the GL. Customer and GL account master records are synced once during setup; ongoing sync is driven by Adyen webhook events. No data flows from Sage X3 back to Adyen.

How ml-connector handles it

ml-connector receives Adyen webhooks at a registered endpoint, validates the HMAC-SHA256 signature against Adyen's shared secret, and looks up the Adyen merchant account in Sage X3's customer master to identify the GL accounts for cash receipts and payment reversals. It then constructs a GL entry in Sage X3 with the payment amount, direction (debit or credit), posting date, and reference to the Adyen event ID. Because Adyen payments are processed asynchronously and Sage X3 GL entry posting is immediate, the integration stores the Adyen reference ID on the posted GL entry so that a duplicate webhook can be detected and rejected rather than creating a duplicate GL entry. Adyen webhooks are retried by Adyen for up to 60 days on any non-2xx response, so ml-connector returns HTTP 200 only after a successful GL post; failed posts reject the webhook and trigger a retry. Settlement report reconciliation polls the Adyen Management API once per business day and compares posted GL entries against settled transactions to surface any gaps.

A real-world example

A mid-size online retailer runs Sage X3 for order-to-cash and finance. Adyen processes all online payments, generating thousands of transactions per day across multiple merchant accounts for different sales channels (web, mobile app, marketplace). Before the integration, the finance team exported Adyen settlement reports daily and manually posted each day's net settlement amount into Sage X3's general ledger. Reconciliation was error-prone and took hours; payment reversals and refunds were sometimes posted late. With Sage X3 and Adyen connected, each payment capture and refund posts automatically to the GL in real time, tied to the customer order. Settlement reconciliation runs nightly and flags any discrepancies. Month-end close is faster because the cash accounts are already reconciled.

What you can do

  • Post Adyen payment captures and refunds into Sage X3 general ledger entries in real time as webhooks arrive.
  • Reconcile Adyen settlement reports against posted GL entries each business day to surface gaps and reversals.
  • Map Adyen merchant accounts to Sage X3 GL accounts and customer records for correct financial posting.
  • Validate Adyen webhook signatures (HMAC-SHA256) and detect duplicate events to prevent duplicate GL entries.
  • Store Adyen event IDs on GL entries so payment activity can be audited and traced back to the payment platform.

Questions

Do payment captures from Adyen post immediately into Sage X3?
Yes. ml-connector receives the Adyen CAPTURE webhook, validates the signature, and posts a GL entry into Sage X3's cash account within seconds. Each post includes the Adyen event ID so the entry can be traced back to the payment platform. Adyen retries the webhook if ml-connector returns a non-2xx response, so failed posts are safe; the entry is only committed after a successful GL post in Sage X3.
How does the integration handle Adyen's webhook delivery and Sage X3's five-minute token expiry?
ml-connector validates every Adyen webhook signature using the shared secret configured during setup. For Sage X3, ml-connector refreshes the OAuth2 access token (valid for five minutes) before each GL post or uses HTTP Basic Auth (if REST api1 is enabled) to avoid token expiry. Adyen webhooks are queued reliably and retried for up to 60 days on failure, so no events are lost while the integration recovers from a transient Sage X3 outage.
Can payment refunds reverse a GL entry posted by a prior CAPTURE?
Yes. When Adyen sends a REFUND event, ml-connector posts a reversing GL entry into the same GL account that was credited by the CAPTURE, with the refund amount and opposite debit direction. The Adyen event ID is stored on both entries so the refund can be traced back to the original payment. This keeps your cash accounts accurate when a customer return or chargeback reverses the initial payment.

Related integrations

Connect Sage X3 and Adyen

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

Get started