Skip to main content
Invoice sync creates a HubSpot invoice for each finalized Flexprice invoice whose customer is linked to a HubSpot contact. The HubSpot invoice carries the line items, total, tax, and due date, and is associated with the contact. Turn invoice sync on with the Invoices toggle on the HubSpot connection, or with sync_config.invoice.outbound in the API.

When HubSpot invoice sync runs

Flexprice pushes an invoice to HubSpot when all of these are true:
  1. The invoice is finalized.
  2. The Invoices toggle is on for the HubSpot connection.
  3. The invoice’s customer is linked to a HubSpot contact. Customer sync creates this link, both for customers it creates and for existing customers it matches by email.
  4. The invoice has not been pushed to HubSpot before.
Flexprice starts the sync five seconds after the invoice is finalized, and tries up to three times. Invoice creation and finalization in Flexprice never wait for HubSpot. If all three attempts fail, Flexprice does not try again on its own; see Retrying a HubSpot invoice sync.

What Flexprice creates in HubSpot for an invoice

Flexprice creates the invoice as a draft, adds its line items, associates it with the contact, fills in the totals, and then moves it to open.

HubSpot invoice properties

Look for the Flexprice invoice number in the invoice’s purchase order number field in HubSpot.

HubSpot invoice line items

Flexprice adds one HubSpot line item for every line item on the Flexprice invoice, including usage-based charges.

What HubSpot invoice sync leaves unchanged

  • Changes after the first sync. Flexprice pushes each invoice once. Payments, voids, and credit notes recorded in Flexprice later do not update the HubSpot invoice.
  • Activity in HubSpot. Flexprice does not read invoices, payments, or status changes back from HubSpot. A payment collected in HubSpot is not recorded in Flexprice.
  • Deals and companies. The HubSpot invoice is associated with the contact only.
  • Customers without a HubSpot contact. Their invoices are not pushed to HubSpot.

Retrying a HubSpot invoice sync

To push an invoice again, for example after you fix a missing scope or link its customer to a contact, call the integration sync endpoint with the invoice ID:
The endpoint sends the invoice to every connected provider that has invoice sync turned on. If the invoice was already pushed to HubSpot, Flexprice skips HubSpot.

Troubleshooting HubSpot invoice sync