ml-connector
SAP S/4HANAWise

SAP S/4HANA and Wise integration

SAP S/4HANA runs procurement and finance across global operations. Wise handles cross-border payments to international suppliers. Connecting the two keeps your supplier master aligned, automates payment execution to overseas vendors, and closes the loop by reconciling transfer confirmations back into SAP's general ledger. No more manual payment entry, no missing supplier details, no delayed reconciliation.

How SAP S/4HANA works

SAP S/4HANA exposes suppliers, purchase orders, purchase requisitions, customer master data, GL accounts, cost centers, and journal entries through OData V2 and V4 REST APIs on a tenant-specific HTTPS endpoint. Authentication uses OAuth 2.0 Client Credentials with short-lived tokens (typically 12 hours), which ml-connector caches and refreshes before expiry. SAP has no native webhooks, so data is read by polling with timestamp filters or delta tokens. GL accounts and cost centers are read-only. On-Premise deployments require an sap-client query parameter; Cloud Public and Cloud Private editions do not.

How Wise works

Wise exposes profiles, balances, recipients, quotes, and transfers through a REST API over HTTPS, with separate endpoints for production and sandbox. Authentication uses OAuth 2.0 with authorization_code or client_credentials grants (12-hour token expiry and long-lived refresh tokens) or a Personal API Token bearer. Wise publishes events via webhooks for transfers, balance updates, and payout failures, verified using an RSA-SHA256 signature in the X-Signature-SHA256 header. Rate limits are 100 requests per second and 1000 per minute for OAuth, or 900 to 1500 per minute for personal tokens. Recipient objects are immutable; updates require deletion and recreation.

What moves between them

Supplier master data and purchase orders flow from SAP into Wise as recipient profiles and transfer requests. ml-connector reads SAP's supplier entities (A_Supplier, A_SupplierCompany) and maps them to Wise recipient profiles on a schedule, then monitors SAP for purchase orders destined to international suppliers and creates transfer quotes and payment instructions in Wise. Wise transfer confirmations and balance updates flow back via webhook into SAP journal entries for reconciliation against the original payment liability. International payout failures also flow back for exception handling.

How ml-connector handles it

ml-connector stores both SAP OAuth credentials and a Wise API token (or OAuth refresh token) encrypted at rest. On the SAP side, it handles token caching and refresh before expiry, constructs the tenant-specific OData endpoint URL, and polls for supplier updates and purchase order changes at a configurable interval tied to your payment cycle. For Wise, it creates recipient profiles for each international supplier, requests fresh quotes for each transfer (since quotes expire), executes the 4-step transfer sequence (quote, recipient, transfer order, fund payment), and handles the immutable recipient constraint by deleting and recreating on supplier address changes. Wise webhooks deliver transfer confirmations and failure notifications; ml-connector verifies the RSA-SHA256 signature on each webhook before processing. Transfer confirmations are posted as GL line items in SAP's general ledger, tied to the original purchase order cost center. Rate-limit retries use exponential backoff. Every record carries a full audit trail.

A real-world example

A manufacturing company with facilities in three countries sources materials from international suppliers across Europe and Asia. Finance manually entered payment details into Wise every time a supplier invoice was approved, then spent days at month-end matching transfer confirmations back to AP invoices in SAP. With SAP S/4HANA and Wise connected, supplier master changes flow automatically from SAP to Wise, approved purchase orders trigger payment instructions directly, and transfer confirmations arrive back as GL line items in SAP. The finance team approves the payment run once, the integration executes it, and month-end reconciliation is complete the same day.

What you can do

  • Sync SAP supplier master data to Wise as recipient profiles, automatically creating profiles for international vendors.
  • Execute international payments from SAP purchase orders by creating transfer quotes and transfers in Wise without manual re-entry.
  • Handle the Wise 4-step transfer sequence (quote, recipient, transfer order, fund payment) and rate-limit retries transparently.
  • Reconcile Wise transfer confirmations and payout failures back into SAP general ledger entries for close matching.
  • Verify Wise webhook signatures (RSA-SHA256) and cache SAP OAuth tokens to minimize API calls and stay within rate limits.

Questions

How does the integration handle SAP and Wise authentication, which both require OAuth 2.0 tokens?
ml-connector stores both credential sets encrypted. On the SAP side, it caches the OAuth access token and refreshes it before expiry (typically 12 hours). On the Wise side, it stores either an API token with no expiry or an OAuth refresh token. Both sides handle token refresh transparently so payment execution is never blocked by a stale token.
Why does Wise require a fresh quote before every transfer, and how does the integration handle this?
Wise quotes have a limited lifespan and lock in the exchange rate; if expired when you try to fund the transfer, the transfer fails. ml-connector creates a fresh quote for each payment instruction immediately before executing the transfer, ensuring the rate is current and the transfer succeeds without retry loops.
How are SAP purchase orders matched to Wise transfers, and what happens if a transfer fails?
Each transfer in Wise carries a reference field linking it back to the SAP purchase order line. If Wise reports a payout failure via webhook, ml-connector posts an exception record in SAP for the finance team to review and either correct the recipient or try again. The original purchase order remains open until the transfer succeeds.

Related integrations

Connect SAP S/4HANA and Wise

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

Get started