How to Configure Braintree Payment Method in Magento 2
Braintree is a subsidiary company of the world’s biggest payment service provider, Paypal.
Braintree serves its services across 45 countries. It also supports 130 currencies. The payment gateway is designed to provide a seamless shopping experience by offering quick payment services.
Also, it is the best choice for E-commerce stores as it allows accepting payments from Paypal, credit and debit card and popular wallets like Apple Pay and Google Pay.
Steps to Configure Braintree Payment Gateway Method in Magento 2:
1. Create an account
Visit the official website of Braintree and sign up.
2. Configure Basic Settings:
- Login to Magento 2 store.
- Navigate to Stores > Settings > Configuration
- Expand Sales and choose Payment Methods
If you have multiple sites running on Magento, in the upper-left corner, select Store View where you can configure.
To set the location of your business, by selecting Merchant Country. - You will see Recommendation Solutions, in the Braintree section, click on Configure
Configuring Braintree:
- Enter the Title to identify Braintree as a payment method during checkout
- Select the Environment that you want to use for Braintree transactions.
- Sandbox – For testing purpose
- Production – To allow customers to use the Braintree payment method.
- Set Payment Actions:
- Authorise only: Approves the purchase and puts a hold on the funds.
- Authorise and Capture: Approves the purchase and immediately withdrawn from the customer’s account.
- Enter Merchant ID from your Braintree account.
- Login your Braintree account.
- Click on the Settings Icon at the right-top of the webpage.
- You will see a dropdown menu. Select Business option.
- Here is a merchant ID.
- Enter Public Key from your Braintree account.
- Click on the Settings Icon at the right-top of the webpage.
- You will see a dropdown menu. Select API option.
- Here is a Public Key.
- Enter Private Key from your Braintree account.
- . Click on the Settings Icon at the right-top of the webpage.
- You will see a dropdown menu. Select API option.
- Click on View Private Key under the section API Keys
- Here is a Private Key.
- Set Enable this Solution to Yes.
- If you wish to enable Paypal as a payment option with Braintree, you can set to Yes.
- If you want to store the customer information securely, therefore, the customers will not have to rewrite payment information, set Vault Enabled to Yes.
3. Configure the Advanced Settings:
-
Expand the Advanced Settings section
-
Write down the Vault Title that indicates where the customer card information is stored.
-
Enter your Merchant ID from your Braintree account.
-
Set Advanced Fraud Protection to Yes, if you want to use Braintree fraud protection for all the transactions. You need to enable Advanced Fraud Protection in the Settings/Protection section.
-
Set Debug to Yes, if you want the system to save a log file of interaction between the store and Braintree.
-
Set CVV Verification to Yes, the customers need to add a three-digital number before making a payment. Before setting this option to Yes, make sure you enable AVS and/or CVV in the Settings/Processing section of your Braintree account.
-
Select Credit Card Types based on your business requirement.
-
In Sort Order, enter the number to determine the in which Braintree appears when listed with other payment methods during checkout.
4. Configure the Country Specific Settings:
-
In Payment from Applicable Countries, select All Allowed Countries or Specific Countries based on your business requirement.
-
Set Country Specific Credit Card Types, select the country and a type of credit card and click on add. Repeat the process for each country.
5. Paypal Settings via Braintree
- Follow these steps to identify your Paypal via Braintree configuration:
-
Enter the Title to identify Braintree’s payment by Paypal option during checkout.
-
Enter a descriptive Vault Title to identify where your customer card information is to be stored.
-
In Sort Order, enter the number to determine the in which Braintree’s Paypal option appears when listed with other payment methods during checkout.
-
If you want to use a Merchant name other than the default once, enter the merchant name in Override Merchant Name.
-
-
Set Payment Action based on your requirement.
-
In Payment from Applicable Countries and Payment from Specific Countries, select the countries based on your business requirement.
-
Set Require Customer’s Billing Address to yes, to require that customers provide a billing address.
-
If you want customers to allow edit shipping address entered during checkout, set Yes to Allow to Edit Shipping Address Entered During Checkout on PayPal Side.
-
Set Debug to Yes, if you want the system to save a log file of interaction between the store and Paypal.
-
Set Display on Shipping Cart to Yes, if you want to display a Paypal button in both the mini shopping cart and shopping page.
-
Set Display on Shipping Cart to Yes, if you want to display a Paypal button in both the mini shopping cart and shopping page.
- Set Skip Order Review to Yes, if you want to bypass Order Review Step before the order is submitted.
6. Configure the 3D Verification Settings
- Set 3D Verification to Yes, if you want to add a verification step credit cardholder customers that are enrolled in a verification program such as “Verified by VISA”.
The transaction amount which is submitted for verification is checked against the amount that is sent for authorization during this process.
- The transaction amount which is submitted for verification is checked against the amount that is sent for authorization during this process.
-
Select the countries for 3D verification from Verify for Applicable Countries.
7. Dynamic Descriptors
Dynamic descriptors are sent on a per transaction basis and it explains what will appear on your customers’ credit card statement for a specific purchase. These are not enabled by default.
-
All the descriptors given below are used to identify purchases on customer credit card statements. It is possible to reduce the number of chargebacks by clearly identifying the company that is associated with each purchase.
Feel free to contact Braintree Support, if the Dynamic Descriptors are not enabled.
-
Enter the Dynamic Descriptor for the Name, Phone, and URL as per these guidelines.
-
-
There are mainly two parts of Name descriptors that are separated by an asterisk (*). For instance, Meetanshi*Magento
The first part of the descriptors shows the company or DBA and the second part shows the product.
Basically, the length of the Meetanshi and Magento parts of the descriptors can be allocated in given ways within twenty-four characters.
Option 1: Meetanshi must be 3 characters, Magento may be up to 18 characters
Option 2: Meetanshi must be 7 characters, Magento may be up to 14 characters
Option 3: Meetanshi must be 12 characters, Magento may be up to 9 characters
-
-
-
Phone descriptor must be given to ten to fourteen characters in length and only number, dashes, parentheses, and periods. For instance,
-
1111111111
-
(111) 111-1111
-
111.111.1111
-
-
3. The URL descriptors show your domain name and it should not be up to thirteen characters long. For instance, Meetanshi.com
8. Save Config
When you complete configuration, click on Save Config.
That’s it. You are good to go with the Braintree payment method integration with Magento 2.
If you have questions regarding this tutorial, feel free to ask in the Comments section below.
I would like to solve your problem.
Appreciate our work by sharing this post on the Magento Community.
Thank you.
Jignesh Parmar
An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.
Prev
Debug: customer-data.js:86 Uncaught Error: [object Object] in Magento 2
How to Configure Shipment Emails in Magento 2
Next