# PayRam Shopify Plugin

## Part A: Server Setup (Terminal)

#### 1. Get the installation script

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

Go to the PayRam GitHub repository and open the Shopify repo. Copy the bash installation link provided there.

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/PayRam/payram-shopify/main/setup_payram_shopify.sh)"
```

#### 2. Run the script in terminal

> This can be run on any server. It does not need to be the same server where your main PayRam instance is installed.

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

The script will walk you through setup. You can accept all default values unless you have specific configuration needs.

#### 3. Configure HTTPS on port 2798

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

Once installed, you need to expose port `2798` via HTTPS. Use either:

* An **nginx reverse proxy**, or
* A direct **HTTPS configuration** on your server

#### 4. Log in and create your app

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

Open the login page URL shown at the end of the script.

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

Sign in and authenticate with your Shopify credentials.

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

Then run the app creation step in the terminal when prompted.

#### 5. Add your Shopify store URL

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

When asked, enter your Shopify store's URL.

#### 6. Choose a database

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

You can either connect an external database or use the default SQLite option, which works fine for most setups.

#### 7. Install the app to your Shopify dashboard

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

In the terminal, follow the URL to install the PayRam app onto your Shopify store.

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

It will open up in your browser, select Install to continue.

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

Inside the app settings, enter the following:

* **Base URL** - the URL of your PayRam plugin server (from Part A) along with the port number
  * For eg. <https://payram.yourdomain.com:8443>
* **Project API Key** - found in your PayRam dashboard ([access here](https://docs.payram.com/features/payment-apis#managing-api-keys))
* **Payment Method Name** - enter a custom name for the label to be displayed to customers

Once done, click Save Settings.

#### 8. Test the connection

<figure><img src="/files/53fDuoVEM1cPOwW8Q5Xb" alt=""><figcaption></figcaption></figure>

Click Test PayRam Connection to test the connection. A successful response returns an HTTP 200 status, which confirms the connection is working correctly.

***

### Part B: Shopify Dashboard Configuration

#### 1. Add PayRam as a manual payment method

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

Go to: Settings > Payments

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

Select Manual Payment Methods and from the dropdown, select Create custom payment method and set it up as PayRam.

#### 2. Customize your checkout page

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

From the Shopify sidebar, select **Checkout > Customize**. This is where customers will see the PayRam payment option.

The customer flow works like this:

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

Customer selects Pay via PayRam at checkout.

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

They complete the payment on the **Thank You page** after placing the order

> Approve the app and add it to the **Thank You page** so the payment widget appears there.

***

### Part C: Test Payment

Once everything is configured, run a test to confirm the full flow works end to end.

1. Visit your Shopify store
2. Add any item to your cart
3. Proceed to checkout
4. Select **Pay via PayRam**
5. Click **Pay Now**
6. On the Thank You page, enter your email address
7. A PayRam payment link will be generated
8. Complete the payment using the link

If the payment goes through successfully, your integration is live and ready to use.


---

# 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.payram.com/plugins/payram-shopify-plugin.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.
