ml-connector
Microsoft Dynamics 365 Business CentralStripe

Microsoft Dynamics 365 Business Central and Stripe integration

Microsoft Dynamics 365 Business Central runs your finance, sales, and receivables. Stripe collects card and online payments from customers. Connecting the two lets the ledger raise an invoice and Stripe collect on it, with the payment landing back in Business Central without re-keying. Outbound, ml-connector pushes Business Central customers and finalized sales invoices into Stripe so a card can be charged against them. Inbound, it reads Stripe paid-invoice, charge, and refund activity and records it against the right Business Central invoice as a customer payment journal line.

How Microsoft Dynamics 365 Business Central works

Microsoft Dynamics 365 Business Central exposes customers, sales invoices, sales orders, purchase invoices, customer payment journals, GL accounts, and dimensions through its REST API built on OData v4. Every resource nests under a company in a named environment such as production, so the connector stores the environment name and company id and builds the base URL from them. Authentication is OAuth 2.0 client credentials against Microsoft Entra ID, using an app granted API.ReadWrite.All. Sales invoices are created as drafts and posted with a bound action, and the chart of accounts is read-only over the API. Push webhooks come from a subscription API that signals what changed but carries no payload and expires every 3 days, so the connector renews each subscription and then fetches the changed record.

How Stripe works

Stripe exposes customers, invoices, invoice items, charges, payment intents, refunds, payouts, and balance transactions through its REST API. Authentication is a secret API key sent as HTTP Basic auth, not OAuth, so there is no token refresh; a sk_live_ key is used in production and sk_test_ in sandbox. Stripe is a payments platform, not an accounting system, so it has no vendors, no purchase orders, and no GL accounts, and all amounts are integers in the smallest currency unit such as cents. An invoice must be finalized before it can be paid, prices are immutable once created, and updates are POST rather than PATCH. Stripe pushes events such as invoice.paid and charge.refunded to a registered endpoint, signed with HMAC-SHA256 over the raw body.

What moves between them

Invoices and customers flow from Microsoft Dynamics 365 Business Central to Stripe. ml-connector reads posted sales invoices and their customer records, creates or matches the Stripe customer, and builds a finalized Stripe invoice so a card can be charged against it. Payments and reconciliation flow from Stripe back to Business Central. ml-connector reads Stripe paid invoices, succeeded charges, and refunds and writes them as customer payment journal lines applied to the matching Business Central sales invoice. The invoice.paid, charge.succeeded, charge.refunded, and payout webhooks trigger the work as money settles, and a scheduled poll of Stripe invoices and payouts backfills anything a webhook missed.

How ml-connector handles it

ml-connector stores both credential sets encrypted, mints a Business Central token from Microsoft Entra ID, and sends the Stripe secret key as HTTP Basic auth with no refresh step. The link between the two systems is the Stripe metadata field: ml-connector writes the Business Central invoice number and customer number into metadata on the Stripe customer and invoice, then reads it back on paid invoices and charges to apply each payment to the right document. Because Stripe stores amounts in the smallest currency unit, every value is converted to and from cents against the invoice currency code so the ledger figure is exact. Stripe invoices are created as drafts and explicitly finalized before collection, mirroring the Business Central draft-then-post invoice state machine. Each create call sends an Idempotency-Key and a BullMQ jobId so a retried send never raises a duplicate Stripe invoice, which matches Business Central practice of filtering by invoice number before posting. Stripe webhooks are verified by HMAC-SHA256 over the raw unmodified body within the 5-minute tolerance, deduplicated on event.id, and the current resource is re-fetched because events are unordered and at-least-once. Stripe returns HTTP 429 with a rate-limited reason, and Business Central subscriptions are renewed before the 3-day expiry, so the connector backs off with jitter on both sides. Every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A mid-sized professional services firm with about 120 staff runs Microsoft Dynamics 365 Business Central for finance and billing and lets clients pay their invoices by card through Stripe. Before the integration, a billing clerk posted the invoice in Business Central, then re-created it by hand in Stripe to send a payment link, and at month end downloaded the Stripe payout report and keyed each settled payment back against the invoice one line at a time, which left card fees and refunds unreconciled for weeks. With Business Central and Stripe connected, each posted sales invoice is pushed to Stripe as a finalized invoice automatically, and paid invoices and refunds post back as customer payments tagged to the originating document. The billing run drops to a review step, and the Stripe clearing account reconciles itself against the ledger.

What you can do

  • Push Microsoft Dynamics 365 Business Central customers and posted sales invoices into Stripe as finalized invoices for card collection.
  • Post Stripe paid invoices, succeeded charges, and refunds back into Business Central as customer payment journal lines.
  • Apply each payment to the right document by carrying the Business Central invoice and customer numbers in Stripe metadata.
  • Bridge Microsoft Entra ID client credentials on Business Central and the Stripe secret API key, converting cent amounts to ledger currency.
  • Verify Stripe HMAC-SHA256 webhooks and poll invoices and payouts on a schedule, with retries and a full audit trail on every record.

Questions

Which direction does data move between Microsoft Dynamics 365 Business Central and Stripe?
Customers and finalized sales invoices flow from Business Central to Stripe so a card can be charged against them. Paid invoices, succeeded charges, and refunds flow from Stripe back to Business Central as customer payment journal lines. Stripe has no GL accounts or vendors, so the connector reads its payment activity for reconciliation rather than writing ledger entries into Stripe.
How are Stripe payments matched to the right Business Central invoice?
ml-connector writes the Business Central invoice number and customer number into Stripe metadata when it creates the Stripe customer and invoice, then reads that same metadata back on paid invoices and charges to apply each payment to the matching document. Because metadata is a free-text key-value field, the connector populates it consistently on every push. This keeps the Stripe clearing account aligned with the ledger.
How does the integration handle Stripe webhooks and amount conversion?
Stripe pushes events such as invoice.paid and charge.refunded signed with HMAC-SHA256 over the raw body, which ml-connector verifies within the 5-minute tolerance and deduplicates on event.id before posting to Business Central. Because events are unordered and delivered at least once, it re-fetches the current Stripe resource rather than trusting the event payload. All Stripe amounts are integers in the smallest currency unit, so each value is converted to ledger currency against the invoice currency code, and a scheduled poll of invoices and payouts backfills anything a webhook missed.

Related integrations

Connect Microsoft Dynamics 365 Business Central and Stripe

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

Get started