flowcheck_create_webhook
Register HTTPS webhooks to receive real-time notifications for financial events like payouts, refunds, and balance changes, with HMAC-SHA256 verification for security.
Instructions
Register a new HTTPS webhook endpoint. Returns a signing secret for HMAC-SHA256 verification. Available events: payout.matched, payout.discrepancy, payout.missing, refund.detected, balance.threshold
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS webhook URL you own | |
| events | Yes | Events to subscribe to |
Implementation Reference
- src/tools/webhooks.ts:49-54 (handler)The handler function for the flowcheck_create_webhook tool.
async ({ url, events }) => { const result = await client.request("POST", "/webhooks", { body: { url, events }, }); return { content: [{ type: "text" as const, text: result }] }; }, - src/tools/webhooks.ts:31-47 (schema)The input schema defining the required parameters (url and events) for the flowcheck_create_webhook tool.
inputSchema: z.object({ url: z .string() .url() .describe("HTTPS webhook URL you own"), events: z .array( z.enum([ "payout.matched", "payout.discrepancy", "payout.missing", "refund.detected", "balance.threshold", ]), ) .describe("Events to subscribe to"), }), - src/tools/webhooks.ts:22-55 (registration)The registration of the flowcheck_create_webhook tool using the MCP server.
server.registerTool( "flowcheck_create_webhook", { title: "Create Webhook", description: "Register a new HTTPS webhook endpoint. " + "Returns a signing secret for HMAC-SHA256 verification. " + "Available events: payout.matched, payout.discrepancy, " + "payout.missing, refund.detected, balance.threshold", inputSchema: z.object({ url: z .string() .url() .describe("HTTPS webhook URL you own"), events: z .array( z.enum([ "payout.matched", "payout.discrepancy", "payout.missing", "refund.detected", "balance.threshold", ]), ) .describe("Events to subscribe to"), }), }, async ({ url, events }) => { const result = await client.request("POST", "/webhooks", { body: { url, events }, }); return { content: [{ type: "text" as const, text: result }] }; }, );