Stripe
Connic verifies the Stripe webhook signature and routes the event to your agent. Failed payments trigger tailored dunning, upgrades kick off onboarding, disputes get a draft response, and you never stand up a webhook server.
Overview
Stripe emits a webhook event for everything that happens to your money: payments failing, subscriptions changing, disputes landing. The Stripe connector gives you a webhook URL to register as an endpoint in the Stripe Dashboard. You pick the events, Stripe signs and sends them, and Connic verifies each signature and triggers your linked agents with the full event object, decline codes and plan details included.
What you skip is the webhook service you would otherwise run: an endpoint to host, signature verification to implement, retries and replay protection to reason about. The connector handles the receiving side; you write the agent that decides what a failed payment or a cancellation deserves.
How it works
Create the connector
Add a Stripe connector in your project. It only needs a name, and Connic generates a unique webhook URL for it.
Add the endpoint in Stripe
In the Stripe Dashboard, go to Developers, then Webhooks, then Add endpoint. Paste the webhook URL and select the events you want to receive.
Paste the signing secret
Copy the signing secret Stripe generates for the endpoint (it starts with whsec_) into the connector settings and save. The connector does not process events until the secret is set.
What you can build
Patterns teams ship in production. No queues, workers, or schedulers to run.
Payment fails
payment_intent.payment_failedAgent reads the decline code, checks lifetime value, and sends a retry email tuned to the failure reason — expired card gets a different message than insufficient funds.
Payment fails
payment_intent.payment_failedAgent reads the decline code, checks lifetime value, and sends a retry email tuned to the failure reason — expired card gets a different message than insufficient funds.
Signature verification
Every incoming request is checked against the Stripe-Signature header using your signing secret: HMAC-SHA256 verification, timestamp validation to block replayed events, and rate limiting. Invalid signatures are rejected, and the connector refuses to process anything until a secret starting with whsec_ is configured, so an unverified event never reaches your agent.
Each verified event becomes a normal agent run, with full traces, token and cost tracking, and the same guardrails and approval rules as any other trigger. Useful when the agent's next step touches a customer's billing.
Event selection and payload
Which events reach the agent is decided where it belongs, in Stripe: the endpoint's event selection. The agent receives the full Stripe event object as input, with the type field and the data.object it relates to. A payment_intent.payment_failed event carries the last_payment_error with its decline code; a subscription event carries the plan and status. Your agent reads these fields directly, no re-fetching from the Stripe API needed to know what happened. See example payloads and an example agent in the Stripe docs.
Information
- Publisher
- By Connic
- Category
- Connectors
- Modes
- Inbound
- Documentation
- Stripe docs
Frequently Asked Questions
How do I run an AI agent when a Stripe payment fails?
payment_intent.payment_failed as one of the events. When a payment fails, the agent is triggered with the full event, including the decline code and customer ID, and can decide how to respond: a tailored retry email, a support escalation, or an internal alert.Which Stripe events can trigger an agent?
Do I need to verify Stripe webhook signatures myself?
Stripe-Signature header with your signing secret using HMAC-SHA256, validates timestamps to prevent replay attacks, and rejects invalid signatures. You paste the whsec_ secret once during setup; there is no verification code to write or maintain.Bring the event source, payload shape, result destination, and any private-network or approval requirements. We will map Stripe to the right Connic connector mode, deployment path, and observability setup.
Talk to Sales