Before you start
You need an API key and a public HTTPS callback URL. Ground rejects callback URLs with credentials, private or loopback hosts, or nonstandard ports. The examples use sandbox. Register a separate endpoint with your production API key athttps://production.groundtech.co for production events.
Registrations created through v3 receive v3 payloads and are managed through v3. Existing v2 registrations retain v2 payloads and are managed through v2.
1. Register your endpoint
Choose the events your application needs:Event types
id to manage the registration. Store secret securely on your server as
GROUND_WEBHOOK_SECRET. The example secret is illustrative; use the value from
your response. Ground returns the secret only when the registration is created.
If creation times out, list registrations before retrying. If the secret was
lost, delete the registration and create it again.
2. Receive and verify events
Each request includes these headers:
Verify the signature against the raw request body before parsing JSON. Ground
signs
timestamp + "." + rawBody with HMAC-SHA256 using your registration secret.
The Express example below accepts a saveEvent function from your application.
It must save the event durably for background processing, deduplicate by
event.id and resolve only after that work is committed. For an event already
saved, it should resolve without adding duplicate work.
2xx after saving the event, then process
it in the background. If saving fails, return 503 so Ground can retry.
3. Handle events
Deliveries use{ id, type, createdAt, data }. Retries keep the same event ID.
Events can arrive more than once or out of order. Deduplicate them by ID and read
the current resource before updating your application’s state, so a delayed event
cannot overwrite newer settings.
Use
gVaultId and address from data in these requests. An access event’s
allowed field identifies the requested permission; check status and the
access endpoint before treating the change as effective.
Contract readiness
Customer fee updates
Forawaiting_approval, use activityId with your registered signing key through
the approval API.
Customer fee events include the requested feeRecipientAddress,
managementFeePct and performanceFeePct. Settings take effect when the update
is confirmed; read gVault detail for the current values.
Ground fee updates
Ground fee updates use the same event type, withgroundManagementFeePct
identifying the requested annual rate:
Customer access
4. Troubleshoot deliveries
List delivery history for your registration:GET /v3/gvaults/webhooks/events to list deliveries across your organization.
Both endpoints return data and nextCursor; pass cursor to read another page.
Inspect attemptCount, deliveredAt and lastError when delivery fails.
Delivery statuses
Delivery status describes the HTTP request. The operation status is inside the
delivered
data object, or payload in delivery history. For example, delivery
can be completed while a fee update reports failed.
Ground retries network errors, HTTP 5xx, and HTTP 408, 425 and 429 responses
with increasing delays until the attempt limit is reached. Other HTTP errors
stop delivery. Check your endpoint and read the resource’s current state if
delivery fails; do not rely on receiving every event.