Handle Stripe Webhooks in Rust Actix Web

Comanor allows actix-web developers to define webhook routes directly within their `Cargo.toml` file, specifying the exact HTTP method, path, and request body schema using a YAML-based configuration. Then, Comanor automatically generates the corresponding actix-web handler function and integrates it with Stripe's webhook verification logic, handling signature validation and event processing without manual code duplication.

Zero Boilerplate

Stop writing the same event handlers over and over. Comorando executes your logic automatically.

Smart Retries

Exponential backoff, dead-letter queues, and alert escalation — built in, no config needed.

AI Decisions

Gemma 4 evaluates every event and suggests the optimal action based on your business rules.

Code Example

// actix-web — stripe-webhooks handler with Comorando
use actix_web::{post, web, HttpRequest, HttpResponse};
use comorando::Client as Comorando;

#[post("/webhook")]
async fn webhook(req: HttpRequest, body: web::Bytes) -> HttpResponse {
    let sig = req.headers().get("stripe-signature").unwrap().to_str().unwrap();
    let event = stripe::Webhook::construct_event(&body, sig, &WEBHOOK_SECRET).unwrap();

    // Comorando evaluates rules and fires actions automatically
    let comorando = Comorando::new(&std::env::var("COMORANDO_API_KEY").unwrap());
    comorando.decisions().create(json!({
        "event":  event.event_type,
        "data":   event.data.object,
        "org_id": std::env::var("COMORANDO_ORG_ID").unwrap()
    })).await.unwrap();
    HttpResponse::Ok().json(serde_json::json!({"received": true}))
}

Automate your backend events today

Free tier includes 10,000 events/month. No credit card required.

Start Free See Pricing