Stripe
Stripe webhook events trigger agents for dunning, onboarding, fraud detection, and other tasks.
On this page
How It Works
The Stripe connector receives webhook events from the Stripe account, verifies the signature, and triggers 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 the project and 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 to receive.
Paste the Signing Secret
Copy the signing secret from Stripe (starts with
whsec_) and paste it in the connector settings, then click Save.
Event Payload
The 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: connic/gpt-5.6-terra
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 the signing secret. Invalid signatures are rejected.
- HMAC-SHA256 verification
- Timestamp validation to prevent replay attacks
- Rate limiting