I would like to have an application that allows the management of the payment of an amount (as a percentage or amount) of the commission to a business-getter (or brokers). This could be done by creating an app where the administrator must enter the account paypal of broker, his unique code and the type of the Committee agreed (as a percentage or fixed amount). In this way when a customer selects a plan, will see a field where he can enter the code of broker. Once he has paid, the amount payable to the broker will be sent to his paypal account. Add an option to enable or not the procedure if the amount (appropriately given in the invoice as a negative amount) will be deducted from taxable invoice generated. The parameters of this app should be as those of discount coupon app (total usable quanity, start date and end date, reusable to user, apply on first recurring....)
Be careful: if there is a coupon code that apply a discount this system have to work with the remaining amount. If the discount is 100% this system must not work.
For the last add a control, during purchase the plan, that verify if broker code already exists. If not show a message and not proceed to the subscription. User must correct or delete this data to complete the subscription.