Connic
Connectors

Stripe

Receive Stripe webhook events to trigger agents for dunning, onboarding, fraud detection, and more.

Last updated
Inbound Mode
Stripe events trigger agent runs asynchronously. Useful for payment-driven workflows like dunning, onboarding, and fraud detection.

How It Works

The Stripe connector receives webhook events from your Stripe account, verifies the signature, and triggers your linked agents with the full event payload. Best for dunning, upgrade onboarding, fraud detection, and churn prevention.

Setup Instructions

1

Create Connector in Connic

Create a new Stripe connector in your project. Just give it a name.

2

Copy the Webhook URL

After creating the connector, copy the webhook URL from the connector details drawer.

3

Add Webhook in Stripe Dashboard

Go to Stripe Dashboard > Developers > Webhooks > Add endpoint. Paste the webhook URL and select the events you want to receive.

4

Paste the Signing Secret

Copy the signing secret from Stripe (starts with whsec_) and paste it in your connector settings, then click Save.

Important: The connector won't process events until you add the signing secret. This verifies all webhooks come from Stripe.

Event Payload

Your agent receives the full Stripe event object as input:

event-payload.json
{
  "id": "evt_1234567890",
  "object": "event",
  "type": "payment_intent.payment_failed",
  "data": {
    "object": {
      "id": "pi_1234567890",
      "amount": 2000,
      "currency": "eur",
      "customer": "cus_1234567890",
      "last_payment_error": {
        "code": "card_declined",
        "message": "Your card was declined."
      }
    }
  }
}

Subscription Event Example

subscription-event.json
{
  "id": "evt_1234567890",
  "object": "event",
  "type": "customer.subscription.updated",
  "data": {
    "object": {
      "id": "sub_1234567890",
      "customer": "cus_1234567890",
      "status": "active",
      "plan": {
        "id": "plan_pro",
        "amount": 4900,
        "interval": "month"
      }
    }
  }
}

Example Agent

agents/dunning-agent.yaml
name: dunning-agent
model: gemini-2.5-flash
system: |
  You are a dunning specialist AI. When a payment fails, 
  analyze the customer's history and generate a personalized 
  recovery message.

# The Stripe event is passed as input
# Access in middleware: input["data"]["object"]["last_payment_error"]
Signature Verification

Connic verifies the Stripe-Signature header using your signing secret. Invalid signatures are rejected.

  • HMAC-SHA256 verification
  • Timestamp validation to prevent replay attacks
  • Rate limiting