How to setup the credentials (Public Key, Private Key, Merchant ID) for the Braintree / BraintreeTwo payment modules

Step 1

Open the main Braintree site: https://www.braintreepayments.com/

Step 2

Press «Log In» and select the mode: «Production» or «Sandbox»:

Step 3

Enter your Braintree account credentials (username and password) and press «Log In»:

Step 4

Select «Account» → «My User» from the top menu:

Step 5

Scroll the new page to the bottom and press the «View Authorizations» button in the «API Keys, Tokenization Keys, Encryption Keys» section:

Step 6

The «Authorizations» page will be opened.
You need the «API Keys» table.
Press a link in a table’s row to view existing API credentials or press the «Generate New API Key» to generate new API credentials:

Step 7

The «Client Library Key» table will be shown.
You need the following values: «Public Key», «Private Key», «Merchant ID»:

Step 7

Enter these values in the Magento 2 «Stores» → «Configuration» → «Stores» → «Payment Methods» → «Configuration» backend section: