PayPal Recurring Payment Processing Improvements

Payments Remain Unprocessed After E-Commerce Upgrade

In making their e-commerce enhancements Infusionsoft merged products and subscriptions so that each subscription has a ‘parent’ product record. Infusionsoft created these new parent products automatically as part of the upgrade process which took in place in early January 2012.

However they did not document all the database changes and this caused pain for anyone using the InfusionsoftAPI to handle Subscription payments. The SubscriptionBoss plugin was no longer able to identify which subscription invoice to make a recurring payment against since Infusionsoft had changed what they put in the ProductSold field on the Invoice table: instead of the CProgramId they populated it with the new ProductId and did not provide a mechanism to find the new ProductId based on the CProgramId.

A couple of days after the initial rollout, Infusionsoft’s Development Forum Moderator Justin Gourlay initiated the addition of ProductId, CProgramId and SubscriptionPlanId to the RecurringOrder table which makes it possible to associate invoices, orders, subscriptions and products.

SubscriptionBoss now makes use of the new fields on the RecurringOrder table to match incoming recurring payments with Infusionsoft Subscription Invoices.

Invoice Allocation of Outstanding Payments

When I made these changes I also took the opportunity to add a new feature which is to handle over-payments and outstanding payments.

This will typically arise in the scenario where a payment failure takes place one month and it still overdue at the time of the following month’s payment. PayPal can be set up to collect the outstanding balance so when the following month’s payment is due it will collect double the normal monthly amount.

Under the previous version of SubscriptionBoss the double amount would be credited against the older invoice (showing a credit) and current invoice would remain unpaid. With the new version, the payment is used to clear the older invoice and then the remainder is allocated the current invoice. This process of applying payment to the oldest debt will work across many outstanding invoices for the same subscription as long as the funds are available.

The other way that an outstanding balance can be collected is by logging into PayPal and clicking the ‘Collect Outstanding Amount’ button. This will submit a job to try and collect an outstanding balance on a specific agreement. This can cover one or more missed payments. The IPN will appear after an hour or so and will be processed exactly as described above.

Automatic Processing of Refunds for Recurring Payments

Previous versions of SubscriptionBoss handled processing of refunds for single product payment by making a credit against the correct invoice. In the current release, this feature has been extended to work for recurring payments.

After making the invoice credit it will (as before) call the “refund” action set which you may want to use typically to do some tagging and possibly send an email.

Leave a Reply