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
| Event | Triggered when |
|---|---|
New | Invoice created |
Processing | Payment received, awaiting confirmation |
Settled | Payment confirmed |
Expired | Invoice 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
eventsto subscribe to all four event types.
Request
Responses
- 200
- 400
- 401
Successfully created the webhook
Bad request. Invalid input or unable to create the webhook.
Unauthorized.