Register a webhook
id, url, events, createdAt, and secret. Store secret on the server only (env var / secret manager). The secret field is only returned on create — it is not included when listing endpoints.
portfolio_wallet.* event types are accepted. Requests that include event types outside the portfolio_wallet.* namespace will be rejected with a validation error.
List webhook endpoints
endpoints array. Note that secret is not included in list responses.
Delete a webhook endpoint
{ "id": "...", "deleted": true } on success.
Portfolio Wallet events
| Event | Fires when |
|---|---|
portfolio_wallet.balance.updated | Wallet balance changes (deposits settling, yield accruing, rebalances) |
portfolio_wallet.deposit.status_changed | A deposit transitions status (processing -> completed, or failed) |
portfolio_wallet.withdrawal.status_changed | A withdrawal transitions status |
portfolio_wallet.withdrawal.payout.status_changed | An individual withdrawal payout leg transitions status |
portfolio_wallet.position.updated | A position’s value, weight, or rate changes |
portfolio_wallet.strategy.status_changed | A strategy update is applied |
Event payloads
portfolio_wallet.balance.updated
portfolio_wallet.deposit.status_changed
portfolio_wallet.withdrawal.status_changed
portfolio_wallet.withdrawal.payout.status_changed
portfolio_wallet.position.updated
portfolio_wallet.strategy.status_changed
Error responses
Webhook registration and management endpoints return errors in a consistent{error, code} structure:
Delivery and headers
Ground POSTs to your registeredurl with these headers:
| Header | Description |
|---|---|
Content-Type | application/json |
Ground-Event-Id | Unique event identifier |
Ground-Event-Type | Event type (e.g. portfolio_wallet.balance.updated) |
Ground-Signature | HMAC signature for verification |
Signature verification
Ground uses a Stripe-style HMAC scheme:- Header format:
Ground-Signature: t=<unix_timestamp>,v1=<hex_hmac> - HMAC:
v1 = HMAC_SHA256(key = secret, message = t + "." + rawBody) rawBodyis the exact request body string (beforeJSON.parse).
Node / Express verification example
Quick checklist
- Register a webhook and persist
secret. - Verify every request with
t + "." + rawBodyand constant-time compare. - Enforce a timestamp window and use HTTPS.
- Log
Ground-Event-IdandGround-Event-Typefor debugging. - Respond with
200quickly — do heavy processing asynchronously.