cancel
Showing results for 
Search instead for 
Did you mean: 

what is the best way to tokenize a credit card and then charge it later?

What is the best way to tokenize a credit card, and then charge it later? 

 

I see that I can call getHostedPaymentPageRequest and then use the token in the response to display a page with an iframe that POSTs the token to https://test.authorize.net/payment/payment.

But, I'm having a couple of problems.

 

1. I'm required to enter a non-zero amount in the getHostedPaymentPageRequest. If I use transactionType=authOnlyTransaction, then it doesn't display the amount on the hosted payment page, but I assume it is going to perform an authorization, and the merchant would pay transaction fees for that transaction. Is that correct? Is there a way to tokenize a credit card without the merchant paying gateway and merchant services transaction fees?

 

2. When the card number is saved on the hosted payment page, it calls my CommunicationHandler.onReceiveCommunication handler with this information:

 

qstr=action=transactResponse&response={"accountType":"Visa","accountNumber":"XXXX1111","transid":"40011483086","responseCode":"1","authorization":"H1CB99","billTo":{"firstName":"Ellen",...,"country":"USA"},"totalAmount":"1.00","dateTime":"3/16/2018 8:30:26PM"}
parent=https://test.authorize.net/payment/payment

 

In order to charge the card later, I believe I would need a credit card token. Isn't that what I would pass in the createTransactionRequest request? How do I get that credit card token?

 

newuser2018
Member
2 REPLIES 2
starrychloe
Member

Thank you for this information; that was very helpful!

 

One more question, is it possible to default the billing address on the addPayment form using this method? I found this post:

 

https://community.developer.authorize.net/t5/Integration-and-Testing/Customize-billing-information-i...

 

which seems to indicate that it is not possible, but the thread is old, so I thought maybe there has been a work-around added since then. Does anyone know of one?