API credentials

Regardless of how you connect your website or mobile app to Braintree, at minimum you will be required to provide these four values in order to process payments via the API:

  • Public key: user-specific public identifier
  • Private key: user-specific secure identifier that should not be shared – even with us!
  • Merchant ID: a unique identifier for your gateway account
  • Environment: value that specifies where requests should be directed – sandbox or production

Sandbox API keys are distinct from those in the production environment, so they must be updated when switching between environments. More information about switching environments is available in Try It Out.

You can locate these values by following these steps:

  1. Log into either the production Control Panel or the sandbox Control Panel, depending on which environment you are working in
  2. Navigate to Account > My user
  3. Under API Keys, Tokenization Keys, Encryption Keys, click View Authorizations
    • If no API keys appear, click Generate New API Key
  4. Click View under the Private Key column to see your public and private keys, merchant ID, and environment

If you do not see the Authorizations section at all and your account was recently approved, please try again later – it can take a few business days for us to set up your merchant account.

Additional credentials

Depending on your integration, you may need to provide other credentials in addition to those listed above.

Merchant account ID

note

Your merchant account ID is not the same as your merchant ID. See below for the differences.

You can have multiple merchant accounts to process transactions for different businesses or currencies within your Braintree gateway. Each merchant account will be associated with a unique merchant account ID. You can then specify a merchant account when creating a transaction.

Even if you only have one merchant account, certain shopping cart integrations will require that you provide your merchant account ID.

To find your merchant account ID(s):

  1. Log into either the production Control Panel or the sandbox Control Panel, depending on which environment you are working in
  2. Navigate to Settings > Processing > Merchant Accounts

Merchant ID

note

Your merchant ID is not the same as your merchant account ID. See below for the differences.

Your gateway account can be identified by its unique merchant ID. This value will be different for every account; even your production and sandbox gateways will have their own distinct merchant IDs. If you contact our Support team for assistance, we may ask you to confirm this value.

Follow these steps to locate your merchant ID:

  1. Log into either the production Control Panel or the sandbox Control Panel, depending on which environment you are working in
  2. Navigate to Account > My user
  3. Under API Keys, Tokenization Keys, Encryption Keys, click View Authorizations
  4. Click View under the Private Key column to access the Client Library Key page
    • If you have generated new API keys in the past, there may be multiple Public Keys listed – select any Public Key, as the merchant ID will be the same for each
  5. Locate the alphanumeric string of characters listed under the Merchant ID column header

Merchant account ID vs. merchant ID

While merchant account ID and merchant ID sound similar, they are different values with distinct purposes.

Your merchant ID is a unique identifier for your entire gateway account. This value is required for every API request, along with the values listed above.

Your merchant account ID is a unique identifier for a specific merchant account. Within your Braintree gateway, you can have multiple merchant accounts to process transactions for different businesses or currencies. If you have a single merchant account, it is not necessary to specify a merchant account ID in your API requests. If you have multiple merchant accounts and choose not to specify the merchant account ID, all requests will process through your default merchant account. Learn more about specifying merchant accounts in API requests.

Tokenization keys

Tokenization keys can be used for authorization in your Braintree integration. They authorize the client SDK to tokenize payment methods for use on your server.

To view your tokenization keys, follow these steps:

  1. Log into either the production Control Panel or the sandbox Control Panel, depending on which environment you are working in
  2. Navigate to Account > My user
  3. Under API Keys, Tokenization Keys, Encryption Keys, click View Authorizations

You should see your key under the Tokenization Key section. If no key appears, click Generate New Tokenization Key.

Client-Side Encryption (CSE) key

The Client-Side Encryption key is required if you are using our older integration method. This value is unique to your Braintree gateway, not to a specific user. Some shopping cart integrations may also require the CSE key in order to connect to Braintree.

You can locate your CSE key by following these steps:

  1. Log into the Control Panel
  2. Navigate to Account > My user
  3. Under API Keys, Tokenization Keys, Encryption Keys, click View Authorizations

You should see your key under the Client-Side Encryption Keys section.

Still have questions?

If you can’t find an answer, contact our Support team.


← Back to Previous Page