New — webhooks your AI agents can wait on. Hook & Sense opening to early access.

Square Webhooks

How to Test Square Webhooks Locally (2026)

Square sends webhooks for payment, refund, order, invoice, and customer events. Square signs every webhook with HMAC-SHA256, computed over your notification URL concatenated with the raw request body using your webhook signature key.

With HookSense, point Square at a callback endpoint and let an AI agent await the result over MCP: create_callback_endpointwait_for_callbackverify_signature. Run npx @hooksense/mcp in Claude Desktop, Cursor, or any MCP client. No polling.

Signature Header

x-square-hmacsha256-signature

Algorithm

HMAC-SHA256 (over notification URL + raw body)

Setup Guide

  1. 1Create a free HookSense endpoint at hooksense.com
  2. 2Copy your unique webhook URL
  3. 3In the Square Developer Dashboard → your app → Webhooks → Subscriptions → Add Endpoint
  4. 4Paste your HookSense URL and choose the event types you need
  5. 5Copy the signature key and add it to HookSense for verification
  6. 6Send a test event from the dashboard or run a sandbox transaction
  7. 7Watch the webhook appear in HookSense in real-time

Common Square Webhook Events

payment.created
payment.updated
refund.created
refund.updated
order.created
order.updated
invoice.payment_made
customer.created

Forward to Localhost

Use HookSense CLI to forward Square webhooks directly to your local development server:

npx hooksense listen -p 3000 --path /api/integrations/square

No ngrok or tunnel setup required. Install with npm i -g hooksense or use npx.

Tips & Best Practices

  • Square's signature is computed over the notification URL + raw body — the exact endpoint URL matters
  • Use a constant-time comparison when verifying signatures to avoid timing attacks
  • Sandbox and production use separate signature keys — keep them straight in HookSense
  • Replay captured events to retest your handler without re-running a sandbox payment

Related

Give your agent a Square callback

Create a free callback endpoint and have an agent await its first verified Square webhook over MCP. Paid plans are early-access.

Get Started Free