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.
1
import { fund, splitFund } from "fundme";
2
โ€‹
3
fund([
4
"$wallet.example.com/test-1",
5
"$wallet.example.com/test-2",
6
"$wallet.example.com/test-3",
7
"$wallet.example.com/test-4",
8
"$wallet.example.com/test-5"
9
]);
10
โ€‹
11
// sometimes later on
12
splitFund(100);
Copied!
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 modified 1yr ago
Copy link