Question

Is there a billing system that exists where I can have recurring billing every month, and change the amount the client is charged each month using code? For example, one month a user uses our service for one week and is charged $10, but the next week they use the service for 3 weeks and are charged $30, then the following month they use it for weeks and are charged $20. Every system I've looked at you must manually change this value, and I was wondering if there was a system that allowed you to automate this process. Any help would be greatly appreciated, thanks!

Was it helpful?

Solution

I've done this using the PayPal Website Payments Pro API. First you create an initial transaction and retain the ID. Then have a cron run whenever you want to process recurring transactions and process what they call a reference transaction. You pass it the last transaction ID and give it a new dollar value. It'll process another transaction with the same information.

Limitations on PayPal's reference transactions are they can't be older than 12 months from the last transaction and I believe the dollar cap is $10,000.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top