PAYRAM
API SPECS
  • INTRODUCTION
    • 👋PAYRAM
    • 💡Getting Started
      • Setup
      • YAML Configuration
      • Wallet Configuration
      • Reset Setup
      • Update PayRam Server
      • Check your Database
      • Project API Keys
      • Webhook Integration
      • 🦊Test Wallet Setup
  • PAYMENT INTEGERATION
    • 📪Payments Flow
    • 🎌Integrating Payments
      • Implementing the Payment Form
      • Generating a Payment Link
      • Get Payment Details
      • Checking Payment Status
      • Webhook
  • REFERRAL INTEGRATION
    • 👬Referral Flow
    • Create New Campaign
      • Embed the Referral Dashboard
      • Link Referrers to Referees
      • Trigger Events
  • Fund Management
    • 🛠️Smart Consolidation
    • ⛽GAS Station
    • 👮‍♀️Policy Management
  • DEVELOPERS
    • 🎨API Reference
    • 🧪Test Faucets
  • SUPPORT
    • ⁉️FAQ
      • Deployment FAQ's
      • Configuration FAQ's
      • API Integration FAQ's
      • Fund Management FAQ's
      • Referral FAQ's
      • Debug FAQ's
    • 📅Change Log
Powered by GitBook
On this page
  • 3.1. Configuration
  • 3.2. Projects
  • 3.3. Blockchain Settings
  1. INTRODUCTION
  2. Getting Started

YAML Configuration

3.1. Configuration

Update your basic server settings in the YAML file:

configuration:
  wallet_connect_id: ""
  payram.backend: "http://yourpayramserver.com:8080"
  payram.frontend: "http://yourpayramserver.com:80"
  postal.endpoint: "https://postal.bedpayments.com"
  postal.apikey: "hwVUvX7kCkTyD5hn4KkiN4rh"
  ssl: false

NOTE: Replace "yourpayramserver.com" with either the IP address of the server where you're installing the payram setup, or the domain name to which you've mapped the server's address.

  • payram.backend

    • Explanation : Please enter the URL of the server where PayRam is running, or the domain where Payram is configured. If you’re installing payram for first time then enter the IP address of the current server in which you’re setting up

    • Example: http://IP:8080 or http://yourpayramserver.com:8080

  • payram.frontend

    • Explanation: Please enter the URL of the server where PayRam is running, or the domain where Payram is configured. If you’re installing payram for first time then enter the IP address of the current server in which you’re setting up

    • Example: http://IP or http://yourpayramserver.com

  • wallet_connect_id

    • To obtain a wallet connect id, follow these steps available at https://docs.blockscout.com/setup/configuration-options/walletconnect-project-id-for-contract-read-write

    • Example: 03ec747d98f19c7c89d10605b6586cc3 this is how the wallet connect id looks like


3.2. Projects

This section contains details for each project configured.

projects:
  project1:
    name: "Rare Rabbit"
    website: "http:yourprojectwebsite.com"
    successEndpoint: "http://yourprojectwebsite.com/success" # or use payrams http://yourpayramserver.com:80success 
    webhookEndpoint: "http://yourprojectwebsite.com/webhook" # or use payrams http://yourpayramserver.com:8080/v1/payment/webhook

Project Parameters

  • name

    • Explanation: The name of the project.

  • website

    • Explanation: The project's website URL

  • successEndpoint

    • Explanation : URL where users are redirected after a successful payment.

      Tip: Use your own endpoint or the default Payram endpoint.

      http://yourpayramserver.com:80/success
  • webhookEndpoint

    • Explanation: URL to retrieve transaction details for payments.

      Tip: Use the default endpoint provided by PayRam or set up your own webhook.

      [ Generating a Payment Link with PayRam]

      http://yourpayramserver.com:8080/v1/payment/webhook

You can add more projects by following this format:

Format
projects:
  project1:
    name: "project1 app name"
    website: "project1 website"
    successEndpoint: "url"
    webhookEndpoint: "url"
  project2:
     name: "project2 app name"
    website: "project2 website"
    successEndpoint: "url"
    webhookEndpoint: "url"
  project3:
    name: "project3 app name"
    website: "project3 website"
    successEndpoint: "url"
    webhookEndpoint: "url"
	 #...So on

