Your own
POST /payments/{id}/void and /refund calls do not trigger webhook events.
Registering an endpoint
Emailsupport@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 aPOST with a JSON body and these headers:
payment.refunded
payment.disputed
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 any2xx 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 itsid, 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}(usingdata.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 /paymentsas the source of truth and reconcile against it periodically.
Testing
Ask for a sandbox webhook endpoint when you request sandbox credentials. To triggerpayment.refunded, ask GroGov support to reverse a sandbox payment from the dashboard. Disputes cannot be triggered in the sandbox.