# Shopify connection

## ⚠️**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="/files/T8D2sisp1TjFLPT2wCmE" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fB24Q8hs9QCJ65VuNAgo" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/iMiLbS8UtvdDR2MJZqaS" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qyX3U2iQsUemHqBm45jo" 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="/files/KkG175ZZHK4zsxbZdC45" 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="/files/vqqbvsKLpbdVSpfwFqrP" alt=""><figcaption></figcaption></figure>

***

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

<figure><img src="/files/lo6JG42LpAUvtcDccQEf" 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="/files/jGKljW23YGOfi6LEvsVm" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/1IGO9Il98V3x7HlcjMAC" 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="/files/iF9a3vgSSUKoP4eJvT2P" 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="/files/VcWdXjD5Fg5bOYBnHNn3" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/HANUB5SlhT9z3MDtZaji" alt=""><figcaption></figcaption></figure>

***

## 6️⃣ Webhook integration

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

### 🌐 Select the Webhooks section.

<figure><img src="/files/u7qcg0QoPKh3UDAlurHO" 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="/files/hjqsagm36AK9TirMxNWb" 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="/files/NsleEZKUyYqCsyKmfSI4" 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="/files/gQ5Xa5DMEMbqBL7G6Irg" alt=""><figcaption></figcaption></figure>

👆 **Select Order Confirmation**

<figure><img src="/files/cpIxPrcdZVQdON1KtVai" alt=""><figcaption></figcaption></figure>

📌Click to the Edit code button

<figure><img src="/files/rHRf3pFU83dOqSjJCJAE" 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="/files/zMRAQ9xWMet2CIOjLE7N" 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="/files/DjRDUngielwRzPScqCK1" 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="/files/QxuwdPD5xN23RPcM5tv3" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/RwFTIFqPVPHwLXOtb1Tt" 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="/files/dDv4bAplj68uoTg75F1w" 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="/files/rpiUweVHYP6TPs7nUfzU" 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="/files/AR9e96AXwu6KrLnReSEG" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brutalscripts.com/site/scripts/premium-shop/shopify-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
