How to share minting fees with another address

So I have built an NFT platform that will host multiple drops and each one will have it's own ERC721 contract associated with it. Therefore I will be the contract owner but not the artist. But I want the artist to get their share. How do I go about splitting the minting fees with the artist? In some cases there will be a set percentage and in some cases I was hoping to add an option for minter to tip the artist.

My understanding is that the eth for the minting price I set gets stored in the contract. how can I programmatically send this share or tip to the other person and not all to the contract?

Can I just do the math inside the mint function where I make it payable and send the proper amount to artist's address? Is there a best practice for this?