curl --request DELETE \
--url https://api.creem.io/v1/webhooks/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/webhooks/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.creem.io/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.creem.io/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.creem.io/v1/webhooks/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"mode": "test",
"object": "webhook",
"store_id": "sto_1234567890",
"name": "Production billing events",
"url": "https://example.com/webhooks/creem",
"status": "enabled",
"events": [
"checkout.completed",
"subscription.paid"
],
"secret": "whsec_xxxxxxxxxxxxxxxxxxxx"
}Delete a webhook endpoint
Permanently delete a webhook endpoint and its delivery history. To pause deliveries without losing the configuration, update the status to disabled instead.
curl --request DELETE \
--url https://api.creem.io/v1/webhooks/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.creem.io/v1/webhooks/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.creem.io/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.creem.io/v1/webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.creem.io/v1/webhooks/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.creem.io/v1/webhooks/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creem.io/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"mode": "test",
"object": "webhook",
"store_id": "sto_1234567890",
"name": "Production billing events",
"url": "https://example.com/webhooks/creem",
"status": "enabled",
"events": [
"checkout.completed",
"subscription.paid"
],
"secret": "whsec_xxxxxxxxxxxxxxxxxxxx"
}Authorizations
API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.
Path Parameters
The webhook ID
Response
Successfully deleted the webhook endpoint
Unique identifier for the object.
String representing the environment.
test, prod, sandbox A string representing the object’s type. Objects of the same type share the same value.
"webhook"
The store this webhook endpoint belongs to.
"sto_1234567890"
A human-readable label for the endpoint.
"Production billing events"
The HTTPS URL Creem delivers events to.
"https://example.com/webhooks/creem"
Whether the endpoint receives deliveries. Disabled endpoints keep their configuration but receive nothing.
enabled, disabled "enabled"
Event types delivered to this endpoint. An empty list means every event type.
checkout.completed, refund.created, dispute.created, subscription.active, subscription.trialing, subscription.canceled, subscription.scheduled_cancel, subscription.paid, subscription.expired, subscription.unpaid, subscription.update, subscription.past_due, subscription.paused, customer_credits.exhausted, credits.granted, credits.consumed, credits.auto_recharged ["checkout.completed", "subscription.paid"]
The signing secret used to verify delivery signatures. Only returned when the endpoint is created; retrieve it later via the secret endpoint.
"whsec_xxxxxxxxxxxxxxxxxxxx"