---
title: "Connect your other tools"
description: "Connect HubSpot and FirstPromoter to a business: sync customers, subscriptions and products with your CRM, and send sales and refunds to your affiliate program."
canonical_url: "https://twominutebilling.com/help/guides/connect-integrations"
---
# Connect your other tools

> Connect HubSpot and FirstPromoter to a business: sync customers, subscriptions and products with your CRM, and send sales and refunds to your affiliate program.

Each business connects its own tools. Open the business and select **Integrations** in the
sidebar. The page lists every tool you can connect, grouped by what it does, with its status for
this business: **Connected**, **Not connected**, **Disabled** or **Reconnect needed**.

You need the **admin** role to see this page and to connect or change a tool.

<note title="Billing always comes first">

Every tool works from its own queue. If a tool is slow or down, its updates wait and are retried.
A failure in a tool never stops or rolls back a charge, an invoice or a renewal.

</note>

## Sync customers with HubSpot

<partner-logo name="hubspot">



</partner-logo>

HubSpot keeps your sales team's records in step with billing. Two Minute Billing stays the owner of
every billing record; HubSpot gets a copy that your team can act on.

### Connect a HubSpot portal

1. On **Integrations**, select **HubSpot**, then **Connect HubSpot**.
2. HubSpot asks you to select a portal and approve the access. Approve it, and HubSpot sends you back.
3. Review the **Preferences**: how customers match HubSpot contacts and companies, which
subscriptions become deals, whether products sync, and what happens when the same field changes
on both sides.
4. Select **Start first sync**.

Nothing is written to HubSpot between connecting and **Start first sync**, so you can set the
preferences first.

<warning title="Live businesses only">

HubSpot connects to live businesses. A test business shows **Not available in test mode**, so test
data never reaches the CRM your sales team uses.

</warning>

### Keep it in sync

With **Sync changes automatically** on, a change in billing reaches HubSpot within minutes, and a
full sync runs every 15 minutes. **Sync now** starts a sync at once.

Edits made in HubSpot come back to the linked records by the rule that you select. With **Flag it
and let me decide**, a field changed on both sides waits for you to select which value to keep.

**Sync health** shows what synced and what failed in the last 24 hours. The **Sync log** lists
each run and every record that it touched.

### Reconnect or disconnect

If someone removes the app's access in HubSpot, the status changes to **Reconnect needed**. Connect
again to continue; the links between records are kept.

Disconnecting stops the sync. Links and the sync history are kept, so a later reconnect to the
same portal continues where it stopped.

## Send affiliate events to FirstPromoter

<partner-logo name="firstpromoter">



</partner-logo>

FirstPromoter pays your affiliates. Two Minute Billing tells it when a referred customer signs up,
pays, gets a refund or cancels, so each partner gets the correct commission.

### Store the referral id on the customer

FirstPromoter knows who referred a customer from the `_fprom_tid` cookie on your website. Before
you connect:

1. In **Settings → Custom fields**, create a customer field for the referral id. The default name
is `fp_tid`.
2. When you create a customer, from your signup flow or the API, put the visitor's `_fprom_tid`
cookie value in that field.

A customer without the field is not a referral. Their sign-up is skipped, and their sales reach
FirstPromoter only to be ignored.

### Connect your account

1. On **Integrations**, select **FirstPromoter**.
2. Enter your **FirstPromoter API key** (in FirstPromoter: Settings → Integrations → Manage API
keys) and your **Account ID** (Settings → Integrations → API integration).
3. If your custom field has another name, enter it in **Referral-id custom field**. Leave it blank
to use `fp_tid`.
4. Select **Connect**.

The credentials are stored encrypted and are never shown again. Only events that occur after you
connect are sent.

<warning title="A test business sends too">

Events from a test business are sent the same way. Connect a test business only to a FirstPromoter
account where test sign-ups and sales are acceptable.

</warning>

### See what is sent

<table>
<thead>
  <tr>
    <th>
      In Two Minute Billing
    </th>
    
    <th>
      Sent to FirstPromoter
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      A customer is created with a referral id
    </td>
    
    <td>
      A sign-up, with who referred them
    </td>
  </tr>
  
  <tr>
    <td>
      An invoice is paid
    </td>
    
    <td>
      A sale for the amount charged, after discounts and before tax
    </td>
  </tr>
  
  <tr>
    <td>
      A refund settles
    </td>
    
    <td>
      A refund, so the commission follows the money
    </td>
  </tr>
  
  <tr>
    <td>
      A subscription is cancelled
    </td>
    
    <td>
      A cancellation
    </td>
  </tr>
</tbody>
</table>

A paid invoice with nothing to charge, such as a fully discounted one, sends no sale.

### Read the delivery log

The **Delivery log** on the FirstPromoter page shows the newest 100 events, each with its status:

- **Delivered**: FirstPromoter has it. A sale for a customer that nobody referred also shows as
delivered, because FirstPromoter answers "not referred", which is the normal result.
- **Skipped**: there was nothing to send, for example a sign-up without a referral id.
- **Waiting to send**: queued, or waiting to retry. A failed call is retried up to six times over
about nine hours.
- **Failed**: FirstPromoter refused it, or the retries ran out. **Last response** shows its reason.
A sign-up refused with "Visitor … invalid" means the stored referral id is not one that
FirstPromoter knows.

Select **Resend** on a row to send that event again now. The result opens with the exact request
and response, with your API key masked. **Resend failed** queues every failed event again. Sales
and refunds carry an id that FirstPromoter checks, so a resend never pays a commission twice.

### Pause, change or disconnect

- **Disabled** pauses the integration. Events that occur while it is disabled are not sent later.
- **Change credentials** replaces the API key and the account id together. Enter both.
- **Settings** changes the referral-id field name.
- **Disconnect** removes the credentials. Events that are waiting to send are skipped. The delivery
log is kept, and you can connect again at any time.

## Connect a tool that is not listed

Send billing events to your own endpoint with [webhooks](https://twominutebilling.com/help/developers/webhooks), and call the
[API](https://twominutebilling.com/help/developers/api-reference) back. Tell us which tool you use. It shapes what we build next.

## Related

- [Integrations](https://twominutebilling.com/integrations)
- [Webhooks](https://twominutebilling.com/help/developers/webhooks)
- [Integrations in the API reference](https://twominutebilling.com/help/developers/api-reference)


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
