Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8538871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:13:33+00:00 2026-06-11T11:13:33+00:00

I am trying to use the BrainTree webhooks for subscription transactions but have been

  • 0

I am trying to use the BrainTree webhooks for subscription transactions but have been unable to get my page to verify.

From BrainTree: https://www.braintreepayments.com/docs/php/webhooks/destination_verification

When you attempt to add the destination, our servers will make a GET request to the provided URL with a query param named bt_challenge. This query param should be passed to the verify method. The result of calling this method should be returned as the body of the response.

Braintree_WebhookNotification::verify(bt_challenge_param);

First, I tried in NodeJS (as our transactions are successfully done this way):

//WEBHOOK GET PROCESS FOR BRAINTREE SUBSCRIPTION
app.get('/getwebhook', function(req, res){

    var bt_challenge_param = req.param('bt_challenge_param', null);
    var jsObj = new Object();

    jsObj.response = gateway.webhookNotification.verify(bt_challenge_param);

    res.json(JSON.stringify(jsObj));
});

where my PHP page communicated with the NodeJS process and puts the result in the body. Once this failed verification, I wrote a test page directly in PHP:

<?php
require_once 'lib/Braintree.php';

Braintree_Configuration::environment('production');
Braintree_Configuration::merchantId('mymid');
Braintree_Configuration::publicKey('mypubkey');
Braintree_Configuration::privateKey('myprodkey');

$bt_challenge = "";
if(isset($_GET['bt_challenge']))
{
    $bt_challenge = $_GET['bt_challenge'];
}


?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>Webhooks</title>
  <meta name="viewport" content="width=device-width; initial-scale=1.0" />
</head>
<body>
<?php
if(isset($bt_challenge) && $bt_challenge != ""){
    echo Braintree_WebhookNotification::verify($bt_challenge);
}
?>
</body>
</html>

However, this too failed verification. Not sure what is wrong as there is no test for verification or any indication of what is wrong. I tried contacting BrainTree support but with no response back.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:13:35+00:00Added an answer on June 11, 2026 at 11:13 am

    You need to return the result of

    Braintree_WebhookNotification::verify($bt_challenge);
    

    as the body of the response, not the body of an HTML document that is in turn the body of the response. In other words, your entire file should be something like:

    <?php
    require_once 'lib/Braintree.php';
    
    Braintree_Configuration::environment('production');
    Braintree_Configuration::merchantId('mymid');
    Braintree_Configuration::publicKey('mypubkey');
    Braintree_Configuration::privateKey('myprodkey');
    
    $bt_challenge = "";
    if(isset($_GET['bt_challenge']))
    {
        $bt_challenge = $_GET['bt_challenge'];
    }
    if(isset($bt_challenge) && $bt_challenge != ""){
        echo Braintree_WebhookNotification::verify($bt_challenge);
    }
    ?>
    

    If you have any more questions, please feel free to reach out to Braintree Support.

    Disclosure: I work at Braintree.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying use the edit_post_link() function to contain an image. All of
I am trying use std::copy to copy from two different iterator. But during course
I am trying use Thread but i have some problem (I am beginner at
Im trying use a Java annotation in a Groovy class but have trouble to
I'm trying use this code to get image resolution from file bool GetImageSizeEx(const char
I have been trying use zenity with standard re-direction in a shell script, something
i'm trying use facebook API to upload photo in my fan page. I downloaded
I am trying use gem tire to search in my application. I have tables
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
Hi I'm trying use a datepicker on a field I have. I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.