Stripe
Run an agent on failed payments, subscription changes, disputes or any other Stripe event. connic checks the signature before anything runs.
- Modes
- Inbound
- Set up in
- Dashboard or connectors/*.yaml
- Documentation
- Stripe docs
- Publisher
- By connic
Get the whole event as input
The agent receives each event as Stripe sends it, with its type and the data.object it refers to, so it can act on a decline code or a new plan right away.
- Any event type
- Payment intents, invoices, subscriptions, disputes and the rest of Stripe's catalog. The connector forwards whatever the endpoint sends.
- Every linked agent
- One event starts a run for each agent linked to the connector, and the response to Stripe lists the run IDs.
- Skip what an agent ignores
- Raise StopProcessing in before() middleware for event types an agent doesn't handle, and the run ends before the model is called.
{
"id": "evt_3Q8812",
"object": "event",
"type": "payment_intent.payment_failed",
"data": {
"object": {
"id": "pi_3Q8812",
"amount": 4900,
"currency": "eur",
"customer": "cus_R48812",
"last_payment_error": {
"code": "expired_card",
"message": "Your card has expired."
}
}
}
}{
"id": "evt_3Q9120",
"object": "event",
"type": "customer.subscription.updated",
"data": {
"object": {
"id": "sub_1Q4102",
"customer": "cus_R48812",
"status": "active",
"plan": { "id": "plan_pro", "amount": 4900, "interval": "month" }
},
"previous_attributes": {
"plan": { "id": "plan_starter" }
}
}
}Only signed events start a run
connic checks every request against your endpoint's signing secret before an agent sees it.
- Signing secret first
- Until you save the whsec_ secret from Stripe, every request gets a 400 and nothing runs.
- HMAC-SHA256
- The Stripe-Signature header must match a signature over the timestamp and the raw body. A missing or wrong signature gets a 401.
- Five-minute window
- Events signed more than five minutes ago are rejected, so old requests can't be replayed.
{
"status": "ok",
"event_type": "payment_intent.payment_failed",
"dispatched_to": 1,
"run_ids": ["550e8400-e29b-41d4-a716-446655440000"]
}{
"error": "Invalid Stripe signature"
}Keep the Stripe trigger in code
Declare it in connectors/. The signing secret comes from a Variable, so it never sits in the file. Deploy once to get the URL, add the endpoint in Stripe, then store its whsec_ secret as a Variable and reference it.
type: stripe
name: Billing events
config:
webhook_secret: ${STRIPE_WEBHOOK_SECRET}
agents:
- dunning-agentPick the events in Stripe
You connect once in the Stripe Dashboard. After that, you change which events reach your agents there, without a deploy.
- Paused connector
- connic answers Stripe with a 200 and starts no run. Events from that time aren't stored or replayed after you resume.
- Rate limits
- Requests above the connector's rate limit get a 429 with a retry_after value.
Create the connector
connic generates its webhook URL. For a connector in code, the first deploy does.
Add the endpoint in Stripe
Paste the URL as a webhook endpoint and select the events Stripe should send.
Save the signing secret
Copy the whsec_ secret that Stripe generates for the endpoint into the connector.
Events start runs
Each verified event starts the linked agents, and every run shows up in Agent Runs with its trace.
Where a Stripe trigger fits
Pick a setup to see which event starts the agent, what it receives and where the result goes.
A declined payment starts the agent, which emails the customer a message that fits the decline reason.
{
"id": "evt_3Q8812",
"object": "event",
"type": "payment_intent.payment_failed",
"data": {
"object": {
"id": "pi_3Q8812",
"amount": 4900,
"currency": "eur",
"customer": "cus_R48812",
"last_payment_error": {
"code": "card_declined",
"decline_code": "insufficient_funds",
"message": "Your card has insufficient funds."
}
}
}
}{
"to": "jana@example.com",
"subject": "Your payment of 49.00 EUR didn't go through",
"body": "We'll retry in three days, or pay now with another card."
}A plan upgrade starts the agent, which gives your customer success team a heads-up in Slack.
{
"id": "evt_3Q9120",
"object": "event",
"type": "customer.subscription.updated",
"data": {
"object": {
"id": "sub_1Q4102",
"customer": "cus_R48812",
"status": "active",
"plan": { "id": "plan_pro", "amount": 4900, "interval": "month" }
},
"previous_attributes": {
"plan": { "id": "plan_starter" }
}
}
}{
"text": "Example GmbH moved from Starter to pro (49 EUR per month).",
"channel_id": "C01234567"
}A new dispute starts the agent, which collects the order and support history into a draft response for finance.
{
"id": "evt_3Q9455",
"object": "event",
"type": "charge.dispute.created",
"data": {
"object": {
"id": "dp_1Q9455",
"amount": 12900,
"currency": "eur",
"charge": "ch_3Q9455",
"reason": "product_not_received",
"status": "needs_response"
}
}
}{
"to": "finance@example.com",
"subject": "Draft response for dispute dp_1Q9455",
"body": "Order ord_8812 shipped Oct 2 and was signed for on Oct 4."
}A cancelled subscription starts the agent, which reads the stated reason and drafts a win-back offer in your CRM.
{
"id": "evt_3Q9871",
"object": "event",
"type": "customer.subscription.deleted",
"data": {
"object": {
"id": "sub_1Q4102",
"customer": "cus_R48812",
"status": "canceled",
"cancellation_details": {
"reason": "cancellation_requested",
"feedback": "too_expensive"
}
}
}
}{
"run_id": "550e8400-e29b-41d4-a716-446655440000",
"agent_name": "winback-agent",
"status": "completed",
"output": "Offer 20% off pro for three months. Reason given: price.",
"error": null,
"started_at": "2026-10-13T09:00:00Z",
"ended_at": "2026-10-13T09:00:04Z",
"token_usage": {
"input_tokens": 905,
"output_tokens": 41,
"thinking_tokens": 0,
"cached_input_tokens": 0,
"total_tokens": 946
}
}Stripe FAQ
More connectors
Email (SMTP/IMAP)
Read an inbox to trigger an agent. Reply with a drafted message over SMTP. Attachments included.
Inbound · Outbound
GitLab
Run an agent on issues, merge requests and comments in a GitLab project, on gitlab.com or your own instance. It replies with a comment.
Inbound · Outbound
HTTP Webhooks
Run an agent on any HTTP request with JSON, form data, or file uploads. No glue server is required.
Inbound · Outbound · Sync
Microsoft Teams
Let people chat with an agent in Microsoft Teams through your own Azure Bot. It answers in the chat or channel thread and posts results to channels.
Inbound · Outbound
SIP Voice
Answer and place calls with a voice agent on any phone system or provider that supports SIP. Transfer callers and queue them while the agent is busy.
Sync · Outbound
Twilio Messaging
Receive SMS, MMS, WhatsApp, and RCS messages with an agent. Send replies, media, and WhatsApp templates through your Twilio account.
Inbound · Outbound