Skip to content

Webhooks

Receive and verify signed events for grants, sync, account resources, orders, and reauthorization.

Finatic posts JSON events to an HTTPS endpoint you control. Deliveries are scoped to the company account and account grant that own the subscription.

Configure subscriptions

Create and manage endpoints in Settings → Webhooks after you sign in. Configure an HTTPS URL, a live or sandbox environment, subscribed event types, and a signing secret.

The public event catalog is available at GET /api/v1/webhooks/catalog. Subscription management stays in the authenticated dashboard.

Event catalog

The canonical catalog groups events for account grants, account synchronization, account resources, orders, and connection reauthorization. Use the catalog response rather than hard-coding the available set.

Common events include:

  • account.grant.created, account.grant.updated, and account.grant.revoked
  • account.sync.started, account.sync.succeeded, and account.sync.failed
  • account.balance.updated, account.position.updated, and account.transaction.created
  • order.created, order.updated, order.filled, order.cancelled, and order.rejected
  • connection.reauth.required

Request shape

1{ 2 "schemaVersion": "v1", 3 "eventId": "evt_01HX...", 4 "eventType": "order.filled", 5 "createdAt": "2026-06-08T20:15:00Z", 6 "environment": "live", 7 "companyAccountId": "acct_company_123", 8 "accountId": "acct_financial_456", 9 "grantId": "grant_789", 10 "resource": { 11 "resourceType": "order", 12 "resourceId": "order_abc", 13 "accountId": "acct_financial_456", 14 "grantId": "grant_789" 15 }, 16 "data": { 17 "status": "FILLED", 18 "symbol": "AAPL" 19 } 20} 21

Route and authorize with companyAccountId, accountId, and grantId. Provider connection IDs are internal and must never become public tenancy keys.

Headers

1Content-Type: application/json 2User-Agent: Finatic-Webhooks/3.0 3Finatic-Event-Id: <eventId> 4Finatic-Timestamp: <createdAt> 5X-Finatic-Event: <eventType> 6X-Finatic-Event-Id: <eventId> 7X-Finatic-Timestamp: <createdAt> 8X-Finatic-Delivery: live|test 9

When available, deliveries also include delivery and trace IDs. When a subscription secret is configured, both signature headers contain the same value:

1Finatic-Signature: sha256=<hex> 2X-Finatic-Signature: sha256=<hex> 3

Verify signatures

The signature is HMAC-SHA256 over the exact UTF-8 bytes Finatic posted. Read and verify the raw body before parsing or reserializing it. Reject an absent, malformed, or mismatched signature.

1import { createHmac, timingSafeEqual } from 'node:crypto'; 2 3export async function POST(request: Request) { 4 const rawBody = await request.text(); 5 const signature = request.headers.get('x-finatic-signature') ?? ''; 6 const expected = 'sha256=' + createHmac( 7 'sha256', 8 process.env.FINATIC_WEBHOOK_SECRET!, 9 ) 10 .update(rawBody, 'utf8') 11 .digest('hex'); 12 13 const valid = 14 signature.length === expected.length && 15 timingSafeEqual(Buffer.from(signature), Buffer.from(expected)); 16 17 if (!valid) return new Response('invalid signature', { status: 401 }); 18 19 // Enqueue the verified event and return quickly. 20 return new Response('ok', { status: 200 }); 21}

Retries and idempotency

Finatic treats any HTTP 2xx response as success. On timeouts, transport errors, or non-2xx responses, it retries with exponential backoff and jitter up to the configured attempt limit.

  • Store eventId as an idempotency key before applying side effects.
  • Acknowledge verified events quickly and process expensive work asynchronously.
  • Preserve ordering state per resource when order-sensitive workflows require it.
  • Keep live and test delivery processing isolated.

Testing

  • Use sandbox subscriptions while integrating.
  • Use dashboard test sends to validate endpoint routing and signature handling.
  • Verify the raw-body path; a parsed-and-reserialized body must fail signature verification.
  • Confirm tenant routing with companyAccountId, accountId, and grantId.
  • Confirm duplicate delivery of the same eventId does not repeat side effects.

Next steps