Skip to main content
Use gtoken webhooks to receive updates about your contracts, fees and customer access. Ground sends signed HTTP requests to your application when these operations change status.

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 at https://production.groundtech.co for production events.

1. Register your endpoint

Choose the events your application needs:

Event types

The response includes your registration ID and signing secret:
Store 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.
Start the returned Express app in your server. Keep this route’s raw-body parser ahead of any JSON middleware. Return 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

For awaiting_approval, use activityId with your registered signing key through the approval API. Customer fee events include the requested feeRecipientAddress, managementFeeBps and performanceFeeBps. 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, with groundManagementFeeBps identifying the requested annual rate:

Customer access

4. Troubleshoot deliveries

List delivery history for your registration:
Use GET /v2/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.

Manage your registration

Use list registrations or get a registration to inspect your setup. To stop deliveries, delete the registration:
Keep your saved event IDs to recognize duplicate deliveries already in flight. See the webhook API reference for registration fields.