> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payabli

> Automate the reconciliation between Payabli payouts and their itemized transactions with Tight

## Overview

Instead of building an integration with Payabli in-house, Tight communicates directly with Payabli on your behalf using
your [Payabli](https://www.payabli.com) organization. This enables you to own the relationship between your customer
and Payabli, including any associated economic benefits, while Tight automatically reconciles the payments your users
accept in your app with their Payabli payouts on their books.

## Automated Reconciliation

Payabli deposits money directly into your users' bank accounts on a regular cadence. When utilizing one of the Tight Bank
Transactions integrations, e.g. [Plaid](https://docs.tight.com/integrations/banking/plaid.md), the bank deposit to the user's bank account will
also be ingested by the Tight API as part of that integration's bank feed. Importantly, Tight syncs each user's Payabli
payments, refunds, and payouts, then automatically matches the incoming bank deposit to the corresponding Payabli payout,
saving your users time that would have otherwise been spent manually reconciling these transactions in legacy accounting
systems.

See the [**Invoice Payout Example**](https://docs.tight.com/guides/business-owners/invoicing.md#invoice-payout-example) to understand the level
of complexity that Tight automates.

## Become a Payabli Partner

If you haven't already done so, you should [contact Payabli](https://www.payabli.com) to set up an organization for your
company/app so you can process payments on behalf of your users. Each of your users will be boarded as a Payabli
paypoint under your organization.

Once your Payabli organization is set up, some admin-only configuration is required:

### Create Payabli API Tokens

Payabli API tokens are what allow Tight to pull your users' payments, refunds, and payouts from Payabli so that they can
be reconciled on your users' books.

**1. Generate a private API token**

In your Payabli sandbox environment, create an organization-level private API token. Tight uses this token for all
server-to-server communication with Payabli. See
[Payabli's API token documentation](https://docs.payabli.com/developers/api-tokens) for details.

**2. Note down your public token (optional)**

If your app embeds Payabli's client-side payment components, also note down your Payabli public token. Tight does
not require it today, but you can share it alongside your private token so it is available as your integration
grows.

**3. Production Setup**

Once you are ready to go live in the "Production" environment, repeat the above steps in your Payabli production
environment. Tokens are environment-specific: Tight's Sandbox environment only works with Payabli sandbox tokens, and
Tight's Production environment only works with Payabli production tokens.

### Connect Tight Webhook URLs to Payabli (Real-Time Updates)

By subscribing the Tight API to receive webhooks from your Payabli organization, Tight will be able to pull in updates
to your users' payments, refunds, and payouts in real-time.

For each environment, create a webhook notification for your Payabli organization that sends all payment, transaction,
and transfer events (covering both pay-in and payout activity) to your Tight Webhook URL.

For Sandbox, add `https://webhook.sandbox.hurdlr.com/payabli`.

For Production, add `https://webhook.prod.hurdlr.com/payabli`.

## Securely share your Payabli keys

Next, you will need to share the tokens you collected above with Tight:

1. Payabli private token (`privateToken`): required
2. Payabli public token (`publicToken`): optional

Once collected, use the Tight API to [configure your Payabli integration](https://docs.tight.com/api-reference/integrations/configure-payabli.md).

> [!WARNING]
>
> Your Payabli integration must be configured before you can connect any users' paypoints. Until a private token is
> configured, requests to link a paypoint will fail with a "Payabli not configured" error.

## Connect your users' Payabli paypoints

Once your Payabli integration is configured, you can connect each user's Payabli paypoint to their company in Tight
by [programmatically linking the user's Payabli paypoint](https://docs.tight.com/v5.0/api-reference/invoicing/save-a-payabli-paypoint.md) with
their Payabli paypoint (`paypointId`). You can pass either the numeric paypoint ID or the paypoint's entry name
(e.g. `22fe42ec9a`).

Each company in Tight can be linked to one Payabli paypoint. Attempting to link a second paypoint to the same company
will fail with a "Payabli is already linked" error.
