How to Configure Braintree Payment Method in Magento 2?

This tutorial is a guide will explain to how to configure the Braintree payment method in Magento 2. Braintree is a payment method that allows the customer to check out by accessing debit and credit cards, PayPal, Apple Pay etc. It is very secure with PayPal integration.

During the pandemic times when online payment system has become a preferred way for shopping, it is profitable for businesses to accept payments online and promote internet banking. During the checkout process, Customer can able to use credit card such as Visa, Master Card, American Express etc.

To set the Braintree Payment Method in your store, Let’s follow the below steps :

Braintree Payment Method Configuration:

1) Go to Stores > Settings > Configuration > Sales > Payment Methods and expand Braintree Section and Click the Configure Button.

2) Set up details for Basic Braintree Settings:

  • Title: You can set your custom title or set default title “Credit Card (Braintree)“.
  • Environment: For a test environment, set value “Sandbox” and for live, set value “Production“.
  • Payment Action :
    • Authorize: It approves the purchase and puts a hold on the funds for being captured by the merchant. The amount will be withdrawn from the customer’s bank account only after captured by the merchant.
    • Authorize and Capture: It indicates that the amount of the purchase is authorized and withdrawn from the customer’s account at once.
  • Merchant ID: Add the Merchant ID from your Braintree account.
  • Public Key and Private Key: Add the Keys from your Braintree account.
  • Enable this Solution: Set value “Yes” to activate the Braintree Payment Method.
  • Enable PayPal through Braintree: Set value “Yes” to include PayPal as Payment Option with Braintree Payment Method.
  • Vault Enabled: Set value “Yes” to store customer information securely and give facility to not enter information every time when purchasing the product and pay for that.

3) Set up details for Advance Braintree Settings:

  • Vault Title: You can set your custom title or set default title “Stored Cards (Braintree)“.
  • Merchant Account ID:  Add the Merchant ID from your Braintree account.
  • Advanced Fraud Protection: Set value “Yes” for use Braintree fraud protection for all transactions
  • Debug: Set value “Yes” to save a log file of interactions between your store and Braintree.
  • CVV Verification: Set value “Yes” for requiring customers to provide the 3 digit security code of Credit Card.
  • Credit Card Types: Add Credit Card list which you want to allow for your store.
  • Sort Order: Position of display Braintree Method at frontend side.

4) Set up details for Country Specific Settings:

  • Payment from Applicable Countries :
    • All Allowed Countries: Accept Braintree methods for all customers from all countries which specified in your store configuration.
    • Specific Countries: Accept Braintree methods for specific countries.
  • Payment from Specific Countries: Select specific countries to allow to use Braintree methods.
  • Country-Specific Credit Card Types: For that, click on Add button, select the Country and choose to allow Credit Card types.

5) Set up details for PayPal through Braintree :

  • Title: You can set your custom title or set default title “PayPal (Braintree)” to display Braintree’s payment by PayPal on the checkout page.
  • Vault Enabled: Set value “Yes” to store customer information securely and give facility to not enter information every time when purchasing the product and pay for that.
  • Sort Order: Position of display Braintree Method at frontend side.
  • Override Merchant Name: Set value to display different merchant name.
  • Payment Action :
    • Authorize: It approves the purchase and puts a hold on the funds for being captured by the merchant. The amount will be withdrawn from the customer’s bank account only after captured by the merchant.
    • Authorize and Capture: It indicates that the amount of the purchase is authorized and withdrawn from the customer’s account at once.
  • Payment from Applicable Countries :
    • All Allowed Countries: Accept Braintree methods for all customers from all countries which specified in your store configuration.
    • Specific Countries: Accept Braintree methods for specific countries.
  • Payment from Specific Countries: Select specific countries to allow to use Braintree methods.
  • Require Customer’s Billing Address: Set “Yes” to require customer’s billing address.
  • Allow to Edit Shipping Address Entered During Checkout on PayPal Side: Set “Yes” to enable customers to edit shipping address during PayPal transaction.
  • Debug: Set value “Yes” to save a log file of interactions between your store and PayPal throw Braintree.
  • Display on Shopping Cart: Set value “Yes” to display PayPal Button in the mini cart and shopping cart page.
  • Skip Order Review: Set value “Yes” to bypass the order review step before the order is submitted.

6) Set up details for 3D Secure Verification Settings :

  • 3D Secure Verification: Set value “Yes” to add a verification step for customers using credit cards that are enrolled in a verification program such as Verified by VISA.
  • Threshold Amount: Enter the minimum order amount that is required to trigger 3D verification.
  • Verify for Applicable Countries: Set value to allow for all countries or for specific countries.
  • Verify for Specific Countries: Select specific countries to allow 3D secure verification.

This is all you need to set up Braintree payment methods using the above-mentioned steps. We have also covered other payment steps to be configured. For example, Advance Braintree Settings, Country-Specific Settings, PayPal throw Settings etc.

That's it, now your Braintree Payment Method is configured successfully. I hope this blog has helped you out in integrating the Braintree payment method to your store. If we missed out anything, feel free to reach us out.

Magento 2 Development Services


Also read:

How to Restrict Payment Methods by Attribute/Category in Magento 2

How to Restrict Some Payment Methods in Magento 2

How to Get the Payment Method Title of an Order in Magento 2

How to Create Custom Payment Method in Magento 2

How to Setup Cash on Delivery (COD) Payment Method in Magento 2

How to Get List of Payment Methods using Command Line in Magento 2

How to Disable Payment Method for Certain Customer Groups in Magento 2