Handle Invoice Paid in Rust Actix Web

Actix-web developers utilizing Comodoro configure their application to listen for `InvoicePaid` events via a webhook endpoint, triggering a Comodoro-managed workflow. Comodoro then automatically processes these events, updating relevant systems like accounting software and generating corresponding records based on predefined rules and data transformations, all without manual intervention.

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 — invoice-paid 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