🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms TaxJar Premium Add-on Setup Guide

Updated 6 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Get your TaxJar API token
  4. The settings page
  5. Add a feed to a form
  6. Line items and product tax codes
  7. Calculate, or record a transaction
  8. Nexus and no-tax results
  9. Conditions
  10. What your visitors see
  11. On the entry
  12. Retries are safe
  13. Privacy and security
  14. Troubleshooting

Video walkthrough

Gravity Forms TaxJar Add-On Setup Guide: US Sales Tax on Quotes (WordPress Side)
Video setup guide: Gravity Forms TaxJar Watch on YouTube

The Gravity Forms TaxJar Premium Add-on calculates US sales tax on every form submission: it builds the order from the customer address and the amount, shipping and line items you map from your form fields, asks the TaxJar API for the tax to collect and the combined rate, and keeps the result with the entry. It can also record the order as a TaxJar transaction for reporting and filing. This guide walks through connecting your TaxJar account, adding a feed to a form, and understanding exactly what the add-on sends and stores.

What you need

You need Gravity Forms 2.9 or newer, a WordPress site running PHP 7.4 or newer, and a TaxJar account. The TaxJar sales-tax API is part of a paid TaxJar Professional plan — you generate an API token from your account once you are on that plan, and TaxJar also offers a sandbox token for testing. The add-on only ever contacts the TaxJar REST API at api.taxjar.com (or api.sandbox.taxjar.com when sandbox mode is on); it never talks to any other service.

Get your TaxJar API token

In TaxJar, open Account, then TaxJar API, and generate an API token. The sales-tax API requires a paid TaxJar Professional plan, so make sure your plan includes API access. This token belongs to your account, so treat it like a password. You paste it into the add-on settings once, and from then on it is stored encrypted on your own site.

The settings page

In WordPress go to Forms → Settings → TaxJar, activate your GravityExtra license key, then paste your TaxJar API token into the token field and save. The field is a password field, the token is encrypted before it reaches the database, and it is never shown again in clear. Tick Sandbox while you are testing with a sandbox token; untick it to calculate real tax. Use the Test connection button to confirm the token works: it asks TaxJar for its tax categories and reports success, without calculating anything or recording a transaction.

The TaxJar settings page in Gravity Forms: license key, TaxJar API token, sandbox toggle and a Test connection button
The settings page: your TaxJar API token, a sandbox toggle and a Test connection button.

If your site cannot encrypt secrets (the PHP openssl extension is missing), the add-on tells you, and you can instead define the token with the GFTJ_API_KEY constant in wp-config.php. When that constant is set, the token field is replaced with a short note and nothing is stored in the database.

Add a feed to a form

Open a form, go to Settings → TaxJar, and add a feed. The first choice is what to do: Calculate the tax only gets the tax and stores it, or Calculate, then record the order also files the order as a transaction in your TaxJar account for reporting and filing. Give the feed a name so you can recognise it later.

The TaxJar feed in Gravity Forms: calculate only or record a transaction, the order amount and the customer address
A feed maps the customer address and the order amount, and chooses calculate-only or record.

Map the Customer address from the submission: the destination country and postal code are required, and the state, city and street make the calculation more exact. Every address field accepts merge tags, so you can pull the destination straight from an address field, for example {Ship to (ZIP / Postal Code):3.5} for the postal code. Set the Ship-from (nexus) address to your warehouse or office — usually fixed values. Then set the Order amount (the taxable subtotal) and the Shipping charge, for example an amount of {Amount:4} from a number field.

Line items and product tax codes

You can optionally map a single line item — a quantity, a unit price and a TaxJar product tax code — for a more exact calculation and for the recorded transaction. A product tax code tells TaxJar how to treat the product: for example clothing (20010) is taxed differently in some states, and many digital goods are exempt. Leave the code empty for a standard taxable product. When you map a line item without an order amount, the amount is worked out from the quantity and unit price.

Calculate, or record a transaction

In Calculate the tax only mode the add-on sends the order to TaxJar and stores the tax to collect, the combined rate and the taxable amount on the entry. This is ideal when you want to quote a price, show tax at checkout, or report it later. In Calculate, then record the order mode the add-on also files the order as a TaxJar transaction, using a stable transaction id built from the form and entry, so the sale appears in your TaxJar reports and is ready for filing. The tax is always calculated first, so even if recording fails the tax is still stored on the entry.

Nexus and no-tax results

TaxJar decides the tax from the destination and from where you have nexus. When there is no nexus for a destination, TaxJar returns no tax to collect, and the add-on records that clearly on the entry rather than treating it as an error. The combined rate and a short breakdown of the state, county, city and special-district portions are stored so you can see exactly how the tax was made up.

Conditions

A conditional-logic rule at the bottom of the feed lets you calculate tax only when a rule is met, for example only for orders shipping within the United States, so one form can serve taxable and tax-free cases through separate feeds. You can also run several feeds on one form — for instance a calculate-only feed for a quote and a record feed once the order is confirmed.

What your visitors see

Nothing changes for the person filling in the form. They submit as usual and see your normal confirmation. The tax is calculated quietly in the background, and if the TaxJar call ever fails the submission is still saved, so you never lose an order.

A front-end Gravity Form whose submission calculates US sales tax with TaxJar
A normal form: the visitor never sees anything about TaxJar.

On the entry

Every entry records a note saying what happened, and keeps the sales tax, the combined rate, the taxable amount and — when a transaction is recorded — the TaxJar transaction id. Four merge tags, {taxjar_tax}, {taxjar_rate}, {taxjar_taxable} and {taxjar_order}, are available in your Gravity Forms notifications so you can show the tax to the customer and send the details to your team.

A Gravity Forms entry screen showing the TaxJar note with the calculated sales tax
The entry note records the sales tax, the rate and the breakdown for your records.

Retries are safe

The add-on calculates the tax once per entry and never records a transaction twice. If you resend a feed, or Gravity Forms retries it, a “done” marker on the entry means nothing is done a second time, and a short per-entry lock stops two simultaneous runs from both recording the same order. If a call fails, you can safely resend once the problem is fixed and it will calculate the tax exactly once.

Privacy and security

Your TaxJar API token is encrypted at rest with AES-256-GCM and is never shown again, never written to an entry, and never written to a log. The token travels only in the Bearer Authorization header of the request, never in the URL or the request body. The add-on fixes the host to api.taxjar.com (or the sandbox host) over https with certificate verification on, and never follows a redirect, so the token cannot be sent anywhere else. Error messages have the token stripped out before they are shown or stored.

Troubleshooting

If Test connection fails, re-copy the token from TaxJar and confirm your plan includes API access (the sales-tax API needs a paid TaxJar Professional plan). If a submission leaves an error note, the note includes the HTTP status from TaxJar (for example a 401 for an invalid token, a 422 when the destination or amount is incomplete, or a 429 if you are rate limited). Fix the cause, then resend the feed from the entry. If you use the constant, remember that it overrides the stored token.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr