# 💸 How to Set Up Your Own Solana Pay Point-of-Sale (PoS) App

1. Prerequisites to have installed on your device
    - [Node.js](https://nodejs.org/en/) v14.17.0 or above installed (a JavaScript runtime built on [Chrome's V8 JavaScript engine](https://v8.dev/))
    - [Yarn](https://yarnpkg.com/) (a package manager) installed
    - Two wallets on Phantom, one for receiving funds and one for paying for goods or services. Follow the [guide](https://help.phantom.app/hc/en-us/articles/4406388623251-How-to-create-a-new-wallet) to set up these on [Phantom](https://phantom.app/), you will be using these wallets to test the app!
        - Fund your wallet on the `devnet` using [Sol Faucet](https://solfaucet.com/)

2. Clone the [repository](https://github.com/solana-labs/solana-pay) by using either Git or Github CLI and the corresponding commands in your terminal:

   Git ⬇️
    ```bash
    git clone https://github.com/solana-labs/solana-pay.git
    ```
    Github CLI ⬇️
    ```
gh repo clone solana-labs/solana-pay
    ```
![scrot 2022-02-02 at 12.10.46 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643781846743/gkVfKYZJe.png)

3. Change directories into `point-of-sale` using the following command in your terminal. You can use the terminal from step 1 in steps 2-4, I’ve just illustrated what the commands will look like in separate windows.  
  
    ```bash
    cd solana-pay/point-of-sale
    ```
![scrot 2022-02-02 at 12.11.33 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643781924209/k4xE2BuO1.png)
        
4. Install dependencies using Yarn
    
    ```bash
    yarn install
    ```

   ![scrot 2022-02-02 at 12.16.15 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643781993469/WGealwkxtig.png)
   > 🔄 Installation in progress

   ![scrot 2022-02-02 at 12.16.46 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643782013224/bbx-H1IK9J.png)
   > ✅ Installation complete

5. Start the local development server
    
    ```bash
    yarn start
    ```
   ![scrot 2022-02-02 at 12.17.38 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643782052050/CwEwy0kdX.png)
   > 🎉 Your PoS server is running at `localhost:1234`

6. Open up the following link in your web browser. You will need to replace `MERCHANT_ADDRESS` with your receiving wallet’s address and `STORE+NAME` with your desired store name.
    
    `http://localhost:1234/new?recipient=MERCHANT_ADDRESS&label=STORE+NAME`
    
    - One of the neat features of [Solana Pay](https://solanapay.com) is that you will not need to log in with a wallet to run the PoS, so are able to use Safari (or your browser of choice without Phantom installed) to test the PoS out. For example, I’ve used an iPad and navigated to the local server on my network at: `http://10.0.0.156/new?recipient=MERCHANT_ADDRESS&label=STORE+NAME`

7. Your screen will show a Point of Sale (PoS) user interface that looks like the image below:

 ![scrot 2022-02-02 at 12.22.36 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643782469078/U6Dp_7uP_.png)

8. Enter an amount to charge in SOL
 ![scrot 2022-02-02 at 12.24.15 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643782525169/MABsUEShz.png)

9. Select `Generate Payment Code` and you will be taken to a QR code that shows the amount in SOL

 ![scrot 2022-02-02 at 12.24.50 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643782603776/7BDUOQtKO.png)

10. Scan the code with your [compatible](https://github.com/solana-labs/solana-pay#supporting-wallets) Solana Pay wallet
 
11. Verify the transaction in your wallet and select `Send`      
 ![IMG_6418.jpeg](https://cdn.hashnode.com/res/hashnode/image/upload/v1643782641292/rcyUBNFhL.jpeg)

12. In a few seconds, your transaction will be confirmed on both the PoS and in your Phantom wallet! You’ve successfully sent your first transaction using Solana Pay!    

 ![solpay_1.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1643832920779/jVZ6ISe4n.gif)

13. Stay tuned for updates on how to customize and deploy your Solana Pay PoS app!

