Collect the card information

In old Reader SDK was the ability to collect card data on iOS device and then use them on server for store (card on file). In new MobileReaderSDK I cannot not find any solution to do this.

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Reader SDK Quickstart
Build on iOS
Reader SDK

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

This documentation didn’t help me to find a solution.

In the new Mobile Payments SDK, the process for saving a card on file has changed compared to the deprecated Reader SDK. The Mobile Payments SDK does not include a built-in workflow for saving a card on file directly from the device. Instead, you should use the Cards API to save a card to a customer’s profile.

To save a card on file with the Mobile Payments SDK, you need to collect card information using the Web Payments SDK or In-App Payments SDK to generate a payment token. This token can then be sent to your server, where you can use the Cards API to store the card on file. This approach ensures that card data is securely handled and stored according to PCI compliance standards.

The Mobile Payments SDK focuses on in-person payment processing, and for card-on-file functionality, integrating with the Cards API is the recommended approach.

This answer was reviewed by @Bryan-Square.

According to the Mobile Payments SDK migration docs (“Store a card on file” section), it is supported to save a card on file from a Mobile Payments SDK payment:

The Reader SDK includes a built-in workflow for saving a card on file. The Mobile Payments SDK relies on the Cards API to save a card to a customer’s profile.

  1. To store a card on file with the Mobile Payments SDK:

  2. Authorize a payment with a credit card. This payment can be delayed and canceled later if you don’t want to charge the customer.

  3. Note the payment_id value.

  4. Use the CreateCard endpoint to save the card on file. For more information, see Create a Card on File from a Payment ID.

Could you please confirm that this card-present pattern (Mobile Payments SDK → payment_id → CreateCard) is officially supported?

And just to clarify — is it required to call CreateCard from a backend server, or can this step be done directly from the iOS app?

Yes, that is the correct way to store a card on file with Mobile Payments SDK. :slight_smile:

And just to clarify — is it required to call CreateCard from a backend server, or can this step be done directly from the iOS app?

Yes, it is required to call CreateCard from the server side. :slight_smile:

Thank you for quick response!