Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 2
Registered: ‎01-09-2018
Accepted Solution

Can't validate a credit card

Our users can sign up for our products months before they are available. When we take their order, we want to take their credit card information and pass it to the Authorize.Net CIM, then charge the card more than 30 days later when the item is ready. All we initially want to do is verify that the credit card account exists. I have tried passing a zero dollar authorization through the API, but I get the error, "Amount is invalid." After searching, I read that just passing the card info into the CIM validates the card, but only when using the production environment. If that is the case, how do I test someone entering an invalid card in the sandbox? 


Accepted Solutions
Solution
Accepted by topic author shaunroot
‎01-18-2018 07:18 AM
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: Can't validate a credit card

[ Edited ]

Hi @shaunroot

 

Your requirment over here is to validate the credit card while creating the Customer Profile.

So when you pass on the credit card information to CIM for profile creation, also pass the validationMode as liveMode like this 

 

<validationMode>liveMode</validationMode>

  

When you create a profile using liveMode, Authorize.Net will automatically submit a zero-dollar or one-cent transaction (depending on card type and processor support) to confirm the card number belongs to an active credit or debit account.  Only if the transaction was successful will the customer profile be created.

You can even test this in sandbox using the test cards numbers, please refer to our Sandbox Testing Guide  for more details on it.

 

Hope this Helps !

View solution in original post


All Replies
Solution
Accepted by topic author shaunroot
‎01-18-2018 07:18 AM
Authorize.Net Expert
Posts: 75
Registered: ‎07-27-2016

Re: Can't validate a credit card

[ Edited ]

Hi @shaunroot

 

Your requirment over here is to validate the credit card while creating the Customer Profile.

So when you pass on the credit card information to CIM for profile creation, also pass the validationMode as liveMode like this 

 

<validationMode>liveMode</validationMode>

  

When you create a profile using liveMode, Authorize.Net will automatically submit a zero-dollar or one-cent transaction (depending on card type and processor support) to confirm the card number belongs to an active credit or debit account.  Only if the transaction was successful will the customer profile be created.

You can even test this in sandbox using the test cards numbers, please refer to our Sandbox Testing Guide  for more details on it.

 

Hope this Helps !

Member
Posts: 2
Registered: ‎01-09-2018

Re: Can't validate a credit card

This is exactly what I needed to know. Thanks!

Member
Posts: 2
Registered: ‎09-21-2021

Re: Can't validate a credit card


@shaunroot wrote:

Our users can sign up for our products months before they are available. When we take their order, we want to take their credit card information and pass it to the Authorize.Net CIM, then charge the card more than 30 days later when the item is ready. All we initially want to do is verify that the credit card account exists. I have tried passing a zero dollar authorization through the API, but I get the error, "Amount is invalid." After searching, I read that just passing the card info into the CIM validates the card, but only when using the production environment. If that is the case, how do I test someone entering an invalid card in the sandbox? 


Did you ask in the context in Card validation checker then i use nanso cc in this website i can check card is good to go or not.