Have a clear agreement in writing in advance.
Just scribbling "I will pay Mesh 4000 quid for a half hour drum & bass set at Alfie's Chipshop on Friday the 13th" on a napkin will save you a shitload of hassle.
A very good idea is to get paid before you play (just before the set). If you can get them to pay beforehand, you won't get fucked.
The nasty promoters will fuck you any chance you get. the friendly promoters might get fucked themselves and not have any money for you anyway...