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

# PayRam Shopify Plugin

This guide walks you through connecting PayRam as a payment method on your Shopify store. It has three parts: setting up the plugin server, configuring it in Shopify, and testing your first payment.

## Part A: Server Setup (Terminal)

#### 1. Get the installation script

<figure><img src="https://3861722996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwm1DIvbGMREWT1TdLPtz%2Fuploads%2FVrEusd2nuqIFqukpNrul%2Fimage.png?alt=media&amp;token=02e6318d-e797-4cc2-b95a-e131de07001a" 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.

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

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

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

Sign in and authenticate with your Shopify credentials.

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

#### 5. Add your Shopify store URL

When asked, enter your Shopify store's URL.

#### 6. Choose a database

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

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

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

Inside the app settings, enter the following:

* **Base URL** - the address of your PayRam server, the same one you use for the dashboard. It must be HTTPS, with no port and no path — the app adds the API path itself.
  * For eg. <https://payram.yourdomain.com>
* **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

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

Go to: Settings > Payments

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

#### 2. Customize your checkout page

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

The customer flow works like this:

Customer selects Pay via PayRam at checkout.

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.
