This is a beta release of documentation for Magento 2.4, published for previewing soon-to-be-released functionality. Content in this version is subject to change. Links to the v2.4 code base may not properly resolve until the code is officially released.

createBraintreeClientToken mutation

The createBraintreeClientToken mutation creates the client token for Braintree Javascript SDK initialization.

Syntax

mutation: {createBraintreeClientToken}: String

Example usage

Request:

1
2
3
mutation {
  createBraintreeClientToken
}

Response:

1
2
3
4
5
{
  "data": {
    "createBraintreeClientToken": "4JQaNVJokOpFxrykGVvYrjhiNv9qt31C"}
  }
}

Errors

Error Description
The Braintree payment method is not active. The Braintree payment method is disabled in admin.