13 ms·
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
by dangrossman 8y ago
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.
- jurgenwerk 8y agoI second this. Just do it yourself with a cron job. It can be really simple in the beginning, and very flexible later when you need it. As your business grows, your charging can quickly get complicated. Think custom subscriptions with conditional coupons, multi-currency, custom pro-rating, special discounts with specific conditions. With your own charging solution, you can do all these with ease. But if you off-load billing and charging schedule to an external service (and use webhooks or reverse APIs), you will quickly discover you're pretty limited.