ReaderSDK - ERROR: Invalid customer ID

I have a question about the ReaderSDK.

I’ve authenticated a user via OAuth, and using their access token I’ve created a customer linked to their account.

I would like use the ReaderSDK to save a card on file, but when I pass the ID of the newly created customer I get the following error:

vvvvv SQUARE ERROR vvvvv

ERROR: Invalid customer ID. The customer may have been deleted on another device.

DEBUG CODE: store_customer_card_invalid_customer_id

DEBUG MESSAGE: Invalid customer ID. Check that you are passing a valid customer ID for the authorized location, and that the customer has not been deleted prior to calling presentFromViewController:.

^^^^^ SQUARE ERROR ^^^^^

I know that the Customer ID is valid because I can see it in the authenticated user’s dashboard.

Can the Reader SDK because for a SaaS type product or is it limited to only working with the Square account of the developer making the app that integrates the Reader SDK?



Are you saving this customers card on file to your developer account or are you saving the card to the customers Square account?

Hey Bryan, thanks for asking. I was attempting to connect an actual Square customer’s account.

I just realized that I was using a mobile auth code that I had generated from the dev portal. After I switched that auth code out for one generated with the location ID of the Square customer everything worked as expected. Problem solved :slight_smile: