Delete Webhook
curl --request DELETE \
--url https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-partner-id: <x-partner-id>'import requests
url = "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}"
headers = {
"x-partner-id": "<x-partner-id>",
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-partner-id': '<x-partner-id>',
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_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://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_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 => [
"Authorization: Bearer <token>",
"idempotency-key: <idempotency-key>",
"x-partner-id: <x-partner-id>"
],
]);
$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://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-partner-id", "<x-partner-id>")
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}")
.header("x-partner-id", "<x-partner-id>")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-partner-id"] = '<x-partner-id>'
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {}
}{
"code": "error.bad_request",
"message": "Invalid request parameters"
}{
"code": "error.unauthorized",
"message": "Authentication required"
}{
"code": "error.not_found",
"message": "Requested resource not found"
}Webhooks
Delete Webhook
Deletes a webhooks associated with a namespace.
DELETE
/
api
/
v1
/
csp
/
webhook
/
{webhook_id}
Delete Webhook
curl --request DELETE \
--url https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'idempotency-key: <idempotency-key>' \
--header 'x-partner-id: <x-partner-id>'import requests
url = "https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}"
headers = {
"x-partner-id": "<x-partner-id>",
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'x-partner-id': '<x-partner-id>',
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>'
}
};
fetch('https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_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://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_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 => [
"Authorization: Bearer <token>",
"idempotency-key: <idempotency-key>",
"x-partner-id: <x-partner-id>"
],
]);
$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://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-partner-id", "<x-partner-id>")
req.Header.Add("idempotency-key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}")
.header("x-partner-id", "<x-partner-id>")
.header("idempotency-key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.paylias.xyz/gateway/api/v1/csp/webhook/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-partner-id"] = '<x-partner-id>'
request["idempotency-key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {}
}{
"code": "error.bad_request",
"message": "Invalid request parameters"
}{
"code": "error.unauthorized",
"message": "Authentication required"
}{
"code": "error.not_found",
"message": "Requested resource not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The Partner ID header used for authorization
The Idempotency Key - usually a UUID
Path Parameters
The unique identifier for the webhook
Example:
"whk_cjf0qivsemvkg2on8f9g"
Was this page helpful?
⌘I