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 webhooks
data. Pass a non-null nextCursor as cursor to fetch the next page. Note that secret is not included in list responses. See API Conventions for the list envelope.
Delete a webhook
{ "id": "...", "deleted": true } on success.
Portfolio Wallet events
Handle an event
- Verify the signature against the raw request body before parsing it.
- Use
Ground-Event-Idto recognize duplicate deliveries. - Queue processing and respond with
200promptly. - Read the latest wallet or operation state before updating your application. Use polling to recover missed updates.
Event payloads
portfolio_wallet.status_changed
portfolio_wallet.deposit.status_changed
portfolio_wallet.withdrawal.status_changed
withdrawal object has the same fields as the response from GET /v2/wallets/:id/withdrawals/:withdrawalId, including feeUsd and the optional Stellar memo when provided. It also includes payout legs and their current execution steps. See Withdraw Funds for the full payoutLegs structure.
portfolio_wallet.approval.status_changed
pending, approved, rejected, and expired. Use activityId with the transaction approval endpoints. Stellar deposit setup uses stellar_trustline. Withdrawal payouts use external_payout across supported networks, including Stellar.
portfolio_wallet.withdrawal.payout.status_changed
portfolio_wallet.strategy.status_changed
portfolio_wallet.rebalance.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:
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.
Stock conversion details
For a completed stock conversion, a rebalance or withdrawal leg can includeassetTrades. Each entry identifies the stock, buy or sell side, exact stock and USDC native quantities, chain, and transaction hash. It appears after finalized settlement; an indicative quote is not a completed trade. See webhook payload examples.