tutorials / first-webhook
Your First Webhook
5 minCreate a Stripe source, stream events to your terminal, and inspect a full CloudEvent payload — no local server, no tunnels.
Prerequisites
- • Kite CLI installed (Installation guide)
- • A Stripe account (free, no card needed for test mode)
Install & log in
If you haven't installed Kite yet, run:
$ curl -fsSL https://getkite.sh/install | sh$ kite login
kite login opens a browser tab for device auth. Agents can skip this — see the x402 bootstrap guide.
Create a Stripe endpoint
Register a Stripe source. Kite prints a webhook URL you'll paste into Stripe.
$ kite endpoints create --source stripe
Output includes a webhook_url like https://hooks.getkite.sh/e/<id>. Copy it.
Point Stripe at Kite
- a.Open the Stripe Dashboard → Developers → Webhooks → Add endpoint.
- b.Paste your Kite webhook URL and select events to listen for (e.g.
payment_intent.succeeded). - c.Save the endpoint.
Already have events? Any HTTPS sender works — just replace the Stripe URL with your Kite endpoint.
Stream events to your terminal
Start streaming. Filter to Stripe so you only see relevant events:
$ kite stream --source stripe
Add --json for full CloudEvent payloads. Add --compact for one-liners.
Trigger a test event
In the Stripe Dashboard, click Send test webhook on your endpoint. Or send one directly with curl:
$ curl -X POST https://hooks.getkite.sh/e/<your-endpoint-id> \-H "content-type: application/json" \-d '{"type":"payment_intent.succeeded","data":{"amount":4200}}'
Replace <your-endpoint-id> with the ID from step 02.
Inspect the CloudEvent payload
Re-run with --json to see the full payload:
$ kite stream --source stripe --json
Each event arrives as a CloudEvent v1.0 envelope:
{
"specversion": "1.0",
"id": "evt_3OxABC...",
"source": "stripe",
"type": "com.stripe.payment_intent.succeeded",
"time": "2026-04-08T10:00:00Z",
"datacontenttype": "application/json",
"data": {
"type": "payment_intent.succeeded",
"data": { "amount": 4200, "currency": "usd" },
"livemode": false
}
}You're live
Stripe events are now streaming to your terminal as CloudEvents. No server, no ngrok, no polling.
For AI Agents
Agents can receive webhooks without a browser login. Use the listen command with a Unix socket, or bootstrap credentials via x402.
Unix socket (MCP / local agent)
$ kite listen --socket /tmp/kite-stripe.sock --source stripe
Your agent reads structured events from the socket. Works with any MCP or OpenClaw agent that supports Unix socket I/O.
x402 bootstrap (headless auth)
curl -X POST https://api.getkite.sh/api/v1/bootstrap/x402 \
-H 'content-type: application/json' \
-d '{"source":"stripe","deposit_atomic":1000000,"plan":"starter"}'Returns credentials your agent can use to call kite stream immediately. See the x402 bootstrap guide.