ml-connector
Microsoft Dynamics 365 Business CentralPayPal

Microsoft Dynamics 365 Business Central and PayPal integration

Microsoft Dynamics 365 Business Central runs your finance, purchasing, and sales. PayPal moves money in and out. Connecting the two pays approved vendor bills out through PayPal payouts and brings settled PayPal activity back into the ledger without re-keying. Outbound, ml-connector reads open purchase invoices in Business Central and sends matching PayPal payouts to vendor PayPal accounts. Inbound, it reads PayPal captures and settled transactions and records them against the right Business Central invoices as customer payment journal lines.

How Microsoft Dynamics 365 Business Central works

Microsoft Dynamics 365 Business Central exposes vendors, purchase invoices, customers, sales invoices, customer payment journals, vendor payment journals, GL accounts, and dimensions through its REST API built on OData v4. All resources nest under a company in a named environment such as production, so the connector stores the environment name and company id. Authentication is OAuth 2.0 client credentials against Microsoft Entra ID, with an app granted API.ReadWrite.All permission. Push webhooks are available through a subscription API that signals what changed but carries no payload and expires every 3 days, so the connector renews subscriptions and fetches the changed record. Purchase orders do not support webhooks.

How PayPal works

PayPal exposes payouts, invoicing, orders, captures, refunds, and transaction search through its REST API, using OAuth 2.0 client credentials sent as HTTP Basic auth to the token endpoint, returning a bearer token that lasts about 8 hours and must be cached. PayPal is a payments platform, not an accounting system, so it has no vendor registry, no purchase orders, and no GL accounts. Payouts target a recipient PayPal email address rather than a stored supplier record. Transaction search is read-only, capped at a 31-day window per request, and settled transactions can take up to 3 hours to appear. PayPal pushes payout, capture, refund, and invoice webhooks signed with RSA-SHA256.

What moves between them

Money out flows from Microsoft Dynamics 365 Business Central to PayPal. ml-connector reads open or posted purchase invoices and their vendor records, then creates PayPal payout batch items addressed to each vendor's PayPal email for the invoice amount and currency. Money in and reconciliation flow from PayPal to Business Central. ml-connector reads PayPal captures and settled transactions and writes them as customer payment journal lines, applied to the matching sales invoice. Payout and capture webhooks trigger the work as it settles, while a scheduled transaction search poll in 31-day windows 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 exchanges PayPal client credentials for a bearer token that it caches for the full lifetime rather than per call. The link between the two systems is the PayPal invoice_id field: ml-connector writes the Business Central invoice number into invoice_id on each payout and reads it back on captures and transactions to apply payments to the right document. Because PayPal payouts target an email address and have no supplier registry, each vendor must carry a PayPal email, and payouts to a recipient with no PayPal account stay unclaimed. Every payout sends a PayPal-Request-Id and a stable sender_batch_id so a retried send never pays a vendor twice, matching Business Central best practice of filtering by invoice number before posting. PayPal returns HTTP 429 under dynamic throttling and publishes no fixed limit, so the connector backs off with jitter; the 31-day search window and the up-to-3-hour settlement delay are handled by a windowed backfill loop. PayPal webhook signatures are verified with the RSA-SHA256 certificate from the validated paypal.com cert URL, and Business Central subscriptions are renewed before the 3-day expiry. Every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A 90-person online education company runs Microsoft Dynamics 365 Business Central for finance and bills a roster of remote contractors and small overseas suppliers who all prefer PayPal. Before the integration, accounts payable exported approved bills from Business Central, logged into PayPal to send each payout by hand, then downloaded the monthly PayPal activity report and keyed payments back against invoices one by one, which left settled fees and refunds unreconciled for weeks. With Business Central and PayPal connected, approved purchase invoices go out as PayPal payouts automatically, and settled captures and transactions post back as customer payments tagged to the originating invoice. The contractor payment run drops from a full afternoon to a review step, and the PayPal clearing account reconciles itself.

What you can do

  • Pay approved Business Central purchase invoices as PayPal payouts to each vendor's PayPal email.
  • Post settled PayPal captures and transactions back into Business Central as customer payment journal lines.
  • Apply payments to the right document by carrying the Business Central invoice number in the PayPal invoice_id field.
  • Bridge Microsoft Entra ID client credentials on Business Central and OAuth bearer tokens on PayPal, caching each token for its full lifetime.
  • Poll PayPal transaction search in 31-day windows and verify RSA-SHA256 webhooks, with retries and a full audit trail on every record.

Questions

Which direction does data move between Microsoft Dynamics 365 Business Central and PayPal?
Money out flows from Business Central to PayPal as payouts created from approved purchase invoices. Money in flows from PayPal to Business Central, where settled captures and transactions are posted as customer payment journal lines. PayPal is treated as a payments source, so the connector reads its activity for reconciliation rather than writing ledger entries into PayPal, which has no GL.
How are PayPal payments matched to the right Business Central invoice?
ml-connector writes the Business Central invoice number into PayPal's invoice_id field when it creates a payout, then reads that same invoice_id back on captures and transaction search results to apply each payment to the matching document. Because invoice_id is a free-text reference, the connector populates it consistently on every send. This keeps the PayPal clearing account aligned with the ledger.
How does the integration deal with PayPal's transaction search limits and settlement delay?
PayPal transaction search is read-only and capped at a 31-day window per request, and settled transactions can take up to 3 hours to appear, so ml-connector runs a windowed backfill loop across multiple 31-day ranges and reconciles on a schedule. Payout and capture webhooks trigger posting as soon as activity settles, and the poll backfills anything a webhook missed. PayPal does not publish fixed rate limits, so the connector caches its bearer token and backs off on HTTP 429.

Related integrations

Connect Microsoft Dynamics 365 Business Central and PayPal

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

Get started