---
title: "Webhooks"
description: "The endpoints below MANAGE subscriptions; what follows is what arrives at one."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/webhooks"
---
# Webhooks

> The endpoints below MANAGE subscriptions; what follows is what arrives at one.

The endpoints below MANAGE subscriptions; what follows is what arrives at one.

**The envelope.** Every delivery is a `POST` of exactly these eight fields, and no others: `id` (the event id, also sent as a header), `occurred_at`, `source`, `user` (the actor, when one is known), `event_type`, `api_version`, `content` and `object: "event"`. `content` nests the resource under its own type — `{ invoice: { id, …, resource_version } }` — so one shape parses every event.

**Verify the signature before you trust a delivery.** `Tmbilling-Signature` is `sha256=` followed by the hex HMAC-SHA256 of the RAW request body, keyed with that endpoint's signing secret. Compute it over the bytes you received, not over a re-serialised object — re-encoding JSON changes the bytes and the digest with them. Compare with a constant-time equality. `Tmbilling-Event-Id` repeats the event id so you can dedupe without parsing the body; treat it as the idempotency key for your own side, because a redelivery reuses it.

**Delivery and retries.** Any 2xx is success. Anything else is retried up to 6 attempts with a fixed backoff — 1m, 5m, 30m, 2h, 6h — after which the delivery is marked failed and left for you to redeliver. A host that stops answering is circuit-broken: deliveries to it are held rather than attempted, and those pauses cost none of the 6 attempts. Deliveries are not ordered; use `occurred_at` if order matters to you.

**What an endpoint receives.** An endpoint with no `event_types` receives every type, including ones added after you created it; set `event_types` to receive only those. An endpoint scoped to a business receives only that business's events, and an endpoint always stays inside its own test/live partition — a test business's activity never reaches a production consumer. Events about the organization itself belong to no business and reach both partitions.

## Endpoints

