Show a webhook
Returns the webhook with the given id.
AuthorizationbearerAuth
Authorization
bearerAuth API token as bearer token — you receive a test and a live token, there is no switch between them. See Setup → Authentication and Setup → Test mode.
In: header
Path Parameters
The ID of the resource.
Header Parameters
The API only responds with JSON — this header is mandatory on every request (see Setup → Headers).
"application/json"Value in
- "application/json"
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/webhooks/0" \ -H "Accept: application/json"{ "id": 1, "description": { "en": "This is webhook listens to the order completed event." }, "version": "2022-02-01", "state": "active", "url": "https://requestb.in/xjggz4xj", "events": [ { "id": 3, "name": "order.completed" } ], "created_at": "2022-02-01T00:00:00+00:00", "updated_at": "2022-02-01T00:00:00+00:00"}Create a webhook POST
Creates a webhook endpoint that listens to one or more of the [available events](/docs/checkout/2022-02-01/endpoints/webhooks/listWebhooks). > **Warning:** You can create up to 10 webhooks per event. ### Attributes | Field | Type | Description | Required | |-------------|--------|-----------------------------------------------------------------------------------------------|----------| | url | string | The URL to listen for incoming POST notification containing event information. | yes | | token | string | A token to secure your url. | | | version | string | The version in which the information should be transformed to. Default: `current api version` | | | description | json | A json object of localized description. | | | state | string | State of the endpoint (see below). Default: `inactive` | | | events | array | An array of Event Objects (see below). | yes | ### States | name | Default | |----------|---------| | inactive | yes | | active | | ### Event Object | Field | Type | Description | Required | |-------|--------|-------------------|----------| | name | string | The internal name | yes |
Delete a webhook DELETE
Deletes the webhook with the given `id`. A successful `DELETE` results in `HTTP 204` with an empty response body (see [Basic Usage → Response](/docs/checkout/2022-02-01/basic/response)).