Delete Webhook

Delete a specific webhook.

Request

use dodopayments_rust::{to_pretty_json, DodoPaymentsClientBuilder};

#[tokio::main]

async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let api_key = std::env::var("DODO_API_KEY")?;

    let client = DodoPaymentsClientBuilder::new()
        .bearer_token(&api_key)
        .enviroment("test_mode")
        .build()?;

    let webhook_id = "wh_xxxxxxxxxx";

    let resp = client.webhooks().id(webhook_id).delete().send().await?;

    println!("Webhook deleted successfully");

    Ok(())
}

Path Parameters

ParameterTypeDescription
webhook_idstring``

Responses

200 Status

Webhook has been deleted

404 Status

Not Found

500 Status

Something went wrong.