Delete webhook subscription
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}"
req, _ := http.NewRequest("DELETE", url, nil)
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://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id} \
--header 'Authorization: Bearer <token>'{
"type": "error",
"code": "bad_request",
"status": 400,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}{
"type": "error",
"code": "forbidden",
"status": 403,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}{
"type": "error",
"code": "method_not_allowed",
"status": 405,
"message": "Method Not Allowed",
"details": []
}{
"type": "error",
"code": "duplicate_record",
"status": 409,
"message": "Generic error",
"details": [],
"resource_id": "cdc70639-cb9c-4222-a73f-b8ce39f7821b"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "error",
"code": "too_early",
"status": 425,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "too_many_requests",
"status": 429,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "server_error",
"status": 500,
"message": "Request could not be processed",
"details": []
}{
"type": "error",
"code": "bad_gateway",
"status": 502,
"message": "Request could not be processed",
"details": []
}{
"type": "error",
"code": "gateway_timeout",
"status": 504,
"message": "Request could not be processed",
"details": []
}Delete webhook subscription
Permanently removes a webhook subscription from your account. Once deleted, you will no longer receive event notifications at the subscription’s URL. This action cannot be undone, and you’ll need to create a new subscription if you want to receive webhooks at this endpoint again in the future.
DELETE
/
webhook-subscriptions
/
{subscription_id}
Delete webhook subscription
using RestSharp;
var options = new RestClientOptions("https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}"
req, _ := http.NewRequest("DELETE", url, nil)
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://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.sandbox.{id}.gr4vy.app/webhook-subscriptions/{subscription_id} \
--header 'Authorization: Bearer <token>'{
"type": "error",
"code": "bad_request",
"status": 400,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "unauthorized",
"status": 401,
"message": "No valid API authentication found",
"details": []
}{
"type": "error",
"code": "forbidden",
"status": 403,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "not_found",
"status": 404,
"message": "The resource could not be found",
"details": []
}{
"type": "error",
"code": "method_not_allowed",
"status": 405,
"message": "Method Not Allowed",
"details": []
}{
"type": "error",
"code": "duplicate_record",
"status": 409,
"message": "Generic error",
"details": [],
"resource_id": "cdc70639-cb9c-4222-a73f-b8ce39f7821b"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "error",
"code": "too_early",
"status": 425,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "too_many_requests",
"status": 429,
"message": "Generic error",
"details": []
}{
"type": "error",
"code": "server_error",
"status": 500,
"message": "Request could not be processed",
"details": []
}{
"type": "error",
"code": "bad_gateway",
"status": 502,
"message": "Request could not be processed",
"details": []
}{
"type": "error",
"code": "gateway_timeout",
"status": 504,
"message": "Request could not be processed",
"details": []
}This endpoint requires the
webhook-subscriptions.write scope.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The ID of the merchant account to use for this request.
Example:
"default"
Path Parameters
The ID of the webhook subscription
Example:
"ef9496d8-53a5-4aad-8ca2-00eb68334389"
Response
Successful Response
⌘I