Note: When adding additional projects, follow this format exactly. Incorrect formatting of YAML keys will result in errors.


3.3. Blockchain Settings

This section configures settings for various blockchains used in the application.

There is no need to change any of the existing configuration values except for the server API key in TRX.

Blockchain

You only need to enter the server_api_key value for TRX

blockchain:
  ETH:
    client: "geth"
    server: "https://ethereum-rpc.publicnode.com"
    server_api_key: ""
    explorer_address: "https://etherscan.io/address/"
    explorer_transaction: "https://etherscan.io/tx/"
    min_confirmations: 2
  BTC:
    client: "bitcoin_core"
    server: "13.210.195.110:8332"
    server_username: "payram"
    server_password: "bitpayram"
  TRX:
    client: "trongrid"
    server: "grpc.trongrid.io:50051"
    server_api_key: ""  #you need to add the key here
Steps to Obtain the TRX server_api_key

  • **Visit the API Provider:**Navigate to TronGrid at https://www.trongrid.io/

  • **Create/Log into Your Account:**Sign up for a new account or log in to your existing one.

  • Navigate to DashboardGo to https://www.trongrid.io/dashboard

    Click on "Create API Key" in the top right corner

    After clicking "Create API Key," you'll get a popup window. Enter your desired API key name and click create.

    You will be redirected to https://www.trongrid.io/dashboard/keys where you can find your API key. If not automatically redirected, navigate to this page manually.

    Click the check button to view the API key you created.

After obtaining the server_api_key, paste it into the blockchain > TRX > server_api_key value

blockchain:
  ETH:
    .......
    .......
    ........
  BTC:
    ......
    .....
    ...........
  TRX:
   .......
   .....
    server_api_key: " paste your api key here in the config file"

After you fill in all the configuration details, your YAML file will look like the example below, but with your own values.

example
SERVER : ""
configuration:
  wallet_connect_id: ""
  payram.backend: "http://yourserver.com:8080"
  payram.frontend: "http://yourserver.com:80"
  postal.endpoint: "https://postal.bedpayments.com"
  postal.apikey: "hwVUvX7kCkTyD5hn4KkiN4rh"
  ssl: false
database:
  postgres.host: "localhost"
  postgres.port: "5432"
  postgres.database: "payram"
  postgres.username: "payram"
  postgres.password: "payram123"
projects:
  project1:
    name: "Rare Rabbit"
    website: "payram.app"
    successEndpoint: "http://yourwebsite:80/success"
    webhookEndpoint: "http://yourwebsite:8080/api/v1/payment/webhook"
blockchain:
  ETH:
    client: "geth"
    server: "https://ethereum-rpc.publicnode.com"
    server_api_key: ""
    explorer_address: "https://etherscan.io/address/"
    explorer_transaction: "https://etherscan.io/tx/"
    min_confirmations: 2
  BTC:
    client: "bitcoin_core"
    server: "13.210.195.110:8332"
    server_username: "payram"
    server_password: "bitpayram"
  TRX:
    client: "trongrid"
    server: "grpc.trongrid.io:50051"
    server_api_key: "170a584b-4139-4150-864a-65e1849cd031"
wallets:
  Ethereum:
    xpub: ""
    deposit_addresses_count: ""
  Bitcoin:
    xpub: ""
    deposit_addresses_count: ""
  Trx:
    xpub: ""
    deposit_addresses_count: ""

Once you’re done with the above configs you can start the server up now go and run the command

rm -f script.sh && curl -sSL -o script.sh https://raw.githubusercontent.com/PayRam/payram-scripts/refs/heads/master/script.sh && chmod +x script.sh && ./script.sh

The script will install all the required dependencies. When prompted, enter an email address and password—these credentials will be used for signing up and logging into the server. This will be actually root details which will be your revenue account inside the payram server.

Note: Be sure to save your email and password in a secure location.

When the script completes, your terminal will display output at the end that looks like the image below:

PreviousSetupNextWallet Configuration

Last updated 29 days ago

💡