<table>
<thead>
  <tr>
    <th>
      Method
    </th>
    
    <th>
      Endpoint
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-disputes-chargebacks">
        <code>
          /v1/businesses/{biz}/disputes
        </code>
      </a>
    </td>
    
    <td>
      List disputes / chargebacks
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-a-dispute-chargeback">
        <code>
          /v1/businesses/{biz}/disputes/{id}
        </code>
      </a>
    </td>
    
    <td>
      Get a dispute / chargeback
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/record-the-outcome-of-a-dispute">
        <code>
          /v1/businesses/{biz}/disputes/{id}/outcome
        </code>
      </a>
    </td>
    
    <td>
      Record the outcome of a dispute
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-customer-billing-emails">
        <code>
          /v1/businesses/{biz}/emails
        </code>
      </a>
    </td>
    
    <td>
      List customer billing emails
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-a-customer-billing-email">
        <code>
          /v1/businesses/{biz}/emails/{id}
        </code>
      </a>
    </td>
    
    <td>
      Get a customer billing email
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/re-queue-a-customer-billing-email-for-delivery">
        <code>
          /v1/businesses/{biz}/emails/{id}/resend
        </code>
      </a>
    </td>
    
    <td>
      Re-queue a customer billing email for delivery
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/billing-email-send-counts">
        <code>
          /v1/businesses/{biz}/emails/activity
        </code>
      </a>
    </td>
    
    <td>
      Billing email send counts
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/when-time-relative-reminders-fire">
        <code>
          /v1/businesses/{biz}/emails/reminders
        </code>
      </a>
    </td>
    
    <td>
      When time-relative reminders fire
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/send-an-ad-hoc-billing-email">
        <code>
          /v1/businesses/{biz}/emails/send
        </code>
      </a>
    </td>
    
    <td>
      Send an ad-hoc billing email
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-the-business-ses-transport-settings">
        <code>
          /v1/businesses/{biz}/emails/ses
        </code>
      </a>
    </td>
    
    <td>
      Get the business SES transport settings
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PATCH
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/update-the-business-ses-transport-settings">
        <code>
          /v1/businesses/{biz}/emails/ses
        </code>
      </a>
    </td>
    
    <td>
      Update the business SES transport settings
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-the-business-smtp-transport-settings">
        <code>
          /v1/businesses/{biz}/emails/smtp
        </code>
      </a>
    </td>
    
    <td>
      Get the business SMTP transport settings
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PATCH
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/update-the-business-smtp-transport-settings">
        <code>
          /v1/businesses/{biz}/emails/smtp
        </code>
      </a>
    </td>
    
    <td>
      Update the business SMTP transport settings
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/test-the-smtp-connection-without-sending-mail">
        <code>
          /v1/businesses/{biz}/emails/smtp/test-connection
        </code>
      </a>
    </td>
    
    <td>
      Test the SMTP connection without sending mail
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-suppressed-addresses">
        <code>
          /v1/businesses/{biz}/emails/suppressions
        </code>
      </a>
    </td>
    
    <td>
      List suppressed addresses
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/lift-a-suppression">
        <code>
          /v1/businesses/{biz}/emails/suppressions/{address}
        </code>
      </a>
    </td>
    
    <td>
      Lift a suppression
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-billing-email-templates">
        <code>
          /v1/businesses/{biz}/emails/templates
        </code>
      </a>
    </td>
    
    <td>
      List billing email templates
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-one-billing-email-template">
        <code>
          /v1/businesses/{biz}/emails/templates/{type}
        </code>
      </a>
    </td>
    
    <td>
      Get one billing email template
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PUT
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/customise-a-billing-email-template">
        <code>
          /v1/businesses/{biz}/emails/templates/{type}
        </code>
      </a>
    </td>
    
    <td>
      Customise a billing email template
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/reset-a-template-to-the-built-in">
        <code>
          /v1/businesses/{biz}/emails/templates/{type}
        </code>
      </a>
    </td>
    
    <td>
      Reset a template to the built-in
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/render-a-template-with-sample-data">
        <code>
          /v1/businesses/{biz}/emails/templates/{type}/preview
        </code>
      </a>
    </td>
    
    <td>
      Render a template with sample data
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/send-a-test-billing-email">
        <code>
          /v1/businesses/{biz}/emails/test
        </code>
      </a>
    </td>
    
    <td>
      Send a test billing email
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-a-business-s-events">
        <code>
          /v1/businesses/{biz}/events
        </code>
      </a>
    </td>
    
    <td>
      List a business's events
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-outbound-gateway-request-logs">
        <code>
          /v1/businesses/{biz}/gateway_requests
        </code>
      </a>
    </td>
    
    <td>
      List outbound gateway request logs
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-an-outbound-gateway-request-log">
        <code>
          /v1/businesses/{biz}/gateway_requests/{id}
        </code>
      </a>
    </td>
    
    <td>
      Get an outbound gateway request log
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-inbound-gateway-webhooks">
        <code>
          /v1/businesses/{biz}/gateway_webhooks
        </code>
      </a>
    </td>
    
    <td>
      List inbound gateway webhooks
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-an-inbound-gateway-webhook">
        <code>
          /v1/businesses/{biz}/gateway_webhooks/{id}
        </code>
      </a>
    </td>
    
    <td>
      Get an inbound gateway webhook
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/replay-a-gateway-webhook-whose-processing-failed">
        <code>
          /v1/businesses/{biz}/gateway_webhooks/{id}/replay
        </code>
      </a>
    </td>
    
    <td>
      Replay a gateway webhook whose processing failed
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/record-a-dispute-that-the-gateway-cannot-report">
        <code>
          /v1/businesses/{biz}/payments/{pay}/disputes
        </code>
      </a>
    </td>
    
    <td>
      Record a dispute that the gateway cannot report
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-transactions">
        <code>
          /v1/businesses/{biz}/transactions
        </code>
      </a>
    </td>
    
    <td>
      List transactions (charges / refunds)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/retrieve-a-transaction">
        <code>
          /v1/businesses/{biz}/transactions/{txn}
        </code>
      </a>
    </td>
    
    <td>
      Retrieve a transaction
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/receive-ses-bounce-and-complaint-notifications">
        <code>
          /v1/email_webhooks/ses
        </code>
      </a>
    </td>
    
    <td>
      Receive SES bounce and complaint notifications
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/recent-domain-events">
        <code>
          /v1/events
        </code>
      </a>
    </td>
    
    <td>
      Recent domain events
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/get-an-event-with-its-per-endpoint-webhook-deliv">
        <code>
          /v1/events/{evt}
        </code>
      </a>
    </td>
    
    <td>
      Get an event with its per-endpoint webhook deliveries
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/inbound-provider-webhook-endpoint">
        <code>
          /v1/gateway_webhooks/{gateway}
        </code>
      </a>
    </td>
    
    <td>
      Inbound provider webhook endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/inbound-provider-webhook-endpoint-2">
        <code>
          /v1/gateway_webhooks/{gateway}/{id}
        </code>
      </a>
    </td>
    
    <td>
      Inbound provider webhook endpoint, account id in the path
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/flush-pending-tm-test-gateway-async-webhooks">
        <code>
          /v1/tmtest/advance
        </code>
      </a>
    </td>
    
    <td>
      Flush pending TM Test Gateway async webhooks
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/tm-test-gateway-form-post-challenge-page">
        <code>
          /v1/tmtest/form_post
        </code>
      </a>
    </td>
    
    <td>
      TM Test Gateway form_post challenge page
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/reconcile-a-transaction-to-a-terminal-outcome">
        <code>
          /v1/transactions/{txn}/reconcile
        </code>
      </a>
    </td>
    
    <td>
      Reconcile a transaction to a terminal outcome
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/list-webhook-endpoints">
        <code>
          /v1/webhook_endpoints
        </code>
      </a>
    </td>
    
    <td>
      List webhook endpoints
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/register-an-outbound-webhook-endpoint">
        <code>
          /v1/webhook_endpoints
        </code>
      </a>
    </td>
    
    <td>
      Register an outbound webhook endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/retrieve-a-webhook-endpoint">
        <code>
          /v1/webhook_endpoints/{id}
        </code>
      </a>
    </td>
    
    <td>
      Retrieve a webhook endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PATCH
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/enable-disable">
        <code>
          /v1/webhook_endpoints/{id}
        </code>
      </a>
    </td>
    
    <td>
      Enable/disable, change URL, or re-scope an endpoint to a business
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/delete-a-webhook-endpoint">
        <code>
          /v1/webhook_endpoints/{id}
        </code>
      </a>
    </td>
    
    <td>
      Delete a webhook endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/delivery-attempt-log-for-an-endpoint">
        <code>
          /v1/webhook_endpoints/{id}/deliveries
        </code>
      </a>
    </td>
    
    <td>
      Delivery attempt log for an endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/redeliver-a-webhook-delivery">
        <code>
          /v1/webhook_endpoints/{id}/deliveries/{del}/redeliver
        </code>
      </a>
    </td>
    
    <td>
      Redeliver a webhook delivery
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/requeue-every-failed-delivery-on-this-endpoint">
        <code>
          /v1/webhook_endpoints/{id}/redeliver_failed
        </code>
      </a>
    </td>
    
    <td>
      Requeue every failed delivery on this endpoint
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/redeliver-the-endpoint-s-most-recent-delivery">
        <code>
          /v1/webhook_endpoints/{id}/redeliver_latest
        </code>
      </a>
    </td>
    
    <td>
      Redeliver the endpoint's most recent delivery
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/rotate-the-signing-secret">
        <code>
          /v1/webhook_endpoints/{id}/rotate_secret
        </code>
      </a>
    </td>
    
    <td>
      Rotate the signing secret
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST
      </code>
    </td>
    
    <td>
      <a href="https://twominutebilling.com/help/developers/api-reference/webhooks/send-a-test-event-to-an-endpoint">
        <code>
          /v1/webhook_endpoints/{id}/test
        </code>
      </a>
    </td>
    
    <td>
      Send a test event to an endpoint
    </td>
  </tr>
</tbody>
</table>


## Sitemap

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