RefKit Docs
Business Guide

Campaign Lifecycle

End-to-end lifecycle from funding verification to reward payout readiness.

Lifecycle Overview

  1. Verify business funding (POST /business/funding/verify).
  2. Configure spend and referral rules.
  3. Define events and activate programs.
  4. Ingest referrals and reward-eligible conversions.
  5. Move rewards from PENDING to CLAIMABLE and eventually CLAIMED.

Funding Verification

POST /business/funding/verify accepts:

{
  "txHash": "0x...",
  "companyId": "optional-string"
}

Validation rules:

  • txHash must match 0x + 64 hex characters.
  • Transaction must target configured distributor contract.
  • Transaction must have non-zero value and successful receipt status.

Reward Status Model

Defined in Prisma RewardStatus:

  • PENDING
  • CLAIMABLE
  • PROCESSING
  • CLAIMED
  • EXPIRED

Business operations should monitor transitions and reserve balance impact:

  • totalReservedWei tracks commitments.
  • totalPaidWei increases after claim completion.

Event Programs

Business events (/business/events) support:

  • name
  • description
  • metadataFields
  • status (ACTIVE or INACTIVE)

SDK ingestion only allocates referral rewards when event is active and event/referral conditions are satisfied.

On this page