Skip to main content

Create a new webhook

POST 

/api/v1/stores/:storeId/webhooks

Registers a webhook URL that Coinsnap will call whenever a selected invoice event occurs.

Available events

EventTriggered when
NewInvoice created
ProcessingPayment received, awaiting confirmation
SettledPayment confirmed
ExpiredInvoice expired before payment

Coinsnap signs each delivery with the secret you provide, in two headers. Verify X-Coinsnap-Signature (t=<unixSeconds>,v1=<hex>, HMAC-SHA256 of ${t}.${body}), which resists replay because the timestamp is signed. X-Coinsnap-Sig (sha256=<hex>) signs the body alone and is kept for existing receivers.

Tip: Omit events to subscribe to all four event types.

Request

Responses

Successfully created the webhook