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
  1. REFERRAL INTEGRATION
  2. Create New Campaign

Trigger Events

  1. Whenever a success event related to a campaign occurs on the merchant's website, an API call must be made to notify Payram.

  2. Events can be of two types, either those with amount, or without amount. This is configured during campaign creation.

  3. The amount is used to calculate percentage based commission or discount if that is the kind of reward you want to give to your users

  4. To trigger an event for a particular campaign, you will need your API key, the event_key, unique reference ID of the referee and optionally the amount.

  5. This event_key is configured by you during the campaign setup and you can find it after completing the setup if you try to edit a campaign.

Request & Response Example:

curl --location --request POST '<https://payram.resuefas.vip:8443/api/v1/referral/event-log>' \\
--header 'API-Key: The API Key Shared with you.' \\
--header 'Content-Type: application/json' \\
--data '{
    "eventKey": "first_deposit",
    "referenceID": "67890",
    "amount": 345.44
}'
{
  "id": 1,
  "createdAt": "2025-02-08T16:32:31.284023+04:00",
  "updatedAt": "2025-02-08T16:32:31.284023+04:00",
  "project": "1",
  "eventKey": "first_deposit",
  "referenceId": "3456",
  "amount": "345.44",
  "triggeredAt": "2025-02-08T16:32:31.283279+04:00",
  "data": null,
  "status": "pending",
  "failureReason": null,
  "rewardId": null,
  "reward": null
}

PreviousLink Referrers to RefereesNextSmart Consolidation

Last updated 3 months ago