Split Money (WIP)

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

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., OpenPayment, Interledger Payment Method - unofficial draft) make it easy to split payment across multiple recipients.

Last updated