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

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"}


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?



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:


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?