Integrate Anrok & Braintree

Introduction

This guide outlines the process for linking your Braintree account with Anrok. This will allow you to automatically synchronize transactions and update sales tax to your Braintree invoices.

Click here take a look at how the Anrok & Braintree integration works 

Integration architecture

From a high-level perspective, Anrok is a tool used to determine the taxability of a transaction and appends the local sales tax rate to the transaction if applicable. In addition, the platform helps track nexus exposure by aggregating all transactions in a given jurisdiction and comparing them against the relevant state thresholds. Other benefits include managing registration, returns, and remittance. 

The diagrams below depict the key Anrok integration touchpoints in a typical transaction initiated in Braintree.

First subscription transaction example

 

Screen_Shot_2022-02-11_at_5.26.09_PM.png

  1. Fetch sales tax — In your self-serve checkout flow, you will fetch the sales tax for the subscription using the Anrok API, based on the customer and products info.
  2. Create subscription — You will then create a subscription on Braintree with an additional add-on called "sales tax" and provide the sales tax amount returned from the Anrok API.
  3. Transaction charged — Anrok polls Braintree for transactions that were created or updated in the last 2 hours and will attach the transaction to the appropriate tax return. Anrok will also update the sales tax on its corresponding subscription if necessary (to match current tax rates and remittance status).

Future subscription transaction example

Screen_Shot_2022-02-11_at_10.32.03_AM.png

Anrok polls Braintree every 2 hours for subscriptions that will be billed within the next day and updates sales tax if necessary.

This will ensure that the sales tax is correct when the subscription is charged.

Checklist

Below is a checklist of steps that should be followed during the Anrok integration process.

  • Provide Anrok with the integration's Product IDs, API key, and merchant ID.
  • Test the integration.

Important CleanShot_2024-05-03_at_20.22.03_2x-removebg-preview.png

The default Anrok & Braintree integration can only add tax to subscriptions. If you would like Anrok to add tax to one-time invoices, your Dev team will need to implement the Anrok API. Customers on Anrok's Core and Growth plans have access to technical support and consultations with our Solutions Engineering team throughout the implementation process, as well as testing recommendations, launch planning, and ongoing support for our API.

 


 

Step 1

Invite Anrok to your Braintree account

Anrok requires you to create a new Braintree API key to import your product catalog and ingest your historical transactions.

Note CleanShot_2024-04-30_at_16.01.40_2x-removebg-preview.png

Since Braintree's API credentials are tied to a user account, If the Braintree user who owns the key is removed or deactivated, the API key will no longer work. For this reason, it's recommended that you create a new user account specifically for Anrok or invite Anrok to your account.


Try Inviting Anrok to your Braintree account in the demo above ☝️

  1. In the Braintree app CleanShot 2023-07-20 at 11.34.37@2x.png, click the Gear button CleanShot > Team.
  2. Click + New User, then under Email, enter billing-integration-support@anrok.com.
  3. Under API Access, click the checkbox  CleanShot  next to API Access (if not already selected).
  4. Under Roles, click the checkbox CleanShot  next to Account Admin.
  5. When you are finished, click Create User.

 


 

Step 2

Generate a new Braintree API key

Once you’ve invited Anrok to your Braintree account (or created an account made specifically for Anrok’s API key), you can begin the process of creating a new Braintree API key under that account.

Try generating a Braintree API key in the demo above ☝️

  1. In the Braintree app CleanShot 2023-07-20 at 11.34.37@2x.png, click the Gear button CleanShot > API.
  2. Click + Generate New API Key.
  3. Navigate to the new API key, then click View.
  4. Record the Public Key, Private Key, Environment, and Merchant ID information listed.

 


 

Step 3

Connect to Braintree

The first step of integrating with Braintree will be connected directly to your account within Anrok. During this process, you must align your accounting time zone and provide the credentials associated with your Braintree account.

Try connecting with Braintree in the demo above ☝️

  1. In the Anrok app CleanShot 2023-07-20 at 12.02.21@2x.png, go to Data sources. Take me there!
  2. Select Integrate system, then under Accounting time zoneselect the time zone that matches your Braintree account (or select UTC if you don't know which time zone to select).
  3. Under Data source, select Braintree, then enter the Public Key, Private Key, Environment, and Merchant ID listed on your Braintree API key.
  4. When you are finished, click Connect.

 


 

Step 4

Add your Braintree plans as product IDs

In Anrok, your Braintree plans will be called product IDsProduct ID
They describe the specific product or service that was sold to your customer. Product IDs are passed to Anrok from your billing system as the product(s) you are including on the invoice.

Each product ID you sell must be mapped to a corresponding tax configuration in Anrok, which signals what taxability ruleset to apply to the product.
. These product IDs are the key drivers for calculating taxability. It's important that you add your current and previous Stripe products into Anrok. See What are product IDs?

Try adding your Braintree plans in the demo above ☝️

  1. Under New products detected, select a corresponding Product type and Tax category for each product detected. See Select a tax configuration.
  2. If you'd like to assign a Product type and Tax category to multiple products at once, click the checkbox  anrok_checkbox.png  next to each product, then select Batch assign.
  3. When you are finished, scroll down and click Add products.

 


 

Step 5

Import your Braintree transactions

Now that you've assigned all of your product IDs, you can begin importing your historical transaction from Braintree into Anrok.

Try importing your Braintree transactions in the demo above ☝️

  1. Under Select transactions to import, select one of the following options:
    • Import all past transactions — all transactions will be imported into Anrok. This will result in a complete picture of your economic nexus exposure.
    • Import transactions from a specific date — some past transactions will not be imported into Anrok. This may result in an incomplete picture of your current economic nexus exposure.
    • Continue without importing past transactions — none of your historical transactions will be imported into Anrok. This may result in an incomplete picture of your economic nexus exposure.
  2. Select Import transactions (or Mark as finished depending on your previous selection).
  3. When your transactions have finished importing, select Mark complete.

 

Note CleanShot_2024-04-30_at_16.01.40_2x-removebg-preview.png

Before you begin creating and editing invoices, you must ensure your Braintree account has been properly configured for tax calculation. Check out how to configure your Braintree account.

Can't find what you're looking for?

Submit a request to our customer care team!