Before starting, make sure you are on FirstPromoter Braintree integration setup, either by going to Settings > Integrations > Braintree > Setup or from the Quick Setup Wizard from Getting Started section. Make sure you see this:
Step 1) Create a Read Only User Role(optional)
For added security, you can create a new User Role on Braintree that allows only read operations. You can skip to Step 2 if you are not concerned about this or you are in Braintree Sandbox environment.
- Login as admin to your Braintree account and go to Settings > User and Roles > Manage Roles > New
- Give a role name like Read-Only
- Uncheck all permissions except: Download Transactions with Masked Payment Data, Download Vault Records with Masked Payment Data, Download Subscription Records, Manage Webhooks
- Click 'Create Role'
- Now go to Settings > Users and roles > New user. Give the user API Access, assign the read only role and assign access to the merchant accounts
- Now logout of Braintree and log back in as this new 'read only' user.
Step 2) Create a new API key
Login to Braintree, navigate to Account > My User (on top menu) and scroll down until you see:
Click on View Authorizations. Once you are on the API keys section, click on 'Generate API key'.
Step 3) Add API details to FirstPromoter
On the new API key generated, click "View" in the Private Key column. Copy-paste the data from that table to corresponding fields on FirstPromoter Braintree Setup form.
Step 4) Set up the Webhooks
- Go back to Braintree, go to Settings > Webhooks and click 'Create New Webhook'
- On the Destination URL field add the 'Webhook Endpoint URL' value from FirstPromoter Braintree Setup
- On Notifications, check only 'Cancelled', 'Charged Successfully' and 'Expired'
- Click 'Create Webhook'
- Click 'Check URL' to make sure you copy-pasted the destination url correctly.
Step 5) Finish
Once you created the webhook, go back to FirstPromoter and click 'Save'. If you don't get any errors it means that FirstPromoter was able to connect successfully to Braintree API.
If you are using Braintree Sandbox Environment, you need to go back and repeat the steps for the Production environment.
Important note: Because of Braintree Webhooks limitation, FirstPromoter can't automatically handle refunds, all other functions are working corectly. In case of a refund, you just need to "Deny" the commission/reward of the affiliate.