Hi,
You can use payment method suppliment functionality here.
Initially it will be defaulted from the vendor master, but this can be changed.
Eg. for 40 items you can update payment method suppliment as A and for the remaining as B.
Now APP can be run for these two seperately by placing a check on the free selection.
This will help in the grouping of payments.
Regards,
Jyoti