ml-connector
FreshBooksWalmart Marketplace

FreshBooks and Walmart Marketplace integration

Small businesses selling on Walmart Marketplace need to reconcile marketplace orders with their general accounting records. FreshBooks tracks invoices, expenses, and the general ledger. Walmart Marketplace reports orders, inventory, returns, and settlement payouts. Connecting the two systems keeps your FreshBooks clients and invoices aligned with Walmart order data and settlement receipts, and eliminates manual entry and reconciliation of marketplace revenue.

How FreshBooks works

FreshBooks is a cloud accounting platform that exposes clients, invoices, expenses, payments, chart of accounts, and journal entries through REST APIs. It supports webhooks for real-time event notification on invoice, payment, bill, and expense changes, with HMAC-SHA256 signature validation. FreshBooks uses user-delegated OAuth 2.0 (not Client Credentials), meaning each user grants access through the authorization flow, and token scopes are granular per resource. Webhook payloads arrive as application/x-www-form-urlencoded data and can take seconds to several minutes to deliver. The status fields on invoices and payments are read-only; the system computes them.

How Walmart Marketplace works

Walmart Marketplace exposes items, inventory, orders, returns, pricing, and settlement reconciliation reports through REST APIs using Client Credentials OAuth 2.0 for authentication. Tokens expire every 15 minutes and must be refreshed. All requests require custom WM_SEC.ACCESS_TOKEN headers and WM_QOS.CORRELATION_ID headers with unique UUIDs. Orders are available for the last 180 days with a maximum of 10,000 per request. Walmart Fulfillment Services (WFS) returns are read-only. Walmart Marketplace also provides webhooks for orders, inventory, returns, and reconciliation reports with 5-minute, 15-minute, and 45-minute retry intervals, though exact webhook signature schemes require authenticated portal access.

What moves between them

Orders flow from Walmart Marketplace into FreshBooks as invoices. Each marketplace order becomes an invoice in FreshBooks, with order line items mapped to FreshBooks products or expense categories. Customers from Walmart Marketplace orders are created or updated as clients in FreshBooks. Settlement and payout reports from Walmart Marketplace are pulled on a schedule and posted as journal entries in FreshBooks' chart of accounts, with marketplace fees and discounts mapped to expense accounts. Returns and refunds are tracked in both systems to keep the accounting records in agreement.

How ml-connector handles it

ml-connector stores FreshBooks OAuth credentials and Walmart Client Credentials, refreshing the FreshBooks token as needed and requesting new Walmart tokens every 12 minutes to avoid expiry during processing. It validates webhook signatures from both FreshBooks (HMAC-SHA256) and Walmart (portal-scheme) and reconciles orders from Walmart against FreshBooks' existing invoice records using purchase order IDs. Line items are mapped to FreshBooks products by SKU, and unmapped items are added to a default category for manual review. Settlement reports are fetched on a weekly schedule tied to Walmart's payout calendar, and each line is posted as a journal entry with the settlement date and amount, with marketplace fees and seller refunds mapped to dedicated FreshBooks chart of accounts. Retries use exponential backoff for Walmart's rate limits (throttled single-item price updates are handled via bulk feeds instead). Every record carries a full audit trail.

A real-world example

A small business selling clothing on Walmart Marketplace uses FreshBooks for accounting. Before the integration, the owner exported order summaries from Walmart and manually created invoices in FreshBooks each week, then re-entered settlement payout data from the settlement report to reconcile monthly revenue. With Walmart Marketplace and FreshBooks connected, orders automatically appear as FreshBooks invoices on the day they ship, customers are synced to the client list, and weekly settlement reports post directly into the general ledger. The owner now reconciles Walmart revenue in minutes instead of hours, and can see accurate gross and net revenue by order date and channel.

What you can do

  • Create FreshBooks invoices from Walmart Marketplace orders, with order line items mapped to FreshBooks products or custom categories.
  • Sync customer records from Walmart Marketplace orders into FreshBooks as clients with email and shipping address.
  • Post Walmart Marketplace settlement reports as journal entries in FreshBooks' general ledger, with fees and refunds mapped to expense accounts.
  • Handle FreshBooks user-delegated OAuth 2.0 and Walmart Client Credentials OAuth, with automatic token refresh and webhook signature validation from both sides.
  • Reconcile order and settlement records with retries and a full audit trail, enabling monthly revenue reconciliation without manual entry.

Questions

What records move between Walmart Marketplace and FreshBooks?
Orders from Walmart Marketplace flow into FreshBooks as invoices, with line items mapped to products and customers created as clients. Settlement reports from Walmart Marketplace are posted as journal entries in FreshBooks' chart of accounts. Returns and refunds are tracked in both systems to keep revenue records in agreement.
Does the integration handle the different authentication methods?
Yes. FreshBooks uses user-delegated OAuth 2.0, so ml-connector uses the authorization flow to obtain tokens on behalf of the authenticated user. Walmart Marketplace uses Client Credentials OAuth, and ml-connector refreshes tokens automatically every 12 minutes to stay ahead of the 15-minute expiry window. Both webhook signatures are validated before processing.
How are line items and accounts mapped between the two systems?
Walmart Marketplace order line items are matched to FreshBooks products by SKU. If a SKU is not found, the item is added to a default category for manual review. Marketplace fees, seller refunds, and payout deductions are mapped to dedicated FreshBooks expense accounts so settlement reports post with the correct allocations to the general ledger.

Related integrations

Connect FreshBooks and Walmart Marketplace

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

Get started