Stripe
Connic verifies the Stripe webhook signature and routes the event to the agent. Failed payments trigger tailored dunning, upgrades kick off onboarding, disputes get a draft response, and no webhook server is required.
Overview
Stripe emits a webhook event for payments failing, subscriptions changing, and disputes landing. The Stripe connector provides a webhook URL to register as an endpoint in the Stripe Dashboard. After the events are selected, Stripe signs and sends them, and Connic verifies each signature and triggers the linked agents with the full event object, decline codes and plan details included.
This replaces a separate webhook service: an endpoint to host, signature verification to implement, and retries and replay protection to manage. The connector handles the receiving side; the agent decides what a failed payment or cancellation deserves.
How it works
Create the connector
Add a Stripe connector in the 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 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.
Production patterns
Patterns teams ship in production, with Connic running the queues, workers, and schedulers.
Payment fails
payment_intent.payment_failedAgent reads the decline code, checks lifetime value, and sends a retry email tuned to the failure reason. An expired card gets a different message from 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. An expired card gets a different message from insufficient funds.
Subscription upgraded
customer.subscription.updatedAgent reads the new plan, drafts a welcome email that walks through the features the customer just unlocked, and schedules a check-in for day three.
Subscription upgraded
customer.subscription.updatedAgent reads the new plan, drafts a welcome email that walks through the features the customer just unlocked, and schedules a check-in for day three.
Dispute filed
charge.dispute.createdAgent assembles transaction history, product usage, and prior support threads into a Stripe-ready dispute response that saves finance teams hours per case.
Dispute filed
charge.dispute.createdAgent assembles transaction history, product usage, and prior support threads into a Stripe-ready dispute response that saves finance teams hours per case.
Subscription canceled
customer.subscription.deletedAgent reviews recent usage, support tickets, and the cancellation reason, then sends a tailored win-back offer such as a discount, feature spotlight, or quick call with a human.
Subscription canceled
customer.subscription.deletedAgent reviews recent usage, support tickets, and the cancellation reason, then sends a tailored win-back offer such as a discount, feature spotlight, or quick call with a human.
Signature verification
Every incoming request is checked against the Stripe-Signature header using the configured 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 the 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. The 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
- Connectors
- Connectors
- Modes
- Inbound
- Documentation
- Stripe docs
Frequently Asked Questions
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.Stripe-Signature header with the configured signing secret using HMAC-SHA256, validates timestamps to prevent replay attacks, and rejects invalid signatures. Enter 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