Take a Cash Payment

Link to section

Authorize your mobile application

The Reader SDK must be authorized to collect payments. To get started quickly, get a mobile authorization code for your Reader SDK sample application.

  1. Open the Developer Dashboard and choose the Reader SDK sample application.

  2. In the left pane, choose Reader SDK, and then choose the Generate Mobile Auth Code button.

    A graphic showing the Generate Mobile Auth Code window, which includes a scannable QR code and text authorization code.

  3. For use on a virtual device, copy the mobile authorization code that is generated.

  4. For use on a physical device, keep the QR code open for option 2, step 4.

Link to section

Option 1: Take payment on a virtual device

  1. Build and run your application on a virtual device (Android Emulator or iOS Simulator) and grant any device permissions requested.
  2. Open the Reader SDK sample application.
  3. Choose Enter Code Manually in the sample application.
  4. Paste the mobile authorization code into the field provided.
  5. Choose the Charge $1.00 button to complete a cash transaction.
  6. View the transaction details in the Seller Dashboard.

A graphic showing the three mobile application pages created by the Reader SDK for authorizing the mobile device and taking a payment.

Link to section

Option 2: Take payment on a physical device

  1. Build and deploy the sample application to a physical device. If you run into difficulty deploying the application to a physical device, see Run an app on a device for Xcode and Create your first Android app for Android Studio.
  2. Grant any device permissions requested.
  3. Open the Reader SDK sample application.
  4. Choose Scan QR Code in the sample application and grant the application Camera permissions.
  5. Scan the QR code from the Square application settings page.
  6. Choose the Charge $1.00 button to complete a cash transaction.
  7. View the transaction details in the Seller Dashboard.

A graphic showing the three mobile application pages created by the Reader SDK for authorizing the mobile device and taking a payment, with the second page showing an authorization QR code.

Important

Before building the sample application, open the General tab for your application target and change the Bundle identifier to a unique string. Square recommends appending .YOUR_NAME to the existing ID.

Apple registers bundle IDs to developer accounts when building applications to a device from Xcode. The bundle ID in the sample application is already registered to Square, so you must change it or you get an error that the ID is already taken.