Stripe
Start agents from Stripe webhook events, such as failed payments, subscription changes, and disputes.
On this page
| Modes | Inbound |
| YAML type | stripe |
| Credentials | The webhook signing secret from Stripe, in config.webhook_secret |
| Bridge | Not supported |
| Custom domain | Supported |
| Linked agents | One or more. An event starts every linked agent. |
| While paused | Events get 200 with {"status": "ignored"} and start no runs. connic doesn't store or replay them. |
Set up
Open the agent. In Connector Flow, click Add inbound connector, then Create New Connector, and select Stripe. Leave Webhook Signing Secret empty for now and click Create.
Copy the Webhook URL from the details drawer. To reopen it, hover over the connector in the flow and click the eye icon.
In the Stripe Dashboard, open Developers > Webhooks and add an endpoint with the webhook URL. Select the events the agents should receive: connic starts runs for every event Stripe sends.
Copy the endpoint's signing secret, which starts with
whsec_. In the details drawer, click Edit, paste it into Webhook Signing Secret, and click Save Changes. Until then, connic rejects every event with400. A connector defined in code can't be edited in the dashboard; setwebhook_secretin its file and redeploy, as described under In code.
In code
Declare the connector in connectors/*.yaml. The webhook URL exists only after the first deploy, so deploy once without webhook_secret and add the URL from the details drawer in Stripe. Then store the signing secret in an environment variable, reference it as webhook_secret, and deploy again. The dashboard's Edit is disabled for connectors in code, so the file is the only place to set the secret. A literal secret in the file fails the deploy.
type: stripe
domain: hooks.example.com # optional custom domain
config:
webhook_secret: ${STRIPE_WEBHOOK_SECRET}
agents:
- dunning-agentConfiguration
The fields of a Stripe connector, the same in connectors/*.yaml, the REST API, and connic MCP. The descriptions name the matching setting in the dashboard. Connectors in code describes the fields every connector shares, such as agents and environments.
| Field | Type | Status | Description |
|---|---|---|---|
| type | string | Required | stripe. |
| domain | string | Optional | Hostname or ID of an active custom domain for the webhook URL. Dashboard: Domain. |
| config | object | Optional | Stripe settings. |
| webhook_secret | string | Optional | Signing secret of the Stripe endpoint, starting with whsec_. Without it, connic rejects every event. Secret. In YAML, use a ${NAME} reference. Dashboard: Webhook Signing Secret. |
Generated values
connic creates the Webhook URL when the connector is created and keeps it across updates and deploys. It uses the connector's custom domain when one is set. Copy it from the details drawer.
Agent input
Every event starts a run for each linked agent. The input is the Stripe event object as Stripe sent it:
{
"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."
}
}
}
}The model receives the event as JSON text. Middleware reads it as context["payload"], for example context["payload"]["data"]["object"]["last_payment_error"].
Stripe can deliver an event more than once. A repeated delivery has the same event id, so each agent reuses the run the event already started and no duplicate runs start.
Signature verification
connic checks the Stripe-Signature header of every request before it starts runs. The signature is an HMAC-SHA256 of the timestamp and the raw body, keyed with the signing secret. A request passes when one of its v1 signatures matches and its timestamp is at most 5 minutes from connic's current time, which blocks replays. Other requests get 401 and start no runs.
A connector holds one signing secret, and every Stripe endpoint has its own. Use one connector per endpoint, for example one for test mode and one for live mode.
Limits and errors
| Limit | Value |
|---|---|
| Request body | 10 MiB |
| Age of the signature timestamp | 5 minutes |
| Status | Meaning |
|---|---|
| 200 | Accepted. The body lists the run_ids the event started. Paused connectors answer {"status": "ignored", "reason": "disabled"}, and a connector without linked agents answers No agents linked; neither starts a run. |
| 400 | The connector is active but has no signing secret yet, or the body isn't a JSON object. |
| 401 | The Stripe-Signature header is missing, or the signature or its timestamp doesn't pass the check. |
| 404 | No Stripe connector exists at this URL. |
| 413 | The body is larger than 10 MiB. |
| 429 | A platform limit is reached. Retry after the seconds in Retry-After. |