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

# Shopify

> Connect your Shopify store so its checkout runs through PagAmerican, with your catalog and discounts carried over automatically.

Shopify hosts your storefront: product pages, cart and theme. Connecting it to PagAmerican keeps all of that in place and swaps only the checkout. When a buyer clicks the checkout button in your store, they land on the PagAmerican checkout, pay there, and the order is written back to your Shopify admin.

To connect, you create a private app in your own Shopify Partners account and install it on your store. From then on, your products are imported as PagAmerican offers and each paid order shows up in Shopify.

## Before you start

Check these before you open the integration. Each one blocks the setup or the first sale if it is missing.

* **An e-commerce account on PagAmerican.** The **Shopify** card only appears under **Integrations** for vendors with an e-commerce account, and your account verification has to be approved before products can be imported.
* **A Shopify Partners account.** The app that connects the two is created in [Shopify Partners](https://partners.shopify.com), in your own organization. You need access to the Dev Dashboard there.
* **Your store set to USD.** The checkout accepts USD only. A cart in any other currency cannot be opened on the PagAmerican checkout.
* **An image on every product.** A product with no image in Shopify is imported but stays inactive, so it can never be sold. Add at least one image to each product you want to sell.

<Card title="Don't have a PagAmerican account yet?" icon="rocket" href="https://onboarding.pagamerican.app/onboarding" cta="Create your account" arrow horizontal>
  Sign up today, set up your e-commerce account, and run your Shopify checkout through PagAmerican.
</Card>

## How to configure

The setup takes about five minutes and switches between PagAmerican and Shopify twice. Keep the PagAmerican tab open, since you come back to it to paste your credentials.

<Steps>
  <Step title="Open Integrations > Shopify">
    In the PagAmerican dashboard, go to **Integrations** and click **Install integration** on the **Shopify** card. The **Connect Shopify** screen opens on its first step, **Setup app**. It shows three values you copy into Shopify in the next steps: **App URL**, **Scopes** and **Redirect URLs**.
  </Step>

  <Step title="Create the app in the Dev Dashboard">
    Click **Open Shopify Partners** and open your organization. Click **Dev dashboard**, in the bottom-left corner of Shopify Partners, then **Create app**. Under **Start from Dev Dashboard**, enter `PagAmerican Checkout` as the **App name** and click **Create app**.

    <Frame caption="Creating the app in the Dev Dashboard">
      <video autoPlay src="https://mintcdn.com/pagamerican/h6GP2lHU9mVDVZLD/videos/integrations/shopify/create-app.mp4?fit=max&auto=format&n=h6GP2lHU9mVDVZLD&q=85&s=d8ae1476ec0d3fedcd1005e1962f0adc" data-path="videos/integrations/shopify/create-app.mp4" />
    </Frame>
  </Step>

  <Step title="Set the App URL and turn off embedding">
    The app opens on a new version form. In **App URL**, delete the default text and paste the **App URL** from the PagAmerican screen. Then uncheck **Embed app in Shopify admin**. An embedded app cannot be connected.

    <Frame caption="Setting the App URL">
      <video autoPlay src="https://mintcdn.com/pagamerican/h6GP2lHU9mVDVZLD/videos/integrations/shopify/app-url.mp4?fit=max&auto=format&n=h6GP2lHU9mVDVZLD&q=85&s=51c03bf82c47cd607bc45b74f44c4a23" data-path="videos/integrations/shopify/app-url.mp4" />
    </Frame>
  </Step>

  <Step title="Paste the scopes and the redirect URL">
    Scroll down to **API access**. In **Scopes**, paste the **Scopes** value from the PagAmerican screen. In **Allowed redirection URL(s)**, paste the **Redirect URLs** value. Copy both from the screen rather than typing them: the scope list is long and a missing scope makes the connection fail.

    <Frame caption="Pasting the scopes and the redirect URL">
      <video autoPlay src="https://mintcdn.com/pagamerican/h6GP2lHU9mVDVZLD/videos/integrations/shopify/scopes-redirect.mp4?fit=max&auto=format&n=h6GP2lHU9mVDVZLD&q=85&s=2bea82b7e00570d85ab0011e9bdba147" data-path="videos/integrations/shopify/scopes-redirect.mp4" />
    </Frame>
  </Step>

  <Step title="Release the app">
    Click **Release** at the top of the form, then **Release** again in the confirmation dialog. The new version shows up as **Active** under **Versions**.

    <Frame caption="Releasing the app">
      <video autoPlay src="https://mintcdn.com/pagamerican/h6GP2lHU9mVDVZLD/videos/integrations/shopify/release.mp4?fit=max&auto=format&n=h6GP2lHU9mVDVZLD&q=85&s=5d45ff6d3b9066120a399756e6cee4f4" data-path="videos/integrations/shopify/release.mp4" />
    </Frame>
  </Step>

  <Step title="Install the app on your store">
    Back in Shopify Partners, go to **App distribution**, open **PagAmerican Checkout** and click **Distribution**. Choose **Custom distribution**, click **Select** and confirm with **Select custom distribution**. This choice cannot be undone.

    In **Store domain**, enter your store's `.myshopify.com` domain, click **Generate link** and confirm. Open the **Install link** it generates, pick your store and click **Install** on the **Install app** screen, accepting the requested access.

    <Frame caption="Generating the install link and installing the app">
      <video autoPlay src="https://mintcdn.com/pagamerican/h6GP2lHU9mVDVZLD/videos/integrations/shopify/install-app.mp4?fit=max&auto=format&n=h6GP2lHU9mVDVZLD&q=85&s=ca400ecbd72f8ba4b60b950d82f3aaa6" data-path="videos/integrations/shopify/install-app.mp4" />
    </Frame>
  </Step>

  <Step title="Paste your credentials in PagAmerican">
    Shopify sends you back to PagAmerican, on the **Enter credentials** step. **Store domain** is already filled in with the store you just installed the app on. Fill in **Client ID** and **Secret Key**, both found in the Dev Dashboard under **PagAmerican Checkout > App settings**. Paste each one in its own field, with no spaces before or after, and click **Install**.

    Shopify confirms the authorization and you return to PagAmerican, where the screen reads **Shopify connected**. Your catalog import starts right away.

    <Frame caption="Entering the credentials and connecting the store">
      <video autoPlay src="https://mintcdn.com/pagamerican/h6GP2lHU9mVDVZLD/videos/integrations/shopify/credentials.mp4?fit=max&auto=format&n=h6GP2lHU9mVDVZLD&q=85&s=81a57602ba4a49da69b8c1f4d08a508a" data-path="videos/integrations/shopify/credentials.mp4" />
    </Frame>
  </Step>
</Steps>

You can create and connect as many Shopify stores as you need from the same PagAmerican account, each one linked to its own store in PagAmerican. A Shopify store, in turn, can be connected to only one PagAmerican account at a time.

## What happens after you connect

### Your catalog is imported

Every product with the status **Active** in Shopify is imported into PagAmerican:

* Each Shopify product becomes one PagAmerican product.
* Each variant becomes one offer, priced at the variant's price in USD. If the variant has a compare-at price higher than its price, it becomes the offer's original (strike-through) price.

An imported product **is not for sale yet**. It goes into PagAmerican's product review once its image is set, and it can be sold only after the review approves it. Its offers already exist in the meantime, so a buyer who tries to check out one of them before approval sees a checkout that cannot be opened.

### Your catalog stays in sync

Products you create or edit in Shopify are imported or updated automatically, including price and compare-at changes. Only products with the status **Active** in Shopify are for sale on PagAmerican, so what happens next depends on the status.

| In Shopify | On PagAmerican |
| - | - |
| You create a product as **Draft** | It is not imported. It is imported as a new product once you set it to **Active**. |
| You change a product to **Draft** or **Archived** | The product and its offers become inactive and are no longer for sale. Its name and description keep updating. |
| You set the product back to **Active** | It goes back to PagAmerican's product review and its offers become active again. It is for sale again once the review approves it. |
| You delete the product | The product and all its offers are taken off sale. Orders already placed stay in your order history. You are not notified. |

Shopify never approves a product on PagAmerican. A product that PagAmerican suspended or rejected keeps its status, whatever you do in Shopify.

If you delete a product in the PagAmerican dashboard but keep it in Shopify, it comes back, in review, the next time you edit it in Shopify while it is **Active**. Edits you made before the deletion do not bring it back.

A buyer who already had the checkout open when a product left sale can still complete that purchase. A new cart with that product cannot be opened.

### The checkout button leads to PagAmerican

Once your store is connected, the buyer shops exactly as before and, at checkout, lands on the PagAmerican checkout with their cart, keeping the tracking parameters from your store's URL.

Every purchase goes through the cart, so Shopify's express buttons, such as **Buy it now** and Shop Pay, no longer appear in your store. Products imported from Shopify have no standalone checkout link.

The PagAmerican checkout is set up in the theme that is published when you connect your store. If you publish a different theme later, check that your checkout still leads to PagAmerican. See [The checkout stopped leading to PagAmerican after a theme change](#the-checkout-stopped-leading-to-pagamerican-after-a-theme-change).

### Your discounts apply at checkout

The discounts you set up in Shopify carry over to the PagAmerican checkout. The buyer applies them in your store's cart as usual, and the checkout opens with the same discounts already applied. There is nothing to recreate on PagAmerican.

These Shopify discounts are supported:

* discount codes
* free shipping codes
* automatic discounts
* buy X get Y
* quantity and volume discounts
* discounts on the whole order

The discount amounts come from Shopify's own calculation of the cart, so the buyer is charged the discounted price your store shows.

A free shipping code works when the items in the cart have no shipping price on PagAmerican. If one of them has a shipping price, the cart is not opened.

<Note>
  **If a discount can't be applied.** When something goes wrong while loading a discount from your store's cart, the checkout doesn't open the cart, so the buyer is never charged a price different from your store. The buyer sees **This cart has a discount that cannot be applied here yet.** and can remove the discount in your store to check out.
</Note>

#### What the buyer sees in the order summary

The order summary on the checkout shows each discount where it applies:

* **On the item.** A discounted item shows its original price struck through above the discounted price, and the name of the promotion with the amount it takes off, for example `BUY 2, GET 1 FREE (-$25.00)`. An item that comes free with a promotion shows **FREE** as its price.
* **On the whole order.** A discount on the whole order gets its own **Order discount** row, with the code or promotion name and the amount.
* **On shipping.** With a free shipping code, the **Shipping** row shows the code and **FREE**.
* **The code used.** Each discount code the buyer typed appears as a badge below the items.
* **Total savings.** Below the total, **Total savings** adds up everything the buyer saved on the order.

### Paid orders appear in Shopify

When a purchase is paid on PagAmerican, the platform creates the same order in your Shopify admin, already marked as paid, with the buyer's email, the items and quantities, and the shipping and billing addresses. The PagAmerican order ID goes into the order's **PO number**, so you can match the two.

The tracking parameters from the buyer's visit, such as `utm_source`, `utm_campaign` or `fbclid`, are saved on the order under **Additional details**, so your Shopify reports keep the attribution. Up to 20 parameters are kept per order.

The discount codes the buyer used go on the order too, so you see in Shopify which codes each order used. Shopify calculates the order totals on its side, applying those codes and any automatic discounts your store has. If Shopify refuses a free shipping code when it creates the order, the order is still created, without that code.

## Disconnecting your store

To disconnect, open **Integrations > Shopify** and click **Uninstall**. Once you confirm:

* the checkout button in your store stops sending buyers to PagAmerican
* every product and offer imported from Shopify is deactivated in PagAmerican
* the PagAmerican app is uninstalled from your Shopify store automatically, with nothing to do in your Shopify admin

You can reconnect the store at any time by going through the setup again.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Your app is set to open inside the Shopify admin">
    **Embed app in Shopify admin** is still checked on your app. In the Shopify Dev Dashboard, open the app, click **Create version**, uncheck **Embed app in Shopify admin**, release a new version, and open the app again from your Shopify admin. If you created the app somewhere other than the Dev Dashboard, create it again there following the steps above.
  </Accordion>

  <Accordion title="This Secret Key doesn't match this store">
    The **Secret Key** does not belong to the app installed on this store. Check that you copied it from the right app, that it is not the **Client ID**, and that it has no extra spaces.
  </Accordion>

  <Accordion title="A product was imported but cannot be sold">
    Check that the product has an image in Shopify. Without one it stays inactive and never goes to review. If it has an image, it is waiting for PagAmerican's product review.
  </Accordion>

  <Accordion title="A product I archived or deleted in Shopify is still for sale">
    Only **Active** products are for sale. Once you set a product to **Draft** or **Archived**, or delete it, PagAmerican takes it off sale together with all its offers. Buyers who already had the checkout open can still finish that purchase, but a new cart cannot be opened. See [Your catalog stays in sync](#your-catalog-stays-in-sync).
  </Accordion>

  <Accordion title="This cart has a discount that cannot be applied here yet.">
    The checkout couldn't load a discount from the buyer's cart, for example because the discounts add up to more than the cart's value. See [Your discounts apply at checkout](#your-discounts-apply-at-checkout). The buyer can remove the discount from the cart in your store and check out again.
  </Accordion>

  <Accordion title="The checkout stopped leading to PagAmerican after a theme change">
    The PagAmerican checkout is set up in the theme that was published when you connected your store. A copy of that theme made with **Duplicate** in your Shopify admin keeps it. A theme added any other way, such as uploading a theme file or adding one from the Shopify Theme Store, doesn't. Once a theme like that is published, the checkout button opens the Shopify checkout again, and the **Buy it now** and Shop Pay buttons come back.

    To bring the PagAmerican checkout back, choose one of these:

    * **Publish the previous theme again.** If the theme that was published when you connected, or a duplicate of it, is still under **Online Store > Themes**, publish it. The PagAmerican checkout works again right away.
    * **Keep the new theme and contact support.** Email [support](mailto:support@pagamerican.com) with your store's `.myshopify.com` domain, and we set up the PagAmerican checkout on your new theme. You don't need to uninstall or reconnect your store, and your products stay for sale.

    To change your theme without losing the PagAmerican checkout, duplicate the published theme and make your changes on the copy. If you need to publish a theme you uploaded or added from the Theme Store, contact [support](mailto:support@pagamerican.com) right after you publish it.
  </Accordion>

  <Accordion title="Error messages during the connection">
    | Message | What to do |
    | - | - |
    | The connection link expired. Please start again. | The connection has to be completed within 10 minutes of clicking **Install**. Open the app again from Shopify and repeat the credentials step. |
    | We couldn't verify the request from Shopify. Please try again. | Open the app again from your Shopify admin so Shopify sends a fresh request. |
    | The store domain didn't match. Please start again. | The store that returned from Shopify is not the one that started the connection. Start again from the store you want to connect. |
    | This store is already connected to another account. | The Shopify store is connected to a different PagAmerican account. Uninstall it there first. |
    | Shopify rejected the credentials. Check your Client ID and Secret Key and try again. | Copy both values again from **PagAmerican Checkout > App settings** in the Dev Dashboard and paste each in its matching field. |
    | There is already an active setup | The store you are working on in PagAmerican is already connected to a Shopify store. To connect a different Shopify store, use another store in PagAmerican, or uninstall the current setup and open the app again from Shopify. |
  </Accordion>
</AccordionGroup>

## FAQ

**Where do I see the UTM parameters of an order in Shopify?**
Open the order in your Shopify admin and look under **Additional details**. See [Paid orders appear in Shopify](#paid-orders-appear-in-shopify).

**How do I match a Shopify order with its PagAmerican order?**
The PagAmerican order ID is in the Shopify order's **PO number**.

**If I change a price in Shopify, does it change on PagAmerican?**
Yes. Price and compare-at changes in Shopify update the matching offers automatically.

**I archived or deleted a product in Shopify. Is it still for sale on PagAmerican?**
No. Archived, draft and deleted products are taken off sale, with all their offers. See [Your catalog stays in sync](#your-catalog-stays-in-sync).

**I set a product back to Active in Shopify. Is it for sale again right away?**
Not right away. It goes back to PagAmerican's product review and is for sale again once approved. It also needs an image.

**Do my Shopify discount codes work on the PagAmerican checkout?**
Yes. Discount codes, free shipping codes, automatic discounts, buy X get Y, quantity discounts and order discounts all carry over from the cart. See [Your discounts apply at checkout](#your-discounts-apply-at-checkout).

**Do I see the discount code on the Shopify order?**
Yes. The codes the buyer used are on the order in your Shopify admin.

**Can I change my store's theme after connecting?**
Yes. Duplicate your published theme and edit the copy, so the PagAmerican checkout carries over. A theme you upload or add from the Shopify Theme Store doesn't have it, so contact [support](mailto:support@pagamerican.com) after you publish one. See [The checkout stopped leading to PagAmerican after a theme change](#the-checkout-stopped-leading-to-pagamerican-after-a-theme-change).

**Can I connect more than one Shopify store?**
Yes. Each Shopify store is linked to its own store in your PagAmerican e-commerce account.

**What happens to my products if I disconnect?**
Every product and offer imported from Shopify is deactivated in PagAmerican. Reconnecting the store imports your catalog again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.