--- title: "Handle the final state callback" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/process-a-basic-transaction-c-library/handle-the-final-state-callback-c-library" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/process-a-basic-transaction-c-library/handle-the-final-state-callback-c-library.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/process-a-basic-transaction-c-library/handle-the-final-state-callback-c-library" last_modified: "2026-05-23T12:56:20+02:00" language: "en" --- # Handle the final state callback [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/key-steps-c-library/process-a-basic-transaction-c-library/handle-the-final-state-callback-c-library.md) ## Implement the tender finished callback Implement the `tender_finished_cb`, assign to the function pointer `status_tender_final`. For more information on how to do this, see [Implement callbacks with register\_device\_request](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks-with-register_device_request).  ## Callback Finally, the system returns the `tender_finished_cb` callback that contains the final transaction result. Another transaction can only be started when the final transaction result is received. ### Parameters | Name | Description | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `final_strct` | Pointer to a `final_strct` struct that defines the final outcome of the transaction. For included parameters and more information, see the `final_strct`page. | | `ped_device_info` | Pointer to a `ped_device_info` struct that defines the status and details of the PED. For included parameters and more information, see the `ped_device_info` page. | | `echo_struct` | Pointer to a struct set by the POS in the `device_callbacks` struct is echoed back in this struct. | Transaction information is returned in the `response_header` struct. The state is an enum of type TENDER\_STATE and defines the final outcome of the transaction, it can be one of the following: * FINAL\_STATE\_APPROVED * FINAL\_STATE\_DECLINED * FINAL\_STATE\_CANCELLED * FINAL\_STATE\_ERROR This is different from `ped_result_code` APPROVED. The `pos_result_code,` an enum of type `POS_RESULT_CODE,` represents the response from the issuer. If the state is `FINAL_STATE_DECLINED`, `FINAL_STATE_CANCELLED` or `FINAL_STATE_ERROR,` additional information is available.   Additional information might also be available in `refusal_reason` and/or `error_message`.  As card approval is still required, the POS result code is not the final result of the transaction.