Papaya Finance Protocol
SDKProtocol
  • Introduction
  • Interaction
  • Getting Started
    • Initial Setup
    • Integration Steps
    • Go Live
  • Features
    • Real-Time Payment Streaming
    • Supported Networks
    • Business Dashboard
  • Use Cases
    • For Enterprises
    • For Financial Services
    • For Digital Economy
  • FAQ
  • Glossary
  • Future Development
  • Protocol
    • Common Methods
    • Recurring Payments
    • Subscription Methods
    • Auto Top-up
    • Liquidations
    • Fees
    • Advanced Section
      • Events
      • Subscriptions
      • Projects
      • Signatures
  • SDK
    • Installation
    • Quick Start
    • API
      • PapayaGetter
      • PapayaInteraction
      • PapayaBySigInteraction
Powered by GitBook
On this page
  • Settings
  • setDefaultSettings
  • setSettingsForUser
  1. Protocol
  2. Advanced Section

Projects

Papaya supports project separation, as the protocol was originally designed for platforms rather than individual users.

To utilize this functionality, call the claimProjectId method to assign a unique identifier to your wallet. This ID is necessary for users of your platform and for configuring both general and specific settings for individual users.

function claimProjectId() external

Invoke this method from the wallet where the commission should be directed.

Settings

The Settings structure defines whether settings are applied and specifies the fee amount. It is formatted as follows:

struct Settings {
  bool initialized;
  uint16 projectFee; // of 10k shares
}

setDefaultSettings

Set the default fee settings for all users within your project.

function setDefaultSettings(Settings calldata settings, uint256 projectId)

setSettingsForUser

Allows precise configuration of fees for a specific user, useful for scenarios such as collaborating with key opinion leaders.

function setSettingsForUser(address user, Settings calldata settings, uint256 projectId)

These methods enable the management and fine-tuning of user fee settings for your project. Note that the maximum fee is capped at 20% of the authors’ income on your platform.

PreviousSubscriptionsNextSignatures

Last updated 8 months ago