Search code examples
authorize.netactivemerchantrecurring-billing

How are credit card account cancellations handled by ActiveMerchant recurring payments on Authorize.net?


I'm building a site on Rails using ActiveMerchant to clear payments through Authorize.net. We'd like to support paying for a subscription to the site using recurring credit card payments. The Authorize.net Gateway allows me to setup a schedule of recurring payments on a given interval from a specified date. I see (http://developer.authorize.net/tools/arberrorcodes/) that they will give me an error if the credit card's expiration date is before the start of the recurring payment period, or if the test transaction is not approved at the time that the recurring payment is setup.

What I'm unclear on is how best to handle transaction failures which may occur after the recurring payment has been setup. For example, what if the credit card used to setup the recurring payment is cancelled, or if the account has insufficient funds, before the end of the recurring period.

Should I be proactively checking the status of the subscriptions I have previously created in a cron job? Should I check the subscription status with Authorize.net each time my users login? Is there some other way in which I should expect to be notified if my previously valid subscriptions cease to be so?

Thanks.


Solution

  • Looks like the 'right' solution here is to support Authorize.net's 'Silent Post' callback. This will send transaction status on all cleared and failed transactions every night after they're run.

    However, the status will only be sent once, so if it's not received for any reason, you'll still need to query subscription status through ARB proactively.