Most sales livery yards will want you to pay livery/schooling costs up front, just like on full livery, either by the week or month.
Then you agree what %age the seller will get as commission , sometimes this can be smaller for the 1st week (as they wont have had them long) then go to a std %.
You get paid once horse has sold.
Must have a contract with selling yard to confirm their % of sale, livery costs, farrier, vet bills, entry fees if going out competing, how long horse there etc. Also must include the 'what happens' if the horse is sold and the purchaser wants to return it soon after.
Some people can get 'caught' and find that their horse doesn't sell quickly and that the livery/work fees mount up, so you need to be in a position to either cover these bills or to bring home again.