Braintree Gateway Setup
This document gives a general overview of the Braintree payment gateway for Easy Digital Downloads.
To use Braintree with Easy Digital Downloads, you will need:
- Merchant ID - https://articles.braintreepayments.com/control-panel/important-gateway-credentials#merchant-id
- Merchant Account ID - https://articles.braintreepayments.com/control-panel/important-gateway-credentials#merchant-account-id
- Public Key - https://articles.braintreepayments.com/control-panel/important-gateway-credentials#public-key
- Private Key - https://articles.braintreepayments.com/control-panel/important-gateway-credentials#private-key
While not required to use Braintree, an SSL Certificate is highly recommended. You can read more about this in the Braintree documentation. Be sure to also see our guide on setting up an SSL.
1. Enter API Keys
Once the extension is installed and activated, in your EDD store, go to Downloads → Settings → Payment Gateways and find the Braintree section. It will look like this:
Once you have all the API information from step 1 you can add it to the required boxes and once done, click the Save Changes button at the bottom.
Note: if you have Test Mode enabled, be sure you enter API keys from your Braintree sandbox account. Live API keys will not work when Test Mode is enabled.
You can optionally enable "Submit for Settlement" to immediately submit all transactions for settlement, or "Store In Vault on Success" to store all credit cards in your vault upon a successful purchase.
2. Enable Payment Gateway
Once the Braintree Gateway is installed, activated, and the API Keys have been entered you will need to enable it as a payment gateway by going to Downloads → Settings → Payment Gateways and selecting Braintree from the list of available gateways. Once the box is checked, click the Save Changes button at the bottom of the page.
Testing a Purchase
To test that your Braintree account is properly connected to Easy Digital Downloads, follow these steps:
- Enable Test Mode in Downloads → Settings → Payment Gateways → General
- Enter your API credentials in Downloads → Settings → Payment Gateways (if you have not already)
- Add an item to your cart and proceed to the checkout page
- Complete the checkout form and use a test credit card number from the Braintree documentation page.
- Complete the purchase. If you are redirected to the purchase confirmation page, everything has worked properly.
- Make sure you disable Test Mode before you begin accepting real purchases.