In the daily “Settlement Business” there are cases whereby received funds must be directed automatically to the supplier but keeping a commission for the “deal maker”. Of course the buyer must not know the supplier.
This can be done with the “Split Payment” functions defined in the Settlement Namespace.
To create a “Split Payment” you use function: CreateSplitPayment with the following input parameter:
SenderAddress: The account to be used to create the “SplitPayment” contract. Note that “Password” must match that account.
RecipientAddress: The beneficial address who receives the funds minus the commission. The beneficial can also be a Self-Sovereign Identity.
SplitRate: The percentage SenderAddress should receive. Since we support many after comma digits please note that 1% is equivalent to a split rate of 1000000.
DealAlias: Optional alias for the deal.
Password: Password which must match “SenderAddress”.
The function returns a comma separated list of two parameters. The first one is the transaction hash. The second on is the the “SplitDealAddress“. Everything transferred to that address will be split and forwarded according to the contract.
To read the rate of a “Split Payment” you need to call function: GetSplitPaymentRate which with the parameter “SplitDealAddress“.
If you need to change the “SplitRate” you need the function “ChangeSplitPaymentRate” with the following input parameter:
SenderAddress: The account to be used to create the “SplitPayment” contract. Note that “Password” must match that account.
SplitPaymentAddress: The second parameter of the return value of CreateSplitPayment.
NewRate: The percentage SenderAddress should receive. Since we support many after comma digits please note that 1% is equivalent to a split rate of 1000000.
Password: Password which must match “SenderAddress”.
If you need to change the “RecipientAddress” you need the function “ChangeSplitPaymentRecipient” with the following input parameter:
SenderAddress: The account to be used to create the “SplitPayment” contract. Note that “Password” must match that account.
SplitPaymentAddress: The second parameter of the return value of CreateSplitPayment.
NewRecipient: The new beneficial address who receives the funds minus the commission. The beneficial can also be a Self-Sovereign Identity.
Password: Password which must match “SenderAddress”.
Get Started
It is very easy to get started. All you need are some initial coins. Request them from info@codeb.io or use our test account HERE.
You can also use our Wallet and go to https://ssi.codeb.io/newdeal.aspx
To make testing easier we created a test account for you:
Address/Login: 0x8274d660759f3baba9c9f1aa748c1dae956966f1
Password: test