💸
Fundme
  • Getting Started
  • Using Fundme.js
    • Basic Web Monetization
    • Revenue Sharing
    • Advanced Revenue Sharing
    • Split Money (WIP)
    • Fundme.js Custom Syntax
  • Implementation
    • With bundlers (Webpack, Rollup, etc)
    • Inject to HTML
    • Inject JSON to HTML
    • Calculating revenue sharing Server-Side
  • Integration
    • With no ads feature
    • With premium content
    • With Patreon (maybe?)
    • With Merchandise POD services
Powered by GitBook
On this page

Was this helpful?

  1. Using Fundme.js

Split Money (WIP)

This feature is introduced in Fundme.js v0.1.7.

PreviousAdvanced Revenue SharingNextFundme.js Custom Syntax

Last updated 4 years ago

Was this helpful?

Fundme.js can reuse revenue sharing weights established beforehand to split a fixed amount of number. For example, when a page calls fund() that share among five payment pointers with the same weight, splitting 100 amount will return an array with five objects, each contains 25 (100 divided by 5 payment pointers) point each.

import { fund, splitFund } from "fundme";

fund([
    "$wallet.example.com/test-1",
    "$wallet.example.com/test-2",
    "$wallet.example.com/test-3",
    "$wallet.example.com/test-4",
    "$wallet.example.com/test-5"
]);

// sometimes later on
splitFund(100);

Currently, there are limited usage and use cases for splitting money this way, as revenue sharing in payment processors itself is a rare case. This feature should be preserved in case improvement on infrastructure of web payment (e.g., , ) make it easy to split payment across multiple recipients.

OpenPayment
Interledger Payment Method - unofficial draft