Create credit card from a form

How do I add a credit card to an existing client from a custom registration form?

The idea is to use PHP to post the credit card data to Square and other data to my own database. Is that even possible? All I have found is a form to make payments, not to create a credit card.


With Square the Web Payments SDK is used to tokenize the card. With the returned token you can either charge the card or save the card on file with the Cards API. You’ll first need to tokenize the card then with the returned token you’ll call CreateCard to store the card on file. :slightly_smiling_face:

Can this token and api be used to retrieve the full card information?

For context, I am working with a travel agency to build their web portal. The agents are frequently required to make payments over the phone to vendors (hotels, etc) on behalf of their clients. I would like for them to be able to input the card details into Square, store the token inside of our secure DB, then use a specific secured portal to retrieve the card information from Square to relay on to the vendor over the phone.

Once the card is tokenized the card full information isn’t retrievable. This is for security. :slightly_smiling_face:

1 Like