ml-connector
Sage 300Stripe

Sage 300 and Stripe integration

Sage 300 runs accounts payable and receivable for mid-market businesses. Stripe processes online payments at scale. When you connect the two, customer invoices created in Sage 300 flow into Stripe as billable records, payments captured in Stripe feed back to Sage 300 so collections are always current, and reconciliation happens automatically instead of through manual bank statement matching. ml-connector bridges the two systems, handling the very different authentication models and moving the data on a schedule that fits your billing cycle.

How Sage 300 works

Sage 300 is a Windows IIS-hosted ERP exposing customers, invoices, items, general ledger accounts, and purchase orders through REST and OData APIs. Every request must include an HTTP Basic Authentication header with base64-encoded uppercase username and password. The API accepts OData filters (for example, DocumentDate filters) and pagination ($skip, $top) to retrieve records within a date range. Sage 300 has no webhook or change-data-capture system, so all integration pulls data by polling on a schedule. The API is hosted on the customer's own domain, not a Sage-managed cloud endpoint, so each customer provides their own base URL.

How Stripe works

Stripe exposes customers, invoices, charges, subscription data, and payment events through REST APIs and webhooks. API calls authenticate with a secret key sent via HTTP Basic Auth (username=key, empty password) or Bearer token. Stripe webhooks deliver payment_intent, charge, invoice, and customer events to a registered HTTPS endpoint signed with HMAC-SHA256, with a minimum 5-minute retry window and at-least-once delivery guarantees. Stripe does not have native vendors, purchase orders, or general ledger accounts; it is a downstream payments system designed to capture and track collections.

What moves between them

The flow runs from Sage 300 into Stripe and from Stripe back to Sage 300. Customer records and invoices are read from Sage 300 on a scheduled poll and written to Stripe as customer and invoice objects. Payment events (charge.completed, payment_intent.succeeded) are delivered from Stripe via webhook, matched to the original Sage 300 invoice, and written back as AR receipt records to mark the collection. AR aging reports in Sage 300 reflect the current state of Stripe payments without re-keying.

How ml-connector handles it

ml-connector polls Sage 300 on a schedule using OData date filters to fetch invoices and customers modified since the last run. For each customer, it checks if a Stripe customer record exists; if not, it creates one. For each invoice, it creates a Stripe invoice object and attaches payment terms from Sage 300. It then listens for payment_intent.succeeded and charge.completed events from Stripe via a registered webhook endpoint, validates the Stripe-Signature header with HMAC-SHA256, and posts the payment amount to Sage 300's accounts receivable module as an AR receipt batch. Sage 300 credentials are HTTP Basic Auth (uppercase username and password), refreshed on every request; Stripe credentials are the secret API key, cached and rotated only on 401 response. Rate limits on both sides are handled with exponential backoff and retry.

A real-world example

A B2B SaaS company uses Sage 300 for billing and accounts receivable, invoicing customers monthly. Before the integration, the company exported invoices from Sage 300, manually keyed them into Stripe for collection, and at month-end matched Stripe's payments against Sage 300's invoice list to record receipts. With Sage 300 and Stripe connected, invoices flow from Sage 300 into Stripe automatically, Stripe captures the payment, and the collection posts back to Sage 300's AR ledger in real time. Month-end close no longer requires manual bank matching; the unapplied balance is accurate without re-entry.

What you can do

  • Poll Sage 300 invoices and customers on a schedule, create or update matching Stripe customer and invoice objects, and keep the two records in sync.
  • Capture payment_intent and charge events from Stripe webhooks, validate signatures, and post collections back to Sage 300 accounts receivable as AR receipts.
  • Map Sage 300 invoice terms, amounts, and customer details to Stripe invoice fields so payment data is complete in both systems.
  • Handle HTTP Basic Auth on Sage 300 (including uppercase username and password requirements) and Stripe API key auth, with automatic token refresh and retry on authentication failure.
  • Track which invoices have been synced, which payments have been received, and replay failed records from the audit trail if a Stripe event does not match an existing Sage 300 invoice.

Questions

How do you handle Sage 300's requirement that username and password be uppercase?
ml-connector takes the customer's Sage 300 credentials, uppercases both the username and password, and includes them in the HTTP Basic Auth header on every API call. The uppercase conversion is automatic and transparent to the user.
Does Stripe payment data flow back to Sage 300 in real time?
Stripe delivers payment events via webhooks with a 5-minute retry window and at-least-once delivery guarantees. When ml-connector receives a payment_intent.succeeded or charge.completed event, it validates the Stripe-Signature and immediately posts the collection to Sage 300 as an AR receipt. Sage 300 does not push events, only pulls via polling, so receipt posting is real time but the next Sage 300 poll may take several minutes to confirm the update.
What happens if a Stripe webhook fails to match a Sage 300 invoice?
Every webhook and poll is logged in the audit trail with full request and response data. If a payment arrives in Stripe before the invoice does, ml-connector holds the payment in a queue, and when the invoice is pulled from Sage 300 on the next poll, the payment is applied retroactively. If a mismatch persists, the record is flagged for manual review and can be replayed from the audit trail once the discrepancy is resolved.

Related integrations

Connect Sage 300 and Stripe

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

Get started