Have a subscriptions table with a paid_through date column, a payments table for records, and a daily script that selects rows with a paid_through less than or equal to the current date, and makes a charge for those subscriptions. That script implements all the pricing plans, coupons, discounts, dunning mails, etc. I've done that for a half dozen businesses, with millions of dollars in revenue. Is this the "glue script" that isn't clean enough? It doesn't matter what payment gateway/service you use so long as they've got an API for you to store and charge cards; I prefer Spreedly as a wrapper that lets you change payment providers at will.