Skip to main content
Webhooks notify your application when GroGov staff refund a payment or a cardholder dispute changes: Your own POST /payments/{id}/void and /refund calls do not trigger webhook events.

Registering an endpoint

Email support@grogov.us with the HTTPS URL that should receive events. GroGov registers the endpoint and provides its signing secret separately. The signing secret starts with whsec_. The signing secret is shown only once. Store it securely and use it to verify webhook signatures. The URL must use https and resolve to a public address. You can have more than one endpoint; each gets every event. To change or remove one, email support.

What you receive

GroGov sends a POST with a JSON body and these headers:
payment.refunded
payment.disputed
A cardholder can dispute a card payment through their card issuer. In the status descriptions below, the merchant is the payment recipient associated with the payment’s processing account. A dispute’s status is one of: stage is the processor’s name for the latest step in the dispute. You get a new payment.disputed event each time status or stage changes. data.id is the payment’s id, the same id your create-payment call returned. The event’s own top-level id (evt_…) identifies the event and is for deduplication. Amounts are integer cents. Call GET /payments/{id} with data.id for the payment’s current state. The full schemas are in the API Reference.

Verifying the signature

Verify the signature of every webhook request before processing the event. The signature is a hex HMAC-SHA256, keyed with your endpoint’s secret, of <t>.<raw request body>. Use the raw body bytes: re-serialised JSON will not match.
Node.js (Express)

Retries and duplicates

Respond with any 2xx status within 10 seconds. Anything else (another status, a timeout, a redirect, a connection error) counts as a failure, and the delivery is retried about every 2 minutes, up to 5 attempts in total. After that GroGov holds the event and can redeliver it once your endpoint is available. Contact GroGov support to request redelivery.
  • Deduplicate using the event’s id. A retried or redelivered event keeps its id, and a delivery can arrive more than once.
  • Do not rely on order. Events can arrive out of order; read the payment with GET /payments/{id} (using data.id) when order matters.
  • Acknowledge receipt before processing. Queue the event before returning 2xx, then process it asynchronously to avoid delivery timeouts.
  • Reconcile payments periodically. Webhook delivery can fail, and events can be missed. Treat GET /payments as the source of truth and reconcile against it periodically.

Testing

Ask for a sandbox webhook endpoint when you request sandbox credentials. To trigger payment.refunded, ask GroGov support to reverse a sandbox payment from the dashboard. Disputes cannot be triggered in the sandbox.