Webhooks API

Update a webhook

Changed on

Updates the webhook. You may edit the name, url and the list of subscribed event types.

patch/v2/webhooks/{webhookId}

Request

  • Base URL
    https://api.mollie.com
  • URL
    https://api.mollie.com/v2/webhooks/{webhookId}
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://my.mollie.com/oauth2/authorize
      Token URL: https://api.mollie.com/oauth2/tokens scopes: webhooks.write

Headers

idempotency-keystring
Example:123e4567-e89b-12d3-a456-426

A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Request body

namestring

A name that identifies the webhook.

urlstring

The URL Mollie will send the events to. This URL must be publicly accessible.

testmodeboolean

Whether the entity was created in test mode or live mode. This field does not update the mode of the entity.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

Example request

{
  "name": "Webhook #1",
  "url": "https://mollie.com/",
  "eventTypes": [
    "payment-link.paid"
  ]
}

Response

The webhook object.

resourcestring required

Indicates the response contains a webhook subscription object. Will always contain the string webhook for this endpoint.

idstring required

The identifier uniquely referring to this subscription.

urlstring required

The subscription's events destination.

profileIdstring nullable required

The identifier uniquely referring to the profile that created the subscription.

createdAtstring required

The subscription's date time of creation.

namestring required

The subscription's name.

eventTypesWebhookEventTypesResponse[] required

The events types that are subscribed.

status'enabled' | 'blocked' | 'disabled' | 'deleted' required

The subscription's current status.

mode'live' | 'test' required

Whether this entity was created in live mode or in test mode.

Example response

{
  "resource": "webhook",
  "id": "hook_tNP6fpF9fLJpFWziRcgiH",
  "url": "https://example.com/webhook-endpoint",
  "profileId": "pfl_YyoaNFjtHc",
  "createdAt": "2023-03-15T10:00:00+00:00",
  "name": "Profile Updates Webhook",
  "eventTypes": [
    "profile.create",
    "profile.blocked"
  ],
  "status": "enabled",
  "mode": "live",
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Changes

    • warning

      added the new unmatched-credit-transfer.expired enum value to the / response property for the response status

    • warning

      added the new unmatched-credit-transfer.match.completed enum value to the / response property for the response status

    • warning

      added the new unmatched-credit-transfer.match.failed enum value to the / response property for the response status

    • warning

      added the new unmatched-credit-transfer.matched enum value to the / response property for the response status

    • warning

      added the new unmatched-credit-transfer.return.completed enum value to the / response property for the response status

    • warning

      added the new unmatched-credit-transfer.return.failed enum value to the / response property for the response status

    • warning

      added the new unmatched-credit-transfer.returned enum value to the / response property for the response status

    • info

      added the new unmatched-credit-transfer.expired enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.expired enum value to the request property //

    • info

      added the new unmatched-credit-transfer.match.completed enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.match.completed enum value to the request property //

    • info

      added the new unmatched-credit-transfer.match.failed enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.match.failed enum value to the request property //

    • info

      added the new unmatched-credit-transfer.matched enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.matched enum value to the request property //

    • info

      added the new unmatched-credit-transfer.return.completed enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.return.completed enum value to the request property //

    • info

      added the new unmatched-credit-transfer.return.failed enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.return.failed enum value to the request property //

    • info

      added the new unmatched-credit-transfer.returned enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.returned enum value to the request property //

    • warning

      added the new unmatched-credit-transfer.received enum value to the / response property for the response status

    • info

      added the new unmatched-credit-transfer.received enum value to the request property ////

    • info

      added the new unmatched-credit-transfer.received enum value to the request property //