curl -X DELETE https://api.swiftpay.cx/api/webhooks/wh_abc123 \
-H "Authorization: Bearer mp_live_your_api_key"
const endpointId = "wh_abc123";
const response = await fetch(
`https://api.swiftpay.cx/api/webhooks/${endpointId}`,
{
method: "DELETE",
headers: {
Authorization: "Bearer mp_live_your_api_key",
},
}
);
const result = await response.json();
if (result.success) {
console.log("Webhook endpoint deleted");
}
import requests
endpoint_id = 'wh_abc123'
response = requests.delete(
f'https://api.swiftpay.cx/api/webhooks/{endpoint_id}',
headers={'Authorization': 'Bearer mp_live_your_api_key'}
)
result = response.json()
if result['success']:
print('Webhook endpoint deleted')
{
"success": true,
"data": {
"id": "wh_abc123",
"deleted": true
}
}
{
"success": false,
"error": {
"type": "not_found",
"message": "Webhook endpoint not found",
"requestId": "req_abc123"
}
}
Webhooks
Delete Webhook Endpoint
Delete a webhook endpoint
DELETE
/
api
/
webhooks
/
:id
curl -X DELETE https://api.swiftpay.cx/api/webhooks/wh_abc123 \
-H "Authorization: Bearer mp_live_your_api_key"
const endpointId = "wh_abc123";
const response = await fetch(
`https://api.swiftpay.cx/api/webhooks/${endpointId}`,
{
method: "DELETE",
headers: {
Authorization: "Bearer mp_live_your_api_key",
},
}
);
const result = await response.json();
if (result.success) {
console.log("Webhook endpoint deleted");
}
import requests
endpoint_id = 'wh_abc123'
response = requests.delete(
f'https://api.swiftpay.cx/api/webhooks/{endpoint_id}',
headers={'Authorization': 'Bearer mp_live_your_api_key'}
)
result = response.json()
if result['success']:
print('Webhook endpoint deleted')
{
"success": true,
"data": {
"id": "wh_abc123",
"deleted": true
}
}
{
"success": false,
"error": {
"type": "not_found",
"message": "Webhook endpoint not found",
"requestId": "req_abc123"
}
}
Delete Webhook Endpoint
Permanently deletes a webhook endpoint. This action cannot be undone.After deletion, you will no longer receive events for this endpoint. Make
sure to update your application accordingly.
Request
Bearer token with your API key
The unique identifier of the webhook endpoint to delete
Response
Whether the deletion was successful
curl -X DELETE https://api.swiftpay.cx/api/webhooks/wh_abc123 \
-H "Authorization: Bearer mp_live_your_api_key"
const endpointId = "wh_abc123";
const response = await fetch(
`https://api.swiftpay.cx/api/webhooks/${endpointId}`,
{
method: "DELETE",
headers: {
Authorization: "Bearer mp_live_your_api_key",
},
}
);
const result = await response.json();
if (result.success) {
console.log("Webhook endpoint deleted");
}
import requests
endpoint_id = 'wh_abc123'
response = requests.delete(
f'https://api.swiftpay.cx/api/webhooks/{endpoint_id}',
headers={'Authorization': 'Bearer mp_live_your_api_key'}
)
result = response.json()
if result['success']:
print('Webhook endpoint deleted')
{
"success": true,
"data": {
"id": "wh_abc123",
"deleted": true
}
}
{
"success": false,
"error": {
"type": "not_found",
"message": "Webhook endpoint not found",
"requestId": "req_abc123"
}
}
Instead of deleting, consider disabling the endpoint with Update
Webhook if you might need it again.
⌘I