---
title: Handle ConnexPay webhook events
slug: reference/handle-connexpay-webhook-events
docTags: 
createdAt: 2026-09-28T07:46:00.827Z
---

{
  "id": "6XgUNIvGMNdpY_zMvOtWK",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/webhooks/connexpay/{siteId}/{accountId}",
    "servers": [],
    "name": "Handle ConnexPay webhook events",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "siteId",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "accountId",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "kind": "required",
          "name": "authorization",
          "type": "string",
          "description": ""
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "b-b9hdAscRkja5744rkwP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /webhooks/connexpay/{siteId}/{accountId} \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "9lUFJjX7N7d0euZN1O0lm",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/webhooks/connexpay/{siteId}/{accountId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "zV5VQ2op7X97h9hXgLU5A",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/webhooks/connexpay/{siteId}/{accountId}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"authorization\"] = \"string\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "d0H0D9_m571-huElFmHZO",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/webhooks/connexpay/{siteId}/{accountId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "b-b9hdAscRkja5744rkwP"
    },
    "results": {
      "languages": [
        {
          "id": "I773QaJ6J4PVl0-k8FZHD",
          "language": "200",
          "code": ""
        },
        {
          "id": "PJJVtDcZBz1L8sdqcOjg_",
          "language": "401",
          "code": "// Unauthorized\n"
        }
      ],
      "selectedLanguageId": "I773QaJ6J4PVl0-k8FZHD"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}