Key Enums
A reference for the various enums used throughout the Cycle Android SDK.
ReaderType
Defines supported external card reader models.
| Type | Description |
|---|---|
DSPREAD_D60 | Cycle One device with built-in printer |
... | Additional types are supported, but not yet in South Africa. |
ReaderEvent
Defines events emitted by the card reader during its lifecycle and transaction flow.
| Type | Description |
|---|---|
CONNECTED | The card reader has successfully connected. |
DISCONNECTED | The card reader has been disconnected. |
START_INIT | Initialization of the card reader has started. |
INIT_SUCCESSFULLY | Initialization completed successfully. |
INIT_FAILED | Initialization failed. |
EJECT_CARD_TIMEOUT | Timeout due to card not being ejected or inactivity. |
SWIPE_CARD | Magnetic stripe swipe detected. |
EMV_TRANSACTION_STARTED | A chip card transaction has started. |
NFC_TRANSACTION_STARTED | An NFC (contactless) transaction has started. |
WAITING_FOR_CARD | Awaiting card input (swipe, insert, or tap). |
PAYMENT_CANCELED | Transaction was cancelled by the user. |
EJECT_CARD | Card must be ejected (typically after an error). |
BAD_SWIPE | Failed to read magnetic stripe. |
LOW_BATTERY | Reader battery level is below 10%. |
CARD_TIMEOUT | Card input timed out. |
CARD_INFO_RECEIVED | Card information successfully read. |
PIN_TIMEOUT | Timeout waiting for PIN entry. |
PaymentInputType
Specifies the source and context of the payment method.
| Type | Description |
|---|
Physical Card Input Types
SWIPE | Payment using magnetic stripe. |
CHIP | Payment using chip (EMV) card. |
NFC | Contactless (NFC) payment. |
Payment Source Types
PREPAID | Prepaid payment method. |
CREDIT | Credit-based payment. |
CASH | Payment made in cash. |
OTHER | Payment via an external method (e.g., payment link). |
OUTER_CARD | Card payment processed by an external POS terminal. |
PaymentError
Defines error types that may occur during the lifecycle of a transaction.
| Type | Description |
|---|---|
CONNECTION_ERROR | Failed to connect to Cycle servers. |
SERVER_ERROR | Error occurred while processing the transaction server-side. |
TRANSACTION_NULL_OR_EMPTY | No valid transaction was formed or provided. |
NO_SUCH_TRANSACTION | Transaction not found or is ambiguous. |
EMV_ERROR | Generic EMV error. |
EMV_TERMINATED | Transaction was forcefully terminated. |
EMV_DECLINED | Transaction was declined by the issuer. |
EMV_CANCEL | Transaction was cancelled. |
EMV_CARD_ERROR | Card-related error during EMV operation. |
EMV_DEVICE_ERROR | Card reader device error. |
EMV_CARD_NOT_SUPPORTED | Card type is not supported by reader or SDK. |
EMV_NOT_ALLOWED | Chip-based payment is not permitted. |
EMV_ZERO_TRAN_EMV | Attempted a chip transaction with a 0-value amount. |
NFC_NOT_ALLOWED | NFC (contactless) payment not permitted. |
INVALID_AMOUNT | Refund or cancellation amount exceeds transaction balance. |
STANDALONE_FAILED | Error occurred during a TTK standalone payment. |
NFC_LIMIT_EXCEEDED | Amount exceeds contactless transaction limit. |
TTK_FAILED | Error in external payment via TTK protocol. |
EXT_APP_FAILED | External app integration failure during transaction. |
SWIPE_NOT_ALLOWED | Magnetic stripe payments not supported. |
RESUBMIT_FAILED | Failed to confirm transaction on resubmission. |
DEFERRED_FAILED | Error generating deferred transaction data. |
INTERNAL_ERROR | Generic internal error in SDK during transaction. |
RegularRepeatType
Defines the recurrence pattern for scheduled (recurring) payments.
| Type | Description |
|---|---|
Never | Executes only once (non-recurring). |
Weekly | Executes every week on the same day. |
Monthly | Executes once a month. |
Quarterly | Executes once every 3 months. |
Annual | Executes once a year. |
ArbitraryDays | Executes on specific, user-defined days. |
RegularEndType
Defines how a recurring payment schedule should be terminated.
| Type | Description |
|---|---|
BY_QUANTITY | Ends after a predefined number of executions. |
BY_DAY | Ends on a specified calendar date. |
ReverseAction
Specifies the action to be performed when reversing or cancelling a recurring payment.
| Type | Description |
|---|---|
CANCEL | Cancels the future scheduled payments. |
RETURN | Issues a return/refund for a completed payment. |
PrintResult
Describes the result of a print attempt during receipt generation.
| Type | Description |
|---|---|
SUCCESS | The receipt printed successfully. |
NO_PAPER | No paper loaded in the printer. |
WRONG_CMD | An invalid or unsupported command was issued to the printer. |
OVERHEAT | The printer head has overheated. |
TIMEOUT | No response received from the printer within timeout limit. |
PRINTER_ERROR | A general printer error has occurred. |
PaymentMethod
Enumerates the available methods for executing a payment.
| Type | Description |
|---|---|
CARD | Standard bank card payment (debit or credit). |
CREDIT | Credit payment method. |
CASH | Cash payment recorded manually. |
OTHER | Payment made via online payment link. |
LINKED_CARD | Payment using a previously linked card token. |
OUTER_CARD | Payment processed externally via an integrated POS system. |
PREPAID | Prepaid method or wallet payment. |