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
  • Step 1: Fetch a New API Key for Your Root Account
  • Step 2: Generate API Keys for Your Projects
  • Usage of the Project API Key
  • Next Steps
  1. INTRODUCTION
  2. Getting Started

Project API Keys

Integrating PayRam into your project starts with generating API keys. These keys are essential for:

  • Validating webhook calls to your application server

  • Requesting payments from your application server

Currently, the API key generation feature is a work in progress (WIP) in the PayRam dashboard. In the meantime, you can use the following APIs to generate an API key for your project.

Step 1: Fetch a New API Key for Your Root Account

Use the following API to generate a root-level API key for your account.

curl --location --request POST '<http://yourpayramserver.com:8080/api/v1/signin>' \\
--header 'Content-Type: application/json' \\
--data-raw '{
    "email": "yourpayramroot@email.com",
    "password": "******"
}'
{
    "id": 17,
    "createdAt": "2025-02-22T13:01:27.83378+04:00",
    "updatedAt": "2025-02-22T13:01:27.83378+04:00",
    "key": "f8fee50cc87bd162a08adc48880f63e4",
    "status": "active",
    "memberID": 1,
    "member": {
        "id": 1,
        "createdAt": "2024-06-14T10:40:37.51185+04:00",
        "updatedAt": "2025-02-22T13:01:05.817849+04:00",
        "name": "",
        "email": "yourpayramroot@email.com",
        "customer_id": "root",
        "level": 0,
        "group": "vip-0",
        "state": "active",
        "username": null,
        "memberType": "internal"
    },
    "externalPlatformID": null,
    "roleID": 1,
    "role": {
        "id": 1,
        "createdAt": "2024-06-14T10:39:34.088215+04:00",
        "updatedAt": "2025-02-21T23:21:14.676546+04:00",
        "name": "root",
        "displayName": "Root",
        "permissions": null,
        "members": null,
        "description": "Root role has all permissions"
    },
    "metadata": ""
}

Step 2: Generate API Keys for Your Projects

Once you have the root API key (for example api key f8fee50cc87bd162a08adc48880f63e4 from the previous response , use it to generate API keys for individual projects added during the PayRam setup.

🔹 externalPlatformID: A numeric identifier representing your projects:

  • 1 for the first project

  • 2 for the second project

  • and so on...

curl --location --request POST '<http://yourpayramserver.com:8080/api/v1/api-key>' \\
--header 'API-Key: f8fee50cc87bd162a08adc48880f63e4' \\
--header 'Content-Type: application/json' \\
--data '{
    "externalPlatformID": 1,
    "roleName": "platform_admin"
}'
{
    "id": 18,
    "createdAt": "2025-02-22T13:07:30.537894+04:00",
    "updatedAt": "2025-02-22T13:07:30.537894+04:00",
    "key": "ad9db0a5e2e720eaa07a573b4142b51b",
    "status": "active",
    "memberID": null,
    "externalPlatformID": 2,
    "externalPlatform": {
        "id": 2,
        "createdAt": "2024-06-14T10:40:37.565272+04:00",
        "updatedAt": "2024-06-21T12:42:42.633423+04:00",
        "name": "abc",
        "logoPath": "",
        "brandColor": "#000000",
        "website": "<http://yourprojectwebsite.com>",
        "successEndpoint": "<http://yourprojectwebsite.com/success>",
        "webhookEndpoint": "<http://yourprojectwebsite.com/webhook>",
        "frontendEndpoint": null
    },
    "roleID": 3,
    "expireAt": "2025-05-23T13:07:30.533941+04:00",
    "role": {
        "id": 3,
        "createdAt": "2024-06-14T10:39:34.097124+04:00",
        "updatedAt": "2025-02-21T23:21:14.678036+04:00",
        "name": "platform_admin",
        "displayName": "Platform Admin",
        "permissions": null,
        "members": null,
        "description": "Platform admin role has all permissions except edit and update smart contracts"
    },
    "metadata": ""
}

Usage of the Project API Key

The generated project API key (ad9db0a5e2e720eaa07a573b4142b51b) must be used for:

✅ Webhook validation

✅ Generating payment links

This API key remains valid indefinitely for your project setup until you disable it from payram dashboard


Next Steps

  • Securely store your API keys and do not expose them in public repositories.

  • Use the project API key for making authorized API requests within your PayRam integration.

  • Stay updated with the PayRam dashboard for managing API keys when the feature is officially released.

PreviousCheck your DatabaseNextWebhook Integration

Last updated 3 months ago

💡