Skip to main content

Get Started

The Tight API uses webhooks to communicate changes to entities and for notable lifecycle events, e.g. an invoice being paid. To get started, simply reach out to your Tight API contact and provide the following info:
  1. Your Tight API client_id
  2. Webhook URL(s) for the Sandbox environment
  3. Webhook URL(s) for the Production environment
Tight sends webhooks from the following IP addresses:
  • 3.221.92.254
  • 34.200.77.221

Entity update webhooks

Any time an entity is updated in the Tight API, whether by a user or a third-party integration, the Tight API sends an ENTITY_UPDATE webhook to communicate that change. These webhooks contain a JSON body with the full detail of the entity that was updated:

Lifecycle webhooks

The Tight API’s LIFECYCLE webhooks provide real-time lifecycle event data, useful for performing analytics, notifying users of pertinent events, and ultimately optimizing activation & retention. The webhooks contain a JSON body with data relevant to the event:
Refer to the Lifecycle Event Dictionary for the full list of lifecycle events.

Additional use cases

Lifecycle Events can be used in varying ways depending on your product’s use case. For example, if your product manages corporate/employee spend, it may benefit your user experience to make the transactionCreated event trigger a push notification prompting the user to add a receipt image. The eventData included with the transactionCreated event contains the information necessary to route the user to the exact transaction that requires a receipt.

Webhook verification

Tight signs every webhook, so that you have the option to verify the webhooks you receive. This helps you protect against a bad actor flooding your server with fake webhooks. Verifying Webhooks Tight follows the JSON Web Token (JWT) standard and includes its JWTs in the Tight-Verification HTTP header of the webhook. To verify a Tight JWT, follow these steps:
1
Extract the Tight-Verification HTTP header from the Tight webhook
2
Select a JWT library of your choice
3
Pass in HMAC-SHA256 as the signing algorithm to your selected JWT library and then use the library to verify the value of the Tight-Verification header against your webhook_secret
If your library does not automatically decode the JWT, Base64Url decode the JWT payload and deserialize it into a JSON object.
4
Ensure that the webhook is not expired. Verify that the difference between the iat field of the payload and the current NumericDate timestamp is within your tolerance. Tight recommends a default tolerance of 5 minutes.
5
Ensure that the webhook was not modified by anyone other than Tight. Verify that the request_body_sha256 field of the payload is equal to the SHA-256 hash of the webhook’s request body.
If all verification steps succeed, you can be confident the webhook came from Tight and is safe to process.