post_webhook_test
const url = 'https://api.sulpayments.ch/v1/webhook/test';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sulpayments.ch/v1/webhook/test \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Outcome of one signed test delivery
object
Examplegenerated
{ "delivered": true, "duration_ms": 1, "error": "example", "status": 1}Invalid API key
The error envelope every 4xx/5xx response uses. The error.code is
machine-stable across locales; error.message is localized via the
request's Accept-Language (en by default). error.fields is present only
for per-field validation failures.
object
The body of an [ErrorEnvelope].
object
Machine-stable error code (stable across locales).
Per-field validation errors, present only for validation_failed.
One field-level validation failure inside [ApiError::fields].
object
The machine-stable reason code for this field.
The request field the error applies to (e.g. webhook_url).
Human-readable message, localized by Accept-Language.
Example
{ "error": { "code": "invalid_credentials", "fields": [ { "code": "invalid_credentials" } ], "message": "One or more fields are invalid." }}No webhook endpoint configured
The error envelope every 4xx/5xx response uses. The error.code is
machine-stable across locales; error.message is localized via the
request's Accept-Language (en by default). error.fields is present only
for per-field validation failures.
object
The body of an [ErrorEnvelope].
object
Machine-stable error code (stable across locales).
Per-field validation errors, present only for validation_failed.
One field-level validation failure inside [ApiError::fields].
object
The machine-stable reason code for this field.
The request field the error applies to (e.g. webhook_url).
Human-readable message, localized by Accept-Language.
Example
{ "error": { "code": "invalid_credentials", "fields": [ { "code": "invalid_credentials" } ], "message": "One or more fields are invalid." }}