Guide · Stripe → Grok Bot · Verified November 1, 2026

Stripe to Grok Bot webhook guide

Short answer: One Stripe endpoint verifies each delivery, a destination filter keeps the events in this guide, and every match is delivered to Grok Bot with its own retry schedule and delivery log.

A dunning agent can draft the recovery email before a human touches the account. Stripe gives Hooks the amount in minor units, the currency, and the customer id; the template turns those into a task a routine can act on without a second API call.

At a glance

1. Configure the Stripe webhook

  1. In the Stripe Dashboard, open Developers → Webhooks → Add endpoint.
  2. Paste the endpoint's ingestion URL and select the events you need (invoice, checkout, subscription).
  3. Copy the endpoint's Signing secret (`whsec_...`) into the Hooks endpoint secret.
  4. Send a test event from the Stripe Dashboard and confirm it in the delivery log.

HMAC-SHA256 over <t>.<raw body>; any matching v1 signature passes. Five minutes between t and the current time.

2. Filter to the events that matter

Filters run per destination before rendering, so a non-matching event is stored with no delivery and no agent call. The rules below are the difference between a useful pairing and a noisy one.

Filter: failed payments above zero

{
  "allow": [
    { "field": "event.type", "op": "equals", "value": "invoice.payment_failed" },
    { "field": "event.subject.amount", "op": "exists" }
  ]
}

3. Configure the Grok Bot destination

A Hooks destination POSTs one JSON task to your Grok Bot routine URL with a Bearer key; a 2xx means the task was queued. Configure the routine URL and key once, then map event fields into the task template.

Destination: Grok Bot routine

{
  "routineUrl": "https://grok.example.com/routines/abc123",
  "key": "{{secret.GROKBOT_KEY}}",
  "task": "Stripe payment failed for {{event.subject.customer}}: {{event.subject.title}} ({{event.subject.amount}} {{event.subject.currency}})\n{{event.subject.url}}"
}

Secrets enter configs only as {{secret.NAME}} references; literal credentials are rejected. Full Grok Bot target guide

4. Verify the delivery and its retries

Send one real event from the source, then open Deliveries. A 2xx from the target means accepted, not finished. 408, 425, 429 and 5xx retry with backoff honoring Retry-After; other 4xx fail permanently with a named code. The rendered request is stored per attempt, so a bad field path is visible without re-sending.

Hooks delivery detail: attempt timeline, request payload, and the destination response for one delivery
Delivery detail: the attempt timeline, the rendered request the target received, and its response — the same record an event keeps for every destination.

The pitfall this pairing hits

Amounts are in the currency's minor unit. amount: 4900 with currency: "usd" is $49.00. Divide by 100 for dollars, or keep the raw value and label it — a task that says “4900 USD” is wrong by two orders of magnitude.

Frequently asked questions

Do I need one endpoint per source or one per destination?

One endpoint per source. Each destination under that endpoint carries its own filter, template, retry schedule, and delivery log, so the same event can feed several targets without duplicate ingress URLs.

What happens while the target is down?

Retryable failures back off and retry within the destination's window; permanent 4xx failures stop immediately. Either way, the original event stays stored, so after fixing the target you replay the event instead of asking the source to send it again.

Amounts are in the currency's minor unit

amount: 4900 with currency: "usd" is $49.00. Divide by 100 for dollars, or keep the raw value and label it — a task that says “4900 USD” is wrong by two orders of magnitude.

More Stripe guides

Other ways into Grok Bot