Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

saleor/saleor-taxjar

Warning

This app has been replaced with Taxes App

Saleor TaxJar App

The sales tax calculation with using TaxJar API.

The app uses synchronous webhooks: checkout-calculate-taxes, order-calculate-taxes, to calculate sales taxes for Saleor. The TaxJar's order transaction is created for each US order (by using order-created webhook). The App assumes that the received prices from Saleor are always .net prices.

How to use this project

Installation

App installation on Saleor is described here:

where manifest path is https://<app-domain>/api/manifest.

Configuration

The App configuration can be done from the Saleor dashboard. After sucesfull app installation, go to saleor-dashboard -> apps -> Saleor TaxJar:

  • API Key is mandatory to activate the app. To generate API key, go to TaxJar admin pannel -> Account -> API Access.
  • Ship from details are mandatory for correct tax calculation.
  • Enable Active when you are ready to use TaxJar App.
  • Enable Sandbox when you use TaxJar in sandbox mode.

Note Checkouts and orders that are related to not configured channels will be skipped by App. Taxes will not be calculated for them. Make sure that you activate TaxJar App for all required channels.

The TaxJar tax group can be set in Product metadata or ProductType metadata. The expected metadata field name is taxjar_tax_code. The TaxJar tax groups can be found here. When the tax group is not set, the standard tax group will be used.

Local development

Update .env file:

SALEOR_DOMAIN=your-saleor-instance.com

Install dependencies pnpm install

Start local server pnpm run dev

Follow the guide how install your app and use tunneling tools like localtunnel or ngrok in order to expose your local server.

If you use saleor-dashboard and your local server is exposed, you can install your app by following this link:

[YOUR_SALEOR_DASHBOARD_URL]/apps/install?manifestUrl=[YOUR_APPS_MANIFEST_URL]

Generated schema and typings

Commands build and dev would generate schema and typed functions using Saleor's GraphQL endpoint. Commit generated folder to your repo as they are necessary for queries and keeping track of the schema changes.

Learn more about GraphQL code generation.

ENVs:

  • SETTINGS_ENCRYPTION_SECRET - used to encrypt/decrypt secret data (like APIKey) that is stored in Saleor's App's private metadata.
  • SALEOR_DOMAIN - Only declared Saleor domain will be allowed to fetch taxes from the app.

Learn more about Apps

Releases

No releases published

Packages

No packages published

Languages