import requests
url = "https://api.paywise.de/v2/webhooks/"
payload = { "url": "https://hooks.example.test/paywise" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://hooks.example.test/paywise'})
};
fetch('https://api.paywise.de/v2/webhooks/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.paywise.de/v2/webhooks/")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://hooks.example.test/paywise\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/v2/webhooks/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Idempotency-Key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"url\": \"https://hooks.example.test/paywise\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request POST \
--url https://api.paywise.de/v2/webhooks/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"url": "https://hooks.example.test/paywise"
}
'{
"auto_disabled": true,
"consecutive_failures": 123,
"contract_version": "v1",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_failure_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"description": "<string>",
"enabled": true,
"events": [
"*"
],
"max_consecutive_failures": 500,
"secret_key": "<string>"
}{
"code": "validation_error",
"detail": "The request contains invalid data.",
"errors": [
{
"code": "invalid",
"field": "claims[0].due_date",
"message": "Due date must not precede the document date."
}
]
}{
"code": "not_authenticated",
"detail": "Authentication credentials were not provided."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "conflict",
"detail": "The resource changed state and cannot accept this command."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Create webhook
Company-scoped webhook endpoint management.
import requests
url = "https://api.paywise.de/v2/webhooks/"
payload = { "url": "https://hooks.example.test/paywise" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://hooks.example.test/paywise'})
};
fetch('https://api.paywise.de/v2/webhooks/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.paywise.de/v2/webhooks/")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://hooks.example.test/paywise\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.paywise.de/v2/webhooks/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Idempotency-Key", "<idempotency-key>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"url\": \"https://hooks.example.test/paywise\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
curl --request POST \
--url https://api.paywise.de/v2/webhooks/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"url": "https://hooks.example.test/paywise"
}
'{
"auto_disabled": true,
"consecutive_failures": 123,
"contract_version": "v1",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_failure_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"description": "<string>",
"enabled": true,
"events": [
"*"
],
"max_consecutive_failures": 500,
"secret_key": "<string>"
}{
"code": "validation_error",
"detail": "The request contains invalid data.",
"errors": [
{
"code": "invalid",
"field": "claims[0].due_date",
"message": "Due date must not precede the document date."
}
]
}{
"code": "not_authenticated",
"detail": "Authentication credentials were not provided."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "conflict",
"detail": "The resource changed state and cannot accept this command."
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Headers
Required client-supplied command key scoped to the selected Case company or Partner owner, method, operation and path. An exact retry replays the original response while it is retained, including after credential rotation or replacement. Current permissions are required.
255Body
A webhook subscription. The signing secret is never included; it is returned exactly once on creation or rotation.
Publicly reachable HTTPS URL for webhook notifications. Must be unique among this company’s v2 endpoints; duplicate checks normalize the scheme, host, and default port. A company can register at most 20 webhook endpoints. Enabled and manually disabled endpoints count toward this limit; automatically disabled endpoints do not, and re-enabling one requires a free slot. Exceeding the limit returns 409 webhook_limit_reached; delete an unused endpoint to free capacity.
1 - 2048Public event types to subscribe to. Use ["*"] for all public events; the wildcard must be the only list entry. If omitted on creation, subscribes to the current public Case event catalogue.
*- *order.submitted- order.submittedorder.withdrawn- order.withdrawnorder.rejected- order.rejectedorder.accepted- order.acceptedorder.expired- order.expiredmandate.created- mandate.createdmandate.state.changed- mandate.state.changedmandate.status_update.published- mandate.status_update.publishedmandate.balance_updated- mandate.balance_updatedorder.message.created- order.message.createdmandate.message.created- mandate.message.createdrequest_to_client.created- request_to_client.createdrequest_to_client.answered- request_to_client.answeredpayment.reported- payment.reportedstatement.published- statement.publishedstatement.cancelled- statement.cancelledsingle_mandate_statement.published- single_mandate_statement.publishedsingle_mandate_statement.cancelled- single_mandate_statement.cancelledmandate.correspondence.published- mandate.correspondence.publishedinvoice.created- invoice.createdinvoice.paid- invoice.paidinvoice.cancelled- invoice.cancelledinvoice.written_off- invoice.written_offinvoice.reopened- invoice.reopeneddunning.level_advanced- dunning.level_advanceddunning.handed_to_collection- dunning.handed_to_collection
*, order.submitted, order.withdrawn, order.rejected, order.accepted, order.expired, mandate.created, mandate.state.changed, mandate.status_update.published, mandate.balance_updated, order.message.created, mandate.message.created, request_to_client.created, request_to_client.answered, payment.reported, statement.published, statement.cancelled, single_mandate_statement.published, single_mandate_statement.cancelled, mandate.correspondence.published, invoice.created, invoice.paid, invoice.cancelled, invoice.written_off, invoice.reopened, dunning.level_advanced, dunning.handed_to_collection Automatically disables the endpoint when this many consecutive deliveries reach terminal failure. Retry attempts within one delivery do not each count. Raising it above the failure count of an automatically disabled endpoint makes that endpoint count toward the endpoint limit again and requires a free slot.
1 <= x <= 1000Response
Create / rotate-secret response — surfaces secret_key exactly once.
Current public event subscriptions for this endpoint. ["*"] subscribes to all public events; otherwise the list contains the subscribed event types.
*- *order.submitted- order.submittedorder.withdrawn- order.withdrawnorder.rejected- order.rejectedorder.accepted- order.acceptedorder.expired- order.expiredmandate.created- mandate.createdmandate.state.changed- mandate.state.changedmandate.status_update.published- mandate.status_update.publishedmandate.balance_updated- mandate.balance_updatedorder.message.created- order.message.createdmandate.message.created- mandate.message.createdrequest_to_client.created- request_to_client.createdrequest_to_client.answered- request_to_client.answeredpayment.reported- payment.reportedstatement.published- statement.publishedstatement.cancelled- statement.cancelledsingle_mandate_statement.published- single_mandate_statement.publishedsingle_mandate_statement.cancelled- single_mandate_statement.cancelledmandate.correspondence.published- mandate.correspondence.publishedinvoice.created- invoice.createdinvoice.paid- invoice.paidinvoice.cancelled- invoice.cancelledinvoice.written_off- invoice.written_offinvoice.reopened- invoice.reopeneddunning.level_advanced- dunning.level_advanceddunning.handed_to_collection- dunning.handed_to_collection
*, order.submitted, order.withdrawn, order.rejected, order.accepted, order.expired, mandate.created, mandate.state.changed, mandate.status_update.published, mandate.balance_updated, order.message.created, mandate.message.created, request_to_client.created, request_to_client.answered, payment.reported, statement.published, statement.cancelled, single_mandate_statement.published, single_mandate_statement.cancelled, mandate.correspondence.published, invoice.created, invoice.paid, invoice.cancelled, invoice.written_off, invoice.reopened, dunning.level_advanced, dunning.handed_to_collection Automatically disables the endpoint when this many consecutive deliveries reach terminal failure. Retry attempts within one delivery do not each count. Raising it above the failure count of an automatically disabled endpoint makes that endpoint count toward the endpoint limit again and requires a free slot.
1 <= x <= 1000