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

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

joshcs.eth ᵍᵐ's photo
joshcs.eth ᵍᵐ
·Feb 2, 2022·

2 min read

  1. Prerequisites to have installed on your device

    • Node.js v14.17.0 or above installed (a JavaScript runtime built on Chrome's V8 JavaScript engine)
    • Yarn (a package manager) installed
    • Two wallets on Phantom, one for receiving funds and one for paying for goods or services. Follow the guide to set up these on Phantom, you will be using these wallets to test the app!
  2. Clone the repository by using either Git or Github CLI and the corresponding commands in your terminal:

    Git ⬇️

     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

  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.

     cd solana-pay/point-of-sale
    

    scrot 2022-02-02 at 12.11.33 AM.png

  4. Install dependencies using Yarn

     yarn install
    

    scrot 2022-02-02 at 12.16.15 AM.png

    🔄 Installation in progress

    scrot 2022-02-02 at 12.16.46 AM.png

    ✅ Installation complete

  5. Start the local development server

     yarn start
    

    scrot 2022-02-02 at 12.17.38 AM.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 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

  8. Enter an amount to charge in SOL scrot 2022-02-02 at 12.24.15 AM.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

  10. Scan the code with your compatible Solana Pay wallet

  11. Verify the transaction in your wallet and select Send
    IMG_6418.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

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

 
Share this