Integration approach
Often, out-of-the-box integrations to invoicing platforms don’t meet the core requirements of clients and require significant customization. This is because they focus on syncing data without considering the end-to-end use case and business model. In contrast, managed integrations with Metronome take a first-principles approach to meeting client invoicing requirements. As Metronome invests deeper into different business models, we continuously assess whether to build new native integrations to more billing platforms like our Invoicing with Stripe, Invoicing with NetSuite, and Invoicing with marketplaces solutions. For more information on how to set up a managed integration, contact your Metronome representative.External billing provider setup
This setup describes how you could send invoice data to external downstream billing providers using the Metronome API. While this example is specific to QuickBooks, the pattern and design decisions apply across other use cases. Before setting up in Metronome, check if your billing platform requires additional setup, such as organizational requirements or permissions to create invoices. For example, QuickBooks requires a Developer app to sync invoices:- Create an Intuit Developer app. Go to developer.intuit.com, create an app, and select the Accounting scope.
- Record your Client ID and Client Secret from the app’s Keys & Credentials page.
- Set a Redirect URI for your OAuth callback endpoint.
- Complete the OAuth 2.0 flow to obtain an access token and refresh token.
- Note your Realm ID (Company ID) — this identifies which QBO company you’re writing to.
Configure required objects
To support this use case, start by building out your customer and item objects inside of your selected billing system and store them in custom fields in Metronome. Learn more about how to use custom fields. Recommended custom fields in Metronome:Customer mapping
For each Metronome customer, either find or create a corresponding QBO Customer. The recommended approach is to store the QBO Customer ID as a custom field on the Metronome customer object (e.g.,qbo_customer_id).
If no match is found, create the customer in QBO and store the resulting QBO Customer ID back in Metronome as a custom field.
Item mapping
You have two strategies for mapping Metronome line items to QBO Items:Integrate through the API
Follow this recommended approach to push invoices to your downstream billing provider by building an integration on top of Metronome APIs:- Set up a webhook endpoint and listen for the
invoice.finalizedevent. This event gets created once an invoice is finalized in Metronome after the grace period ends.
NOTEThe
invoice.finalized event is not enabled by default for Metronome clients. To turn this event on, contact your Metronome representative.- This webhook provides
customer_idandinvoice_id. Usecustomer_idto query the/listInvoicesendpoint forfinalizedinvoices from the associated billing period.
id, status, total, subtotal, issued_at, start_timestamp, end_timestamp, contract_id) and the line_items array with per-line details (name, type, quantity, unit_price, total, product_id, etc.).
-
Parse and transform the response into the appropriate format and upsert the invoice and line items.
NOTEFor QuickBooks, you need a customer and at least one item to exist.