Handle Trial Expiry in Rust Actix Web

Comanor allows actix-web developers to define event handlers within their `main.rs` file that trigger specific actions, such as expiring trial accounts, and then automatically generates a deployment-ready binary with all necessary dependencies and configurations. By leveraging Comanor's declarative syntax, developers simply specify the desired event logic and its associated dependencies, and Comanor handles the complex process of building, packaging, and deploying the application, ensuring consistent trial expiry behavior across different environments.

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 — trial-expiry 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