MyNearStoresPartners
Square

Square webhook receiver

POST
/square/webhook

Called by Square, not by partners. Verified with the x-square-hmacsha256-signature header over the raw body and the full notification URL. Acknowledged immediately and processed asynchronously: payment.created is always stored, payment.updated only when the payment is COMPLETED, other events are ignored. Events for merchants with no connected terminal are dropped. Re-deliveries are stored once.

Header Parameters

x-square-hmacsha256-signature*string

Request Body

application/json
  1. body

Square's webhook envelope. Only payment events are used.

merchant_id*string
type*string
event_id*string
created_at?string
Formatdate-time
data*

Response Body

Received.

application/json
  1. response
received?unknown
curl -X POST "https://example.com/square/webhook" \  -H "x-square-hmacsha256-signature: string" \  -H "Content-Type: application/json" \  -d '{    "merchant_id": "string",    "type": "payment.created",    "event_id": "string",    "data": {}  }'
{  "received": true}