Template for creating a hookpipe provider — a knowledge module that teaches hookpipe how to verify, parse, and understand webhooks from a specific service.
-
Create your repo from this template
Click "Use this template" on GitHub, or:
gh repo create yourname/hookpipe-provider-my-service --template hookpipe/hookpipe-provider-template cd hookpipe-provider-my-service npm install -
Edit
src/index.tsReplace the placeholder values with your provider's details:
id— unique identifier (lowercase, hyphens only)name— human-readable nameverification— how to validate incoming webhook signaturesevents— known event types your service can send
Delete any optional capabilities you don't need (they're commented out in the template).
-
Run the tests
npm testTests will fail until you change
idandnamefrom the template defaults — this is intentional. -
Share your provider
The fastest way — no npm account needed:
git push # Users can install directly from GitHub: hookpipe connect my-service --provider github:yourname/hookpipe-provider-my-service --secret xxx --to https://...Or publish to npm:
# Update package.json: name, description, repository npm publish # Users install by package name: hookpipe connect my-service --provider hookpipe-provider-my-service --secret xxx --to https://...
| Capability | Required | Description |
|---|---|---|
id |
Yes | Unique identifier |
name |
Yes | Human-readable name |
verification |
Yes | Signature verification method |
events |
Yes | Event type catalog |
secrets |
No | Multiple credentials (key + IV, certificates) |
decode |
No | Decrypt or decode encrypted/signed payloads |
parseEventType |
No | Extract event type from payload |
parseEventId |
No | Extract event ID from payload |
challenge |
No | URL verification challenge-response (Slack, Discord) |
mock |
No | Generate fake events for development |
presets |
No | Suggested event filter groups |
nextSteps |
No | Post-setup instructions for the user |
Events can include optional Zod schema for payload validation. See the full Provider Design Guide for details and examples.
Tip: For typed schema support with Zod, install
@hookpipe/providersand use itsdefineProviderand types instead of the local copy.
export default defineProvider({
id: "my-service",
name: "My Service",
verification: { header: "x-signature", algorithm: "hmac-sha256" },
events: {
"order.created": "New order placed",
"order.shipped": "Order has shipped",
},
});export default defineProvider({
id: "my-psp",
name: "My Payment Gateway",
secrets: {
api_key: { description: "Encryption key" },
api_iv: { description: "Initialization vector" },
},
verification: {
type: "custom",
verify: async (secrets, body, headers) => {
return verifySHA256(body, secrets.api_key);
},
},
decode: async (secrets, body) => {
return JSON.parse(aesDecrypt(body, secrets.api_key, secrets.api_iv));
},
events: {
"payment.success": "Payment completed",
"payment.failed": "Payment failed",
},
});- npm package:
hookpipe-provider-<your-service> - Provider ID: lowercase, hyphens only (e.g.,
my-service)
MIT — use this template however you want.