Currently I am offering on-site payment with a credit card using PayU's Enterprise API for order checkout. What would be the best way to actually retrieve and preload the credit card fields for returning users?

It is recommended that the merchant website does NOT store the user's credit card details. Is there perhaps any other possible way to achieve this?


Let me first start by saying you should not store users' credit cards data on your servers under any circumstance. True PCI compliance is super expensive to initially setup and to maintain.

Having said that I am not familiar with PayU's API but I can speak from other payment gateway experience. If your payment gateway supports the feature you will want to implement a token system. This basically works in a few steps:

  1. The user goes through the checkout process and enters CC details on your site and opts to save the CC number for future purchases.
  2. Depending on the API either you will need to create a token on your end through js/php and pass that along or you send the CC details to the payment gateway and they create the token and send it back to you for storage.
  3. When a user comes back in the future you will need to transmit the token over to them and they will process the order as normal.

That is a fairly simple explanation of the steps but should be a good starting point. I know of a few gateways that support this Stripe (doc example), Authorize.net, & PayPal Pro (PayPal's Reference Transactions API).

The Store support team can chime in if I am wrong but I don't think that any of the default gateways support using Tokens currently and I imagine you will have to write an extension and your payment gateway extension to allow Store to handle this properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.