- POST [/instances/$INSTANCE]/private/webhooks#
This is used to create a webhook.
Required permission:
webhooks-writeRequest:
The request must be a WebhookAddDetails.
Response:
- 204 No content:
The creation of the webhook is successsful.
- 400 Bad Request:
The request body is malformed.
- 404 Not found:
The merchant instance is unknown or it not in our data.
- 409 Conflict:
A webhook with this ID already exists. Returned with
TALER_EC_MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS.- 413 Request entity too large:
The uploaded body is to long, it exceeds the size limit. Returned with an error code of
TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT.- 500 Internal Server Error:
The server experienced an internal failure. Returned with
TALER_EC_GENERIC_DB_START_FAILED,TALER_EC_GENERIC_DB_FETCH_FAILED,TALER_EC_GENERIC_DB_SOFT_FAILUREorTALER_EC_GENERIC_DB_COMMIT_FAILED.
Details:
interface WebhookAddDetails { // Webhook ID to use. webhook_id: string; // The event of the webhook: why the webhook is used. event_type: WebhookEventType; // URL of the webhook where the customer will be redirected. url: string; // Method used by the webhook http_method: string; // Header template of the webhook header_template?: string; // Body template by the webhook body_template?: string; }