Connic
Connectors

Stripe

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

Inbound Mode

Stripe events trigger agent runs asynchronously. Perfect for payment-driven AI workflows like intelligent dunning, personalized onboarding, and fraud detection.

How It Works

The Stripe connector receives webhook events from your Stripe account, verifies the signature to ensure authenticity, and triggers your linked AI agents with the full event payload. Best for intelligent 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 page.

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 ensures all webhooks are verified as coming from Stripe.

Event Payload

Your agent receives the full Stripe event object as input:

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

Subscription Event Example

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

yaml
# 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