Guides
Programmable rules
Split incoming money into pockets automatically.
A rule has a trigger, an action and a target pocket. Today the action is split: move percent (1–100) of the incoming amount into the pocket.
| Trigger | Fires when |
|---|---|
invoice.paid | One of your invoices is paid |
transfer.received | You receive a transfer |
bash
curl -X POST https://dapp.railpay.app/v1/rules \
-H "Authorization: Bearer $RAILPAY_KEY" \
-H "Content-Type: application/json" \
-d '{ "trigger": "invoice.paid", "action": "split", "pocket_id": "<pocket id>", "percent": 20 }'Each split is a rule ledger entry, so it shows in Activity next to the payment that triggered it. Rules can be paused with PATCH /v1/rules/:id or deleted.