Getting status on canceled/expired credit cards for recurring billing with authorize.net

余生长醉 提交于 2019-12-11 09:33:49

问题


We're setting up a system that will use the XML API for Automated Recurring Billing with Authorize.net.

It looks simple enough to set up a recurring billing. But we have two features that do not seem obvious * providing customers with details on individual payments * providing notification to customers of expired/canceled cards

Anyone familiar with a mechanism to retrieve this info in automated form? We're considering * just listing out assumed payments based on our own calculations the start date * emailing customers based on the expiration date of the ards

But I'm stymed on how to figure out when a transaction failed due to canceled card (and automatically notify the customer).

Can anyone comment on how they handled this issue when implementing a subscription-based service based on Authorize.net?


回答1:


Authorize.Net has recently published a new ARB method "ARBGetSubscriptionStatus".

You may now easily query the status of a previously submitted ARB subscription without the need to depend on the "Silent Post Method".

Example:

<?xml version="1.0" encoding="utf-8"?> <ARBGetSubscriptionStatusRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>mytestacct</name> <transactionKey>112223344</transactionKey> </merchantAuthentication> <refId>Sample</refId> <subscriptionId>100748</subscriptionId> </ARBGetSubscriptionStatusRequest>



回答2:


You want to use Authorize.Net's silent post feature. It will notify you of all payments made through their system including declines and expired credit cards. Your script will then be able to suspend accounts and/or notify your customers that their payments has failed.

See these link for more info:

Handling Authorize.Net ARB Subscription Failures

All About Authorize.Net’s Silent Post

Handling Authorize.Net Silent Post with PHP




回答3:


You need to use the Silent POST URL

ARBGetSubscriptionStatusRequest will not work. If the first transaction (or first transaction since the ARB profile was updated, either via API or manually) fails, the status of the subscription is set to suspended. Otherwise, the status of a subscription does not change when a transaction declines or a card expires.

Using the Silent POST URL, you'll be notified of successful transactions and you can use them to update your data such as tracking a next payment due date/expiration date. You can then run a cron job and if this field has not been updated, you will know that the card was cancelled or expired.

In the event that it is still an active card but gets declined, you'll get notified as such at the Silent POST URL



来源:https://stackoverflow.com/questions/1997942/getting-status-on-canceled-expired-credit-cards-for-recurring-billing-with-autho

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!