cancel
Showing results for 
Search instead for 
Did you mean: 

Re-billing after a card expired?

I have the following scenario:

 

A user signs up to the site and wants to subscribe to pay yearly and provides a credit card that will expire within this year, how can I automatically re-bill that customer after a year? I also need to make sure the initial first year gets billed correctly during the signup.

 

I guess I can't and he needs to provide a new card after that year?

 

Which API would I use for that? CIM?

burzum
Contributor
5 REPLIES 5

CIM would probably be easiest to deal with, yes. You can use hosted CIM for the profile management, keeping your security exposure low, then use regular CIM with an automated routine to generate applicable charges, and if a charge fails, generate an email to the customer asking him to go to a page on your site where he can update his credit card (the actual form would be an iframe popup hosted by Authorize.net).

TJPride
Expert

Thanks for your answer!

 

Weanwhile I figured out that this should also work with the AIM API and with this I won't have to use the whole profile management story. Is this also correct?

 

The following test code works and the response is successfully but I'm not sure if the billing is set up as I want it? I did this based on the AIM_guide_XML.pdf documentation. If not I will have to fall back to the CIM solution.

 

		$Aim = new AuthorizeNetAIM(API_LOGIN_ID, TRANS_KEY);
		$Aim->setFields(array(
			'amount' => $data['Fee']['price'],
			'card_num' => $data['Card']['number'],
			'card_code' => $data['Card']['code'],
			'exp_date' => '2012-06',
			'first_name' => $data['User']['first_name'],
			'last_name' => $data['User']['last_name'],
			'address' => $data['User']['address'],
			'city' => $data['User']['city'],
			'state' => $data['User']['state'],
			'zip' => $data['User']['zip'],
			'phone' => $data['User']['phone'],
			'email' => $data['User']['email'],
			'description' => $data['Fee']['description'],
			'recurring_billing' => 'yes'));
		$response = $Aim->authorizeAndCapture($amount, $data['Card']['number'], $expires);
		debug($response);

 

The recurring billing flag is an informative one and tells Authorize.net whether they should validate the data or whether it's already been validated. It does not set up a subscription.

 

Indicating marker used by merchant account providers to identify transactions which originate from merchant hosted recurring billing applications. This value is not affiliated with Automated Recurring Billing.

Thanks again for your help. So there is no way to set up a subscription using the AIM API?

 

I would appreciate it if I could use the AIM API because implementing CIM would be a lot more work it seems and if I got that right, I would have to store a reference to the CIM profile locally for my user?

Correct. However, you would not have to either store credit card info or re-enter it for every charge.