TBBNHelp
Help CenterMerchants and developers

How to set up TBBN webhooks

A webhook is a URL on your server that TBBN calls the moment something happens — an offer is accepted, a trade completes, a Space booking is paid. Use it to keep your own system in sync without polling the API.

There are two kinds:

WebhookEventsSet up on
Merchant webhooksOne Merchant's offers, trades, checkouts and listingsmerchants.tbbnetwork.com → Webhooks
Business webhooksYour Space bookings — and, if you choose, every one of your Merchants' eventsbusiness.tbbnetwork.com → your Business → Webhooks

Which one do I need?

  • One Merchant, nothing else: a Merchant webhook.
  • More than one Merchant, or Merchants and Spaces: one Business webhook with Also send my Merchants’ trade, offer, listing and checkout events ticked. It covers every Merchant you run, including ones you link later, at one address with one signing secret. Change it once and the change applies everywhere — you don't need a webhook on each Merchant.
  • Several systems (say, an order system and a front desk): add one webhook for each and give each its own Name.

If the same address is set up on a Merchant and on your Business, you still get each event once.

Before you start

You need a public HTTPS URL on your server (not localhost or a private network address) that:

  • accepts POST requests with a JSON body,
  • answers with any 2xx status within a few seconds (do slow work afterwards),
  • checks the signature on every request (below).

Add a Merchant webhook

  1. Sign in at merchants.tbbnetwork.com and select Webhooks.
  2. Under Add a webhook, give it a name (for example Order system) and enter your endpoint's URL, for example https://yourapp.com/webhooks/tbbn.
  3. Choose events: Everything, or untick it and pick the ones you want, such as Offer accepted, Trade completed or Checkout paid.
  4. Select Add webhook. On a live account TBBN emails you a code and asks for it under Confirm it’s you. The webhook then appears in the list with its Signing secret (whsec_…). Store it on your server.

The full list of events, and how to subscribe to others through the API, is in Webhooks & events.

Add a Business webhook

You need the Admin or Developer role on the Business.

  1. Go to business.tbbnetwork.com and open your Business.
  2. Under Webhooks, give it a name and enter your endpoint's URL.
  3. To receive your Merchants' events here too, tick Also send my Merchants’ trade, offer, listing and checkout events.
  4. Choose events: Everything, or untick it and pick from Space bookings (and Merchant events, if you ticked step 3).
  5. Select Add webhook and enter the code TBBN emails you. Copy its Signing secret.

Events from your Merchants carry merchantIds, so your system knows which Merchant each one is about.

Change a webhook

Select Edit next to it, change its name, URL or events, and select Save changes. The signing secret stays the same, so your server needs no change.

Change a signing secret

If a secret may have leaked, select New secret next to the webhook, confirm the prompt and enter the code TBBN emails you. The new secret shows in the list straight away. For the next 24 hours each delivery is signed with both secrets, so change your server over within that time and you won't miss anything.

Check every delivery is really from TBBN

Each request has a header:

X-TBBN-Signature: t=1767225600,v1=5f2c…

To verify it:

  1. Read t (a Unix timestamp) and v1 (a hex signature) from the header.
  2. Compute an HMAC-SHA256 of t, a dot, and the raw request body — ${t}.${rawBody} — using your endpoint's signing secret.
  3. Compare it with v1 using a constant-time comparison. For 24 hours after a secret changes the header has two v1 values, one per secret, and matching either is enough.
  4. Reject the request if they don't match, or if t is more than 5 minutes old.

Every TBBN SDK includes verifyWebhookSignature(), which does all of this — see SDKs.

If your endpoint is down

TBBN retries: three quick attempts, then after 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours. After that the delivery is set aside so you can replay it. The same event can arrive more than once — use its deliveryId to ignore duplicates. Details are in Webhooks & events.

Turn a webhook off

Select Disable next to it. TBBN stops sending to it immediately.

Common questions

I'm not receiving anything. Check the URL is public HTTPS (not localhost) and returns 2xx. For local testing, use a tunnelling tool that gives your machine a public URL.

Signatures never match. Make sure you sign the raw body exactly as received — not re-encoded JSON — and that you're using the secret for that specific endpoint.

Do webhooks use my API key? No. Each endpoint has its own signing secret.

Still stuck? Ask in the community or contact us from tbbnetwork.com/contact.