> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tight.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> Automate the reconciliation between Shopify payouts and their itemized transactions with Tight

## Overview

Instead of building an integration with Shopify in-house, Tight communicates directly with Shopify on your behalf using
your [Shopify Partner](https://www.shopify.com/partners) account. This enables you to own the relationship between your
customer and Shopify while getting automatic order, payment, and payout reconciliation on the user's books.

## Automated Reconciliation

Shopify deposits money directly into your users' bank accounts on a regular cadence. When utilizing one of the Tight Bank
Transactions integrations, e.g. [Plaid](/integrations/banking/plaid), the bank deposit to the user's bank account will
also be ingested by the Tight API as part of that integration's bank feed. Importantly, Tight's algorithms automate the
reconciliation between that bank deposit and the itemized transactions within Shopify, saving your users time that would
have otherwise been spent manually reconciling these transactions in legacy accounting systems.

### Order Payout Example

1. The business owner processes 4 orders of \$1000 each through their Shopify store (e.g., online orders, point-of-sale
   transactions, mobile app sales).
2. These 4 Shopify orders are automatically synced into Tight as invoices.
3. Customers pay for their orders via 4 separate credit card payments. Shopify Payments deducts processing fees from
   each payment (2.9% + \$0.30 per transaction = \$29.30 per payment for merchants on the Basic plan).
4. Shopify groups these payments (now \$970.70 each after fees) into a single payout based on the merchant's payout
   schedule.
5. The user receives a payout from Shopify for \$3882.80 (\$4000 minus \$117.20 in processing fees), also seen as a
   \$3882.80 deposit into their checking account.
6. The Tight API automatically matches the 4 synced invoices with the one payout, and creates expenses for the
   processing fees deducted from each payment. Additionally, the Tight Embedded experience nests these transaction line
   items neatly under a single payout row.

## Create a Shopify App

If you haven't already, sign up for a [Shopify Partner](https://www.shopify.com/partners) account. Once created, you
can create a new Shopify app from the Partner Dashboard.

### Setup Shopify App

Tight's Shopify integration utilizes OAuth 2.0 to read your users' store data. Once your Shopify app is created, configure the following settings.

#### Step 1: Configure App Access Scopes

Your app will need access to the following scopes to enable Tight's integration:

* `read_all_orders` - To sync order data
* `read_products` - To access product information
* `read_shopify_payments_payouts` - To retrieve payout data
* `read_customers` - To access customer information associated with orders

#### Step 2: Configure Redirects

For the OAuth redirect URLs, add `https://redirect.sandbox.tight.com/integrations/shopify` and
`https://redirect.prod.tight.com/integrations/shopify` since Shopify does not have separate sandbox and production
environments.

<img src="https://mintcdn.com/tight-7c882d74/PBb8Gf8jW9PRt_Fg/integrations/commerce/ShopifyConfig.png?fit=max&auto=format&n=PBb8Gf8jW9PRt_Fg&q=85&s=f7a6b0849ce6be88d72db6aa5b8cd87f" alt="Shopify Config" width="1496" height="1136" data-path="integrations/commerce/ShopifyConfig.png" />

#### Step 3: Note Your Credentials

From the developer dashboard settings, note down your Client ID and Client Secret which you'll need to provide to Tight.

## Securely share your Shopify credentials

Once you've collected your Client ID and Client Secret from the Shopify Partner Dashboard, use the Tight API
to [configure your Shopify integration](/api-reference/integrations/configure-shopify).

## Connect your users' Shopify stores

There are three primary ways to connect your users' Shopify stores to their company in Tight:

1. For partners including commerce platform linkage from their own UX, use
   the [Start Shopify Flow API](/api-reference/integration-management/start-shopify-flow) which wraps the entire OAuth
   2.0 flow such that you simply need to redirect your user to a single URL.
2. Tight's Embedded UI also provides UX from which users can kick off the Shopify connection flow, e.g. when onboarding
   in the [Transaction Dashboard](/embeddable-ui/react/bank-transactions/transactions-dashboard)
3. For partners with existing Shopify
   integrations, [programmatically link the user's Shopify store](/api-reference/integration-management/link-shopify)
