ml-connector
Wave AccountingSPS Commerce

Wave Accounting and SPS Commerce integration

Wave Accounting keeps small business financials in one place. SPS Commerce connects suppliers to major retail trading partners over a standardized EDI network. Linking the two means invoices created in Wave flow directly into your retail partner EDI fulfillment pipeline without re-entry, while purchase orders from retailers map back into Wave as transactions and vendor records so your accounting stays in sync with what you owe and what you ship.

How Wave Accounting works

Wave Accounting is a cloud-based accounting platform that exposes invoices, customers, products, accounts, transactions, vendors, and sales taxes through a GraphQL API endpoint at https://gql.waveapps.com/graphql/public. It uses OAuth 2.0 with access tokens (2 hour expiry) and refresh tokens, and requires the connected business to have an active Wave Pro subscription. Wave emits webhooks for invoice lifecycle events (created, updated, paid), customer events, transactions, and product changes. Webhook signature verification uses HMAC-SHA256 with a 5 minute replay window. Invoices cannot be patched; they are created, approved, sent, or deleted. Bills, purchase orders, employees, and payroll are not exposed via the API.

How SPS Commerce works

SPS Commerce is a cloud-based EDI network that exposes purchase orders (850), invoices (810), advance ship notices (856), inventory advice (846), and other EDI standard documents via a REST API at https://api.spscommerce.com with OAuth 2.0 client credentials. All documents are wrapped in RSX 7.7.7 JSON envelope format and cannot be sent as raw JSON. Polling is the primary pattern; webhooks are under development. The OAuth token endpoint runs at https://api.spscommerce.net/authorization/v1/token (note the .net domain). Trading partner IDs are pre-provisioned during onboarding and are not discoverable via API. Rate limits are not publicly documented. Cursor-based pagination is mandatory.

What moves between them

Invoices flow from Wave to SPS Commerce. When an invoice is created or updated in Wave, ml-connector wraps it in an RSX 7.7.7 envelope as an EDI 810 (invoice) document and posts it to SPS Commerce, which routes it to the configured retail trading partners. Purchase orders from retail partners arrive in SPS Commerce as EDI 850 documents, which ml-connector polls at regular intervals and creates as Wave transactions or updates Wave vendor records to keep procurement visibility. The direction is primarily Wave invoices out and SPS inbound POs; Wave does not receive AP invoices from retail partners since Wave is an accounts receivable and general accounting platform.

How ml-connector handles it

ml-connector stores Wave OAuth credentials (including refresh tokens for the 2 hour access token expiry) and SPS Commerce client credentials encrypted. For outbound invoices, it subscribes to Wave's invoice.updated and invoice.created webhooks, fetches the full invoice via GraphQL, transforms it to RSX 7.7.7 JSON envelope format with the correct EDI 810 structure and trading partner IDs, and posts to SPS Commerce. For inbound purchase orders, ml-connector polls SPS at a configurable interval (Wave has no webhook for inbound EDI), parses the RSX envelope and EDI 850 structure, and either creates a Wave transaction (crediting revenue to a contra-accounts-receivable account) or updates an existing Wave vendor record. RSX envelopes require specific metadata headers (sender, receiver, timestamp, document type code); ml-connector builds these from Wave account information and SPS partner configuration. Wave invoices cannot be patched, so updates trigger a new RSX envelope with an updated version number. SPS rate limits are not documented, so ml-connector implements exponential backoff on 429 responses and respects cursor-based pagination. Every document carries a wave:invoiceId and sps:purchaseOrderNumber for deduplication and audit trail.

A real-world example

A small wholesale business uses Wave Accounting to manage invoicing and financials. It supplies products to three major retail chains through SPS Commerce, which handles the EDI translation and partner routing. Before the integration, the fulfillment team exported Wave invoices as PDF and manually re-entered the details into the SPS Commerce portal for each retail partner, a time-consuming and error-prone task that delayed shipments and created reconciliation problems. With Wave and SPS Commerce connected, each invoice created in Wave automatically transforms to the correct EDI 810 format and routes to the retail partners in real time. Inbound purchase orders from the retailers land in SPS and flow back to Wave, creating transaction records that the accounting team can see immediately. The business eliminates manual invoice re-entry and gains real-time visibility into what's owed and what's shipped across all three retail channels.

What you can do

  • Transform Wave invoices to EDI 810 format and post them to SPS Commerce retail partners automatically on creation or update.
  • Poll SPS Commerce for inbound purchase orders (850) and map them to Wave transactions or vendor records for full procurement visibility.
  • Handle Wave OAuth token refresh and SPS Commerce client credentials authentication without interruption.
  • Wrap all outbound documents in RSX 7.7.7 JSON envelope format with correct trading partner IDs and EDI metadata.
  • Maintain a complete audit trail of every invoice and purchase order moved between Wave and SPS Commerce, with full error recovery and replay.

Questions

How does the integration handle Wave's invoice lifecycle (created, updated, sent)?
ml-connector subscribes to Wave webhooks for invoice.created and invoice.updated events. When either fires, it fetches the full invoice details via GraphQL and posts an RSX-wrapped EDI 810 to SPS Commerce. If the invoice is updated (e.g., amount or line items change), ml-connector posts a new RSX envelope with an incremented version number so retail partners see the latest state.
Can purchase orders from retail partners flow back into Wave?
Yes. ml-connector polls SPS Commerce for inbound purchase orders (850 documents). It parses the RSX envelope, extracts the order details and retail partner ID, and can either create a Wave transaction (for revenue/receivable tracking) or update an existing Wave vendor record. Since Wave does not have native purchase orders or AP, the PO data maps to transactions.
What happens if Wave or SPS Commerce credentials expire or fail?
Wave access tokens expire every 2 hours; ml-connector stores the refresh token and automatically refreshes the access token when a GraphQL call returns a 401 or before expiry. SPS client credentials do not auto-refresh but ml-connector retries with exponential backoff on auth failures and surfaces the error so the customer can rotate credentials. Every document is stored encrypted and can be replayed once credentials are restored.

Related integrations

Connect Wave Accounting and SPS Commerce

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

Get started