--- title: "Handle transaction state changes" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/ios-integration/key-steps-ios/process-a-basic-transaction-ios/handle-transaction-state-changes-ios" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/ios-integration/key-steps-ios/process-a-basic-transaction-ios/handle-transaction-state-changes-ios.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/ios-integration/key-steps-ios/process-a-basic-transaction-ios/handle-transaction-state-changes-ios" last_modified: "2021-01-12T16:00:00+01:00" language: "en" --- # Handle transaction state changes [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/ios-integration/key-steps-ios/process-a-basic-transaction-ios/handle-transaction-state-changes-ios.md) ## Delegate The `transactionStateChanged` delegate is called when the state of the transaction changes. This method can be used to reflect the progress in the user-interface. ### Parameters | Name | Type | Required | Description | | ------- | --------------- | ------------------------------------------------------------------------------------------- | ------------------------------------- | | `state` |  ADYTenderState | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The new transaction-processing state. | ## Tender states | State | Description | | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ADYTenderStateInitial` | The initial state where the tender will start from. | | `ADYTenderStateCreated` | The state where the tender has been created in the payment device and a transaction is born. From this state onwards, transactions will be recorded in the transaction history, independent of the final state of such transaction. | | `ADYTenderStateProcessing` | The state after tender creation where the transaction is in progress. | | `ADYTenderStateProvideCardDetails` | The payment device is waiting for the card details to be provided by the App. | | `ADYTenderStateCardDetailsProvided` | The payment device has received the provided card details and is processing these. | | `ADYTenderStateAdditionalDataAvailable` | Additional data is available and is passed to the App. | | `ADYTenderStateWaitForAmountAdjustment` | The payment device is waiting for any tender updates the App might decide to, based upon the information passed to the App in the previous state. | | `ADYTenderStateReferral` | The Issuing bank requests a referral (not implemented yet) | | `ADYTenderStateReferralChecked` | The authorization code, as retrieved form the Issuing bank, is sent to the payment device. | | `ADYTenderStateCheckSignature` | The signature needs to be recorded/checked. | | `ADYTenderStateSignatureChecked` | The signature has been recorded/processed. | | `ADYTenderStatePrintReceipt` | The receipt is provided to the App and needs to be processed. | | `ADYTenderStateReceiptPrinted` | The receipt has been processed. | | `ADYTenderStateWaitingForAppSelection` | The payment method is being selected. | | `ADYTenderStateAppSelected` | The payment method has been selected. The selected payment method is passed to the `ADYTransactionProcessorDelegate` function `transactionApplicationSelected:`. | | `ADYTenderStateWaitingForPin` | The payment device is waiting for the customer to enter their PIN. | | `ADYTenderStatePinDigitEntered` | The customer has entered a PIN digit. The total number of digits provided is passed to the `ADYTransactionProcessorDelegate` function `transactionPinDigitEntered:`. | | `ADYTenderStatePinEntered` | The customer has completed entering their PIN. | | `ADYTenderStateCardSwiped` | The customer swiped a payment card through the swipe slot. | | `ADYTenderStateCardInserted` | The customer inserted their card into the EMV slot. | | `ADYTenderStateCardRemoved` | The customer removed their card from the EMV slot. | | `ADYTenderStateAskDcc` | The customer is being asked if Dynamic Currency Conversion should be applied. | | `ADYTenderStateDccAccepted` | The customer accepted the Dynamic Currency Conversion. | | `ADYTenderStateDccRejected` | The customer rejected Dynamic Currency Conversion | ## Final States | State | Description | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `ADYTenderStateApproved` | The transaction has been completed with result: APPROVED | | `ADYTenderStateDeclined` | The transaction has been completed with result: DECLINED | | `ADYTenderStateCancelled` | The transaction has been completed with result: CANCELLED | | `ADYTenderStateError` | The transaction has been completed with result: ERROR | | `ADYTenderStateUnknown` | The transaction has been completed with the result: UNKNOWN. To fetch the final state of the transaction, query the payment device for the transaction details by calling `- [ADYDevice fetchLastTransactionDataWithCompletion:]` or `- [ADYDevice fetchTransactionDataWithTenderReference:]`. | ### Declaration code example #### Objective-C ```objectivec - (void)transactionStateChanged:(ADYTenderState)state; ``` #### Swift ```swift optional func transactionStateChanged(_ state: Any!) ```