curl -X POST https://api.settlx.io/api/v1/webhooks/test \
-H "Authorization: Bearer pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://yoursite.com/webhooks/settlx",
"eventType": "invoice.settled"
}'
const response = await fetch('https://api.settlx.io/api/v1/webhooks/test', {
method: 'POST',
headers: {
'Authorization': 'Bearer pk_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
webhookUrl: 'https://yoursite.com/webhooks/settlx',
eventType: 'invoice.confirmed'
})
});
const { data } = await response.json();
if (data.success) {
console.log('Webhook endpoint is working correctly!');
} else {
console.error(`Test failed: ${data.message}`);
}
{
"data": {
"success": true,
"statusCode": 200,
"eventId": "evt_test_1776195221216",
"message": "Test webhook delivered successfully"
}
}
{
"data": {
"success": false,
"statusCode": 500,
"eventId": "evt_test_1776195221217",
"message": "Failed to deliver test webhook: endpoint returned 500"
}
}
{
"error": "Bad Request",
"message": "webhookUrl is required"
}
Webhooks
Test Webhook
Send a test webhook to verify your endpoint is working
POST
/
api
/
v1
/
webhooks
/
test
curl -X POST https://api.settlx.io/api/v1/webhooks/test \
-H "Authorization: Bearer pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://yoursite.com/webhooks/settlx",
"eventType": "invoice.settled"
}'
const response = await fetch('https://api.settlx.io/api/v1/webhooks/test', {
method: 'POST',
headers: {
'Authorization': 'Bearer pk_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
webhookUrl: 'https://yoursite.com/webhooks/settlx',
eventType: 'invoice.confirmed'
})
});
const { data } = await response.json();
if (data.success) {
console.log('Webhook endpoint is working correctly!');
} else {
console.error(`Test failed: ${data.message}`);
}
{
"data": {
"success": true,
"statusCode": 200,
"eventId": "evt_test_1776195221216",
"message": "Test webhook delivered successfully"
}
}
{
"data": {
"success": false,
"statusCode": 500,
"eventId": "evt_test_1776195221217",
"message": "Failed to deliver test webhook: endpoint returned 500"
}
}
{
"error": "Bad Request",
"message": "webhookUrl is required"
}
Test Webhook
Sends a test webhook to a specified URL. Use this to verify your webhook endpoint is reachable, correctly processes the payload, and returns a2xx HTTP status.
Test webhooks are sent ad-hoc and do not appear in the dashboard’s “Webhook Logs” view. They also use a placeholder payload with mock invoice/payment/settlement data — the values are not real. Use this endpoint to validate your signature verification and routing logic, then test the real payload shapes by paying a small invoice on a low-fee chain.
Request Body
string
required
The URL to send the test webhook to. Must be a valid HTTPS URI.
string
default:"invoice.settled"
The event type to simulate. If omitted, an
invoice.settled test event is sent.Available options: invoice.confirmed, invoice.settled, invoice.expired, invoice.overpaid, invoice.underpaidResponse
object
curl -X POST https://api.settlx.io/api/v1/webhooks/test \
-H "Authorization: Bearer pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://yoursite.com/webhooks/settlx",
"eventType": "invoice.settled"
}'
const response = await fetch('https://api.settlx.io/api/v1/webhooks/test', {
method: 'POST',
headers: {
'Authorization': 'Bearer pk_live_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
webhookUrl: 'https://yoursite.com/webhooks/settlx',
eventType: 'invoice.confirmed'
})
});
const { data } = await response.json();
if (data.success) {
console.log('Webhook endpoint is working correctly!');
} else {
console.error(`Test failed: ${data.message}`);
}
{
"data": {
"success": true,
"statusCode": 200,
"eventId": "evt_test_1776195221216",
"message": "Test webhook delivered successfully"
}
}
{
"data": {
"success": false,
"statusCode": 500,
"eventId": "evt_test_1776195221217",
"message": "Failed to deliver test webhook: endpoint returned 500"
}
}
{
"error": "Bad Request",
"message": "webhookUrl is required"
}