# Package-level declarations

Classes to collect payments.

## Types

AdditionalPaymentMethod
Link copied to clipboard
sealed class AdditionalPaymentMethod

A description of a payment method that is not via a card reader.

Card
Link copied to clipboard
class Card : Parcelable

Information about the card used in a purchase.

CardPaymentDetails
Link copied to clipboard
sealed class CardPaymentDetails

Details about a successful card payment.

CashPaymentDetails
Link copied to clipboard
class CashPaymentDetails(val buyerSuppliedMoney: Money, val changeBackMoney: Money)

Details about a successful cash payment.

CurrencyCode
Link copied to clipboard
enum CurrencyCode : Enum<CurrencyCode>

Represents a currency. Currencies are identified by their ISO 4217 currency codes.

DelayAction
Link copied to clipboard
enum DelayAction : Enum<DelayAction>

Actions possible when an authorized payment is neither canceled nor completed in time.

Money
Link copied to clipboard
class Money(val amount: Long, val currencyCode: CurrencyCode)

A representation of a specific amount of money.

OfflinePaymentQueue
Link copied to clipboard
interface OfflinePaymentQueue

A queue of offline payments taken on this device that have not yet been uploaded to the Square server.

Payment
Link copied to clipboard
sealed class Payment

The description of a completed payment, returned in the success value of Payment Result. All currency amounts are specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents.

PaymentErrorCode
Link copied to clipboard
enum PaymentErrorCode : Enum<PaymentErrorCode> , ErrorCode

Error conditions that arise during payments. Like other categories of error codes, these are separated between "usage errors" which a careful developer could and should have avoided, and regular errors which cannot be prevented during normal operation. For example, NOT_AUTHORIZED is not a usage error, because user might be force-logged out during payment process and server will then return error 401. However, developers should be checking that Mobile Payments SDK has been authorized and, if not, disabling the controls that lead to a call to PaymentManager.startPaymentActivity; TIMEOUT is a regular, non-usage error because network conditions are unpredictable and might be severed in the middle of a transaction; even with the best of developers' care, timeouts sometimes just happen.

PaymentHandle
Link copied to clipboard
interface PaymentHandle

Representation of a payment process available immediately from PaymentManager.startPaymentActivity. Provides a way to interact with an ongoing payment, e.g. cancel it or select additionalPaymentMethods.

PaymentManager
Link copied to clipboard
interface PaymentManager

Processes payments for Mobile Payments SDK.

PaymentParameters
Link copied to clipboard
class PaymentParameters

Parameters to describe a single payment made using Mobile Payments SDK. Use Builder to create and configure payment parameters, for example:

PaymentProcessingFee
Link copied to clipboard
class PaymentProcessingFee(val effectiveAt: Date, val type: PaymentProcessingFee.Type, val amountMoney: Money)

Processing fees and fee adjustments assessed by Square on this payment.

PaymentSettings
Link copied to clipboard
data class PaymentSettings(val isOfflineProcessingAllowed: Boolean, val offlineTransactionAmountLimit: Money?, val offlineTotalStoredAmountLimit: Money?)

Read-only settings that provide payment settings based on the current authenticated seller.

ProcessingMode
Link copied to clipboard
enum ProcessingMode : Enum<ProcessingMode>

PaymentParameters "processingMode" parameter will determine whether the current payment needs to be processed online or offline.

PromptMode
Link copied to clipboard
enum PromptMode : Enum<PromptMode>

Specifies whether to display the DEFAULT Square-provided payment prompt UI or a CUSTOM UI provided by the developer.

PromptParameters
Link copied to clipboard
class PromptParameters(val mode: PromptMode = PromptMode.DEFAULT, val additionalPaymentMethods: List<AdditionalPaymentMethod.Type> = AdditionalPaymentMethod.allPaymentMethods)

Parameters for configuring the payment prompt UI. Includes: