How to get Tokenization key in Woocommerce Rest API?

We use the Woocommerce Rest API to develop mobile applications such as Android and IOS. We integrated the payment method like Braintree using the WooCommerce PayPal plugin. Works on the Braintree payment gateway .

It works great on our website, but for mobile applications, you need a client token or Tokenization key to integrate the Braintree SDK.

This plugin does not store any Tokenization or Client Token keys in our database, since this will give it to the API for integration? It only stores the merchant ID in Braintree settings in woocommerce.

So, how will we integrate the Braintree payment gateway into the website and mobile application using the REST WooCommerce API.

Please suggest that anyone has an idea ...

+7
android ios paypal woocommerce braintree
source share
1 answer

To get a token key :

  • Enter the production control panel or the sandbox control panel, depending on which environment you are working in

  • Go to Settings → API Keys

You should see your key in the Tokenization Keys section. If the key does not appear, click Create a new tokenization key . Copy this key.


To use this tokenization key in an Android app:

  • Put the key (copied after the above steps) in /res/values/strings.xml

  • In your code, get the key to your string resources that you just posted in the above step.

  • Set this key as the second parameter when initializing braintree with BraintreeFragment.newInstance(activity, tokenizationKey);

+3
source share

All Articles