# PaymentErrorCode

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.

## Entries

CANCELED
Link copied to clipboard
CANCELED

Payment canceled.

NOT_AUTHORIZED
Link copied to clipboard
NOT_AUTHORIZED

Payment attempted before authorization.

TIMEOUT
Link copied to clipboard
TIMEOUT

The contactless and chip reader timed out.

LOCATION_SERVICES_DISABLED
Link copied to clipboard
LOCATION_SERVICES_DISABLED

Locations services are turned off.

DEVICE_CLOCK_SKEWED
Link copied to clipboard
DEVICE_CLOCK_SKEWED

The device clock is skewed and not matching the server time.

USAGE_ERROR
Link copied to clipboard
USAGE_ERROR

PaymentManager.startPaymentActivity was used in an unexpected or unsupported way. See the debug code and debug message for more information.

## Properties

entries
Link copied to clipboard
val entries: EnumEntries<PaymentErrorCode>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

isUsageError
Link copied to clipboard
open override val isUsageError: Boolean

Returns `true` if the error is a usage error, `false` otherwise.

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int

## Functions

valueOf
Link copied to clipboard
fun valueOf(value: String): PaymentErrorCode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
fun values(): Array<PaymentErrorCode>

Returns an array containing the constants of this enum type, in the order they're declared.