---
title: Respond to Braintree webhook URL verification challenge
slug: reference/respond-to-braintree-webhook-url-verification-challenge
docTags: 
createdAt: 2026-09-28T07:46:00.827Z
---

{
  "id": "C8HUMlfCoxwE1AJL3tjUM",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/webhooks/braintree/{siteId}/{accountId}",
    "servers": [],
    "name": "Respond to Braintree webhook URL verification challenge",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "siteId",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "accountId",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "bt_challenge",
          "type": "string",
          "description": ""
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "FK-u4Ao-iIZTfi8Ims9ie",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '/webhooks/braintree/{siteId}/{accountId}?bt_challenge=string' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "_G1t_axxp72sXPpq-KApr",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/webhooks/braintree/{siteId}/{accountId}?bt_challenge=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "sTP2KfevfcnB_3gqQPqk7",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/webhooks/braintree/{siteId}/{accountId}?bt_challenge=string\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "GCfUBR7KqX3HohgElVmqi",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/webhooks/braintree/{siteId}/{accountId}?bt_challenge=string\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "FK-u4Ao-iIZTfi8Ims9ie"
    },
    "results": {
      "languages": [
        {
          "id": "L4J4oLO18TZ-cgp2h0a3r",
          "language": "200",
          "code": ""
        },
        {
          "id": "ib0EObx37XcYI_6Q-1kNg",
          "language": "401",
          "code": "// Unauthorized\n"
        }
      ],
      "selectedLanguageId": "L4J4oLO18TZ-cgp2h0a3r"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}