Is there a way to create conditional coupons?

My client would like to offer a discount each time a user selects a combination of product a + product b. Is there a way to create a coupon to do this? If not, can I set that up on the cart page and send the new total to MPeC? I can write out the logic, just not sure where to send the updated total.