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:
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?
Use Customer Profiles.
Create an empty profile
Add a payment profile using the /addPayment form action
Get the customer profile and save the payment profile id
Then when you charge, use the customer profile id and payment profile id.
If you let them edit, then use the /editPayment form action URL.
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?