---
updatedAt: 2026-04-21T08:31:19.000Z
agentTools:
  projectIndex: https://docs.mollie.com/llms.txt
---

# Test a webhook

Sends a test event to the webhook to verify the endpoint is working as expected.

> 🔑 Access with
>
> [Advanced access token with **webhooks.write**](/reference/authentication)
>
> [OAuth access with **webhooks.write**](/reference/authentication)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Mollie Connect",
    "version": "1.0.0",
    "license": {
      "name": "Attribution-NonCommercial-ShareAlike 4.0 International",
      "identifier": "CC-BY-NC-SA-4.0"
    }
  },
  "servers": [
    {
      "url": "https://api.mollie.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "advancedAccessToken": []
    },
    {
      "oAuth": []
    }
  ],
  "paths": {
    "/v2/webhooks/{webhookId}/ping": {
      "parameters": [
        {
          "name": "webhookId",
          "description": "Provide the ID of the related webhook.",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^hook_.+$",
            "example": "hook_1234567890"
          }
        }
      ],
      "post": {
        "summary": "Test a webhook",
        "x-speakeasy-name-override": "test",
        "tags": [
          "Webhooks API"
        ],
        "operationId": "test-webhook",
        "security": [
          {
            "advancedAccessToken": [
              "webhooks.write"
            ]
          },
          {
            "oAuth": [
              "webhooks.write"
            ]
          }
        ],
        "description": "Sends a test event to the webhook to verify the endpoint is working as expected.\n\n> 🔑 Access with\n>\n> [Advanced access token with **webhooks.write**](/reference/authentication)\n>\n> [OAuth access with **webhooks.write**](/reference/authentication)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "testmode": {
                    "type": "boolean",
                    "description": "You can enable test mode by setting `testmode` to `true`.\n\nTest entities cannot be retrieved when the endpoint is set to live mode, and vice versa.",
                    "writeOnly": true,
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted.",
            "content": {
              "application/hal+json": {
                "schema": {},
                "example": {}
              }
            }
          },
          "404": {
            "description": "No entity with this ID exists.",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "object",
                  "description": "An error response object.",
                  "required": [
                    "status",
                    "title",
                    "detail",
                    "_links"
                  ],
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.",
                      "minimum": 400,
                      "maximum": 599,
                      "example": 404
                    },
                    "title": {
                      "type": "string",
                      "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.",
                      "example": "Not Found"
                    },
                    "detail": {
                      "type": "string",
                      "description": "A detailed human-readable description of the error that occurred.",
                      "example": "The resource does not exist"
                    },
                    "field": {
                      "type": "string",
                      "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.",
                      "example": "description"
                    },
                    "_links": {
                      "type": "object",
                      "required": [
                        "documentation"
                      ],
                      "properties": {
                        "documentation": {
                          "type": "object",
                          "description": "The URL to the generic Mollie API error handling guide.",
                          "required": [
                            "href",
                            "type"
                          ],
                          "properties": {
                            "href": {
                              "type": "string",
                              "example": "https://docs.mollie.com/errors"
                            },
                            "type": {
                              "type": "string",
                              "example": "text/html"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": 404,
                  "title": "Not Found",
                  "detail": "No entity exists with token 'uct_abcDEFghij123456789'",
                  "_links": {
                    "documentation": {
                      "href": "...",
                      "type": "text/html"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The request contains issues. For example, if the webhook has already been deleted.",
            "content": {
              "application/hal+json": {
                "schema": {
                  "type": "object",
                  "description": "An error response object.",
                  "required": [
                    "status",
                    "title",
                    "detail",
                    "_links"
                  ],
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.",
                      "minimum": 400,
                      "maximum": 599,
                      "example": 404
                    },
                    "title": {
                      "type": "string",
                      "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.",
                      "example": "Not Found"
                    },
                    "detail": {
                      "type": "string",
                      "description": "A detailed human-readable description of the error that occurred.",
                      "example": "The resource does not exist"
                    },
                    "field": {
                      "type": "string",
                      "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.",
                      "example": "description"
                    },
                    "_links": {
                      "type": "object",
                      "required": [
                        "documentation"
                      ],
                      "properties": {
                        "documentation": {
                          "type": "object",
                          "description": "The URL to the generic Mollie API error handling guide.",
                          "required": [
                            "href",
                            "type"
                          ],
                          "properties": {
                            "href": {
                              "type": "string",
                              "example": "https://docs.mollie.com/errors"
                            },
                            "type": {
                              "type": "string",
                              "example": "text/html"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "status": 422,
                  "title": "Unprocessable entity",
                  "detail": "This subscription was already deleted.",
                  "_links": {
                    "documentation": {
                      "href": "...",
                      "type": "text/html"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/429-rate-limit"
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "shell",
              "code": "curl -X POST https://api.mollie.com/v2/webhooks/hook_B2EyhTH5N4KWUnoYPcgiH/ping \\\n    -H \"Authorization: Bearer access_UsJwq8nzcHbSrDuh82pyjjEaTbd5SAPtVebEJ5BH\""
            },
            {
              "language": "php",
              "code": "<?php\nuse Mollie\\Api\\Http\\Requests\\TestWebhookRequest;\n\n$mollie->setAccessToken('access_UsJwq8nzcHbSrDuh82pyjjEaTbd5SAPtVebEJ5BH');\n\n$result = $mollie->send(\n    new TestWebhookRequest(id: 'hook_B2EyhTH5N4KWUnoYPcgiH')\n);",
              "install": "composer require mollie/mollie-api-php"
            },
            {
              "language": "node",
              "code": "/*\nWe don't have a Node.js code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n*/",
              "install": "npm install mollie-api-typescript"
            },
            {
              "language": "python",
              "code": "'''\nWe don't have a Python code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n'''",
              "install": "pip install mollie-api-py"
            },
            {
              "language": "ruby",
              "code": "# We don't have a Ruby code example for this\n# API call yet.\n#\n# If you have some time to spare, feel free to\n# share suggestions on our Discord:\n# https://discord.gg/VaTVkXB4aQ",
              "install": "gem install mollie-api-ruby"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authenticates API requests for a single website profile. Each key targets\neither live mode (`live_...`) or test mode (`test_...`).\n\nKeys are shown only once, at creation. Store the key securely — it cannot\nbe retrieved afterwards. If lost, create a new key under Developers → API\naccess tokens in the Dashboard and revoke the old one.",
        "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
      },
      "advancedAccessToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authenticates API requests with configurable permissions. Can access\norganization-level resources and optionally scope to a specific payment\nprofile (`access_...`). Use for advanced integrations — such as bookkeeping\nor reporting tools — that need fine-grained control over API access.\n\nTokens are shown only once, at creation. Store it securely — it cannot be\nretrieved afterwards. If lost, create a new token under Developers → API\naccess tokens in the Dashboard and revoke the old one.",
        "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
      },
      "oAuth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://my.mollie.com/oauth2/authorize",
            "tokenUrl": "https://api.mollie.com/oauth2/tokens",
            "scopes": {}
          }
        }
      }
    },
    "responses": {
      "429-rate-limit": {
        "description": "Rate Limit has been reached.",
        "content": {
          "application/hal+json": {
            "schema": {
              "type": "object",
              "description": "An error response object.",
              "required": [
                "status",
                "title",
                "detail",
                "_links"
              ],
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.",
                  "minimum": 400,
                  "maximum": 599,
                  "example": 404
                },
                "title": {
                  "type": "string",
                  "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.",
                  "example": "Not Found"
                },
                "detail": {
                  "type": "string",
                  "description": "A detailed human-readable description of the error that occurred.",
                  "example": "The resource does not exist"
                },
                "field": {
                  "type": "string",
                  "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.",
                  "example": "description"
                },
                "_links": {
                  "type": "object",
                  "required": [
                    "documentation"
                  ],
                  "properties": {
                    "documentation": {
                      "type": "object",
                      "description": "The URL to the generic Mollie API error handling guide.",
                      "required": [
                        "href",
                        "type"
                      ],
                      "properties": {
                        "href": {
                          "type": "string",
                          "example": "https://docs.mollie.com/errors"
                        },
                        "type": {
                          "type": "string",
                          "example": "text/html"
                        }
                      }
                    }
                  }
                }
              }
            },
            "example": {
              "status": 429,
              "title": "Too Many Requests",
              "detail": "You have exceeded the rate limit. Please slow down your requests.",
              "_links": {
                "documentation": {
                  "href": "https://docs.mollie.com/overview/handling-errors",
                  "type": "text/html"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "shell",
      "php",
      "node",
      "python",
      "ruby"
    ]
  }
}
```