Add some wallets to the list of "Target Wallets", each with an associated percent. After saving, every time any payment arrives at the "Source Wallet" that payment will be split with the target wallets according to their percent.

This is valid for every payment, doesn't matter how it was created.

Target wallets can be any wallet from this same LNbits instance.

To remove a wallet from the targets list, just erase its fields and save. To remove all, click "Clear" then save.

GET /splitpayments/api/v1/targets
Headers
{"X-Api-Key": <admin_key>}
Body (application/json)
Returns 200 OK (application/json)
[{"wallet": <wallet id>, "alias": <chosen name for this wallet>, "percent": <number between 1 and 100>}, ...]
Curl example
curl -X GET {{ request.base_url }}splitpayments/api/v1/targets -H "X-Api-Key: {{ user.wallets[0].inkey }}"
PUT /splitpayments/api/v1/targets
Headers
{"X-Api-Key": <admin_key>}
Body (application/json)
Returns 200 OK (application/json)
Curl example
curl -X PUT {{ request.base_url }}splitpayments/api/v1/targets -H "X-Api-Key: {{ user.wallets[0].adminkey }}" -H 'Content-Type: application/json' -d '{"targets": [{"wallet": <wallet id or invoice key>, "alias": <name to identify this>, "percent": <number between 1 and 100>}, ...]}'