Skip to main content
DELETE
/
webhooks
/
{webhook_id}
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

await client.webhooks.delete('whk_YdWqVEGKmSYKbsIyDxEab');
import os
from dodopayments import DodoPayments

client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
client.webhooks.delete(
"whk_YdWqVEGKmSYKbsIyDxEab",
)
package main

import (
"context"

"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)

func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
err := client.Webhooks.Delete(context.TODO(), "whk_YdWqVEGKmSYKbsIyDxEab")
if err != nil {
panic(err.Error())
}
}
package com.dodopayments.api.example;

import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.webhooks.WebhookDeleteParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

client.webhooks().delete("whk_YdWqVEGKmSYKbsIyDxEab");
}
}
package com.dodopayments.api.example

import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.webhooks.WebhookDeleteParams

fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

client.webhooks().delete("whk_YdWqVEGKmSYKbsIyDxEab")
}
require "dodopayments"

dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)

result = dodo_payments.webhooks.delete("whk_YdWqVEGKmSYKbsIyDxEab")

puts(result)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;

$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);

try {
$result = $client->webhooks->delete('whk_YdWqVEGKmSYKbsIyDxEab');

var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}
using DodoPayments.Client;
using DodoPayments.Client.Models.Webhooks;

DodoPaymentsClient client = new();

WebhookDeleteParams parameters = new()
{
WebhookID = "whk_YdWqVEGKmSYKbsIyDxEab"
};

await client.Webhooks.Delete(parameters);
use dodopayments::Client;

#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let webhook_id = "webhook_id";
let result = client
.webhooks()
.delete()
.webhook_id(webhook_id)
.await?;
println!("{result:?}");
Ok(())
}
curl --request DELETE \
--url https://test.dodopayments.com/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

webhook_id
string
required

Webhook ID

Response

Webhook has been deleted

Last modified on March 25, 2026