Customize the Checkout Amount Deprecated

Applies to: Reader SDK - AndroidReader SDK - Android | Reader SDK - iOSReader SDK - iOS

Learn how to customize a checkout amount for a credit card transaction.

Warning

The Square Reader SDK is deprecated and will be retired on December 31, 2025. The SDK is no longer receiving new releases and support for new operating systems isn't guaranteed.

The Mobile Payments SDKMobile Payments SDK launched as the successor of the Reader SDK and is now in General Availability (GA). To ensure continued support and functionality, you should migrate your application from the Reader SDK to the Mobile Payments SDKmigrate your application from the Reader SDK to the Mobile Payments SDK before the retirement date.

Link to section

Overview

Before trying a credit card transaction, try updating the sample code to change the checkout amount.

  1. Open ./ReaderSDKSample/Screens/PayViewController.swift in the sample application.
  2. In the PayViewController class, change the value of the amount property from $1 USD to $2 USD. As with other Square solutionsAs with other Square solutions, the Reader SDK specifies monetary amounts in the smallest currency unit of the associated currency code, so $2 USD is specified as 200 cents.
    Copy
    private let amount = 200
  3. Rebuild the sample application.
  4. Choose the Charge $2.00 button to complete a new cash transaction.
  5. View the transaction details in the Square DashboardSquare Dashboard.
Link to section

See also

On this page