This is the top-level module exported by the Braintree JavaScript SDK. In a browser environment, this will be the global braintree object. In a CommonJS environment (like Browserify or Webpack), it will be the default export of the braintree-web package. In AMD environments (like RequireJS), it can be required like other modules.
Examples
CommonJS
var braintree = require('braintree-web');
braintree.client.create(...);
In the browser
<script src="https://js.braintreegateway.com/web/3.141.0/js/client.min.js"></script>
<script>
window.braintree.client.create(...);
</script>
AMD
// main.js
require.config({
paths: {
braintreeClient: 'https://js.braintreegateway.com/web/3.141.0/js/client.min'
}
});
require(['braintreeClient'], function (braintreeClient) {
braintreeClient.create(...);
});
Members
(static) VERSION :string
The current version of the SDK, i.e. 3.141.0.