> For the complete documentation index, see [llms.txt](https://docs.brutalscripts.com/site/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brutalscripts.com/site/scripts/premium-shop/shopify-connection.md).

# Shopify connection

Hi there! 👋 We’re excited you’re using Shopify for your Premium Shop! Follow these steps to connect your store to your server quickly.

## ⚠️**Reminder**

You’ll need to subscribe to our monthly plan <mark style="background-color:$warning;">**after setting up your Shopify account.**</mark>\
The integration will only work once your subscription is active.

|                               Monthly                              |                             Semiannualy                            |                               Yearly                               |
| :----------------------------------------------------------------: | :----------------------------------------------------------------: | :----------------------------------------------------------------: |
| <p>25€/month<br><sup><em><strong>300€/year</strong></em></sup></p> | <p>20€/month<br><sup><em><strong>240€/year</strong></em></sup></p> | <p>15€/month<br><sup><em><strong>180€/year</strong></em></sup></p> |

***

## ⚡**Want to** skip **the setup?**

💼 **For a one-time fee, our team will handle all the necessary steps for you!**

All you need to do is **pay the one-time installation fee** [**via this link**](https://sub.brutalscripts.com/#pricing) 🔗 and **open a ticket on our Discord server**. We’ll install the system for you during business hours: **Monday to Friday, 9:00 AM – 5:00 PM (UTC+2)** ✅

### **If not, start here:**

***

## 1️⃣ Create a Shopify Account

If you don’t have one yet, sign up [here](https://www.shopify.com/).

***

## 2️⃣ **Create a New Store**

\
Follow the options shown in the screenshots 🖼️ and at the end, enter **your server’s name**.

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FZgJ1NJab1FZ93eFMZrz7%2Fimage.png?alt=media&amp;token=ad333527-1fa8-42cd-95ad-54d94a677c3c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2Fn2PDfRRXNx22MENhoyPr%2Fimage.png?alt=media&amp;token=7b3cfa93-60ce-43e4-ae7e-be8fc6192f3d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F4YBpw47RhxAcBAqUsw30%2Fimage.png?alt=media&amp;token=aa04318e-9076-4f79-a663-63abfdabec46" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FPXPL98lINLeR8UpgMnBr%2Fimage.png?alt=media&amp;token=4bce742f-5300-4a7e-ab8b-94fe785b8c43" alt=""><figcaption></figcaption></figure>

***

## 3️⃣ Subscribe to the Shopify

Choose the **Basic plan** and start your subscription. 🎉 For the first **3 months, it’s only €1**, and you can **cancel anytime**. ✅

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2Fo0HGb4oUzo8LYD5aETWE%2Fimage.png?alt=media&amp;token=e70c1e43-9f4c-4596-bfb9-f9ee39b9152f" alt=""><figcaption></figcaption></figure>

💡 **Pro tip:** Choosing the annual subscription can save you a lot! 💰

***

## 4️⃣ Create Products

💰 **Product price example:**

If you set the product price to **€10**, the number of points the player receives **depends on the Coin Value setting in the script**. You can edit it in the admin panel.

We store the **net amount the player actually paid**, and when they redeem the code, the net amount will be multiplied by the Coin Value. (e.g., €10 × 100 = 1000 Coins)

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FB6u0PNvgSGrr8lUUe8rG%2Fimage.png?alt=media&amp;token=e71858a1-1440-4626-a2a7-fa8eca9cda3b" alt=""><figcaption></figcaption></figure>

***

Navigate to the Products category and click to the "Add product" button.

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FPOTOp1bJYjFF5Mo9BI7W%2Fimage.png?alt=media&amp;token=a176f0cb-37f3-4a30-8f27-bd19a2594f6a" alt=""><figcaption></figcaption></figure>

Create a product with details like this:\
\
Title: 1000 Points\
Description: 🎉 **1 000 Premium Points** – Spend them in the Premium Shop on **anything you want**!🛒\
Price: 10\
Charge tax on this product: Depend on your tax status\
Track quantity: No\
This is a physical product: No

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FB1TsjhjdXZaKuL5gGRj2%2Fimage.png?alt=media&amp;token=ec7be1e4-597d-4385-9cbd-f1272d191d29" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FHPFHc7HAf60JGVx6ipv4%2Fimage.png?alt=media&amp;token=80e4a429-9d18-48ae-b225-684f99cb96e5" alt=""><figcaption></figcaption></figure>

After the changes click to the "Save" button to save it.

***

🛒 **You can create multiple products** with different prices to suit your server’s needs.

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F7K96DFSVaXJah4gsbMen%2Fimage.png?alt=media&amp;token=e1bf7459-3eb0-468d-9187-07d68b37ba9f" alt=""><figcaption></figcaption></figure>

***

## 5️⃣ Finish the other Setup Steps

💡 **Step by Step:** Follow all the instructions Shopify gives you during setup. ✅\
Complete every required step carefully to make sure your store is fully ready to use. 🚀

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FrO9UqZ45pLxkcVrtnbJK%2Fimage.png?alt=media&amp;token=ecdfe9d3-55bf-495f-b5ba-b98569439436" alt=""><figcaption></figcaption></figure>

<p align="center"> ⬇️</p>

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F2RKRcJxHQ9eLUNMEzemO%2Fimage.png?alt=media&amp;token=3174a93f-5088-4664-b7e1-3a1c994cbd1f" alt=""><figcaption></figcaption></figure>

***

## 6️⃣ Webhook integration

🔔 **Navigate to the Notifications section** in the Settings menu.

### 🌐 Select the Webhooks section.

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FSXVkdlk7Ch6a0ERg8ROB%2Fimage.png?alt=media&amp;token=7329cb6a-9bf5-438d-801b-b7b2c2a54069" alt=""><figcaption></figcaption></figure>

### &#x20;🔗Create Webhook

**Create a new webhook** with the following settings:

* **Event:** Order Payment
* **Format:** JSON
* **URL:** &#x20;

  ```markup
  https://dev.brutalscripts.com/webhook.php
  ```
* **Webhook API version:** unstable ✅

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FYfqObg4b8AUVvl1sRFAP%2Fimage.png?alt=media&amp;token=86abda12-8120-417d-814b-6887d8f90ab4" alt=""><figcaption></figcaption></figure>

📩 **After setting it up, send a test message** to receive your store’s **unique ID**, which we will need. ✅

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FLlil0CzSxAQxSQCshOu2%2Fimage.png?alt=media&amp;token=3360c847-05fe-4d3e-9743-6f77db2fbf81" alt=""><figcaption></figcaption></figure>

***

## 7️⃣ Send Code via Email

🔔 **Navigate to the Notifications section** in the Settings menu.

&#x20;👆 Select the Customer notifications section.

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FWriBkxNYJC5mFzJTgBzm%2Fimage.png?alt=media&amp;token=1395f274-996c-4d99-a0e3-241197296988" alt=""><figcaption></figcaption></figure>

👆 **Select Order Confirmation**

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FWtZBIdmNlKS3pTr3xZhV%2Fimage.png?alt=media&amp;token=45fbf293-d36b-4346-ac63-5d8fa71be6bc" alt=""><figcaption></figcaption></figure>

📌Click to the Edit code button

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FPNADWUuM3wmJFjlYpwXH%2Fimage.png?alt=media&amp;token=baa3019a-ee5e-4d88-96d9-b7fdaef5beea" alt=""><figcaption></figcaption></figure>

⚠️ **Don’t rush!**\
A new line needs to be added to the code. Insert it **after line 12**, right after the `"Thank you for your purchase!"` message (or after your translated version):

<pre class="language-html"><code class="lang-html"><strong>Your code to use ingame: &#x3C;span style="font-weight: bold;">{{ id }}&#x3C;/span>&#x3C;br>
</strong></code></pre>

This will make sure players receive their unique code in the email. ✅

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FqgxelqLI0oCXkswX9Cz7%2Fimage.png?alt=media&amp;token=320942b2-69d3-4a96-b49e-164dca46bbc3" alt=""><figcaption></figcaption></figure>

✅ **After completing this, the email will automatically include a unique code for each transaction, which players can use in-game.** 🎮

**This is the uniq code:**

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FVO1cl95p74z6qIQzz6cl%2Fimage.png?alt=media&amp;token=f923a2d9-5543-41d9-84f3-0e0942625e1b" alt=""><figcaption></figcaption></figure>

***

## 8️⃣ MySQL connection

🖥️ **Open HeidiSQL** and create a new user entry:

* **User name:** `shopify`
* **From host:** `95.138.193.132`
* **Password:** `123456`
* **Allow access to:** **INSERT only** ✍️

⚠️ **Important:** Restrict this account to the IP `95.138.193.132`! This ensures **no one else** can connect to your SQL server without authorization. ✅

Click here to manage the Users👆

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FeEE7nHyG62yGamz19cyh%2Fimage.png?alt=media&amp;token=207cedeb-4ad4-4d4e-9817-fa67bc94dfe2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F5ibLsipODm9WlgDUlNzx%2Fimage.png?alt=media&amp;token=c72b0817-f7ff-4fa6-a954-9638325800dd" alt=""><figcaption></figcaption></figure>

***

## 9️⃣Subscribe to our Plan

💸 Pay for our service — this is the fee for automating Shopify with your FiveM server. If you don’t subscribe, the automation **won’t work**. ⚠️

🔗 **You can subscribe via this link.** ✅

|                               Monthly                              |                             Semiannualy                            |                               Yearly                               |
| :----------------------------------------------------------------: | :----------------------------------------------------------------: | :----------------------------------------------------------------: |
| <p>25€/month<br><sup><em><strong>300€/year</strong></em></sup></p> | <p>20€/month<br><sup><em><strong>240€/year</strong></em></sup></p> | <p>15€/month<br><sup><em><strong>180€/year</strong></em></sup></p> |

👉 **You need to fill out these fields.**

* Your server's **IP address**.
* **Your server’s database name** (for example: `esx`, `qbcoreframework_5ccad`, or `server`)
* Your shopify domain name, for example: **server-name.myshopfy.com** or **custom domain**.

**Filling these out correctly requires an automated process. If any of them fail, please open a ticket through this link on our** [**Discord server**](https://discord.com/invite/pMwT5fTQ)**.** ✅

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2FVPotDH5L1mSC8alNnSWP%2Fimage.png?alt=media&amp;token=041e8bbc-f0bd-4911-a452-494b0a203cc2" alt=""><figcaption></figcaption></figure>

### What is my **server’s database name?**

You need to provide the value that corresponds to `esx` on my server.

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F8SdjkE1AdXOq3fQgsp6H%2Fimage.png?alt=media&amp;token=f573f979-9a87-4def-9ded-f3904fd9c06a" alt=""><figcaption></figcaption></figure>

***

## ✨ Optional features

### 🌐 Custom Domain

⚙️ **Go to the Settings menu and select the Domains category.**

🔗 There, you can **connect an existing domain** to your store or **purchase a new domain** for your new store. ✅

<figure><img src="https://4039149930-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7v0UUR2mr3gc8OlYzKhO%2Fuploads%2F92jtaONTMwGVGLlQOoKJ%2Fimage.png?alt=media&amp;token=f06e1685-d052-4a6d-a67f-26eae150e0ac" alt=""><figcaption></figcaption></figure>
