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:- Your Tight API
client_id - Webhook URL(s) for the Sandbox environment
- Webhook URL(s) for the Production environment
- 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 anENTITY_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’sLIFECYCLE 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:
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 theTight-Verification HTTP header of the webhook.
To verify a Tight JWT, follow these steps:
Select a JWT library of your choice
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_secretIf your library does not automatically decode the JWT, Base64Url decode the JWT payload and deserialize it into a JSON object.
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.If all verification steps succeed, you can be confident the webhook came from Tight and is safe to process.