Stripe
Receive Stripe webhook events to trigger agents for dunning, onboarding, fraud detection, and more.
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
Create Connector in Connic
Create a new Stripe connector in your project. Just give it a name.
Copy the Webhook URL
After creating the connector, copy the webhook URL from the connector details drawer.
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.
Paste the Signing Secret
Copy the signing secret from Stripe (starts with whsec_) and paste it in your connector settings, then click Save.
Event Payload
Your agent receives the full Stripe event object as input:
{
"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
{
"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
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"]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