> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/psdk/not-sure-where-these-live/migration.md).

# Migration

Please reference pos-getting-started for a description and examples of the initialization process in 3.x, eg. using “Payment.create()” vs. “new Payment” to create objects, and importing “com.verifone.payment\_sdk.Payment” vs. “com.verifone.commerce.entities.Payment”.

Note

* On CM5 and Trinity terminals, please set Device Manager > Transaction Options > Terminal.1 > UseDeveloperSDK to “0” in order to use the 3.x SDK.

## API Changes <a href="#api-changes" id="api-changes"></a>

* Status Session ID has moved to Commerce Event.
* TransactionManager.getTransactionManager has moved to PaymentSdk.getTransactionManager().
* [TransactionManager.TearDown()](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md) has been removed and is no longer accessible as a TransactionManager API.

## Migration from CommerceListener and PsdkStatusListener to CommerceListenerAdapter <a href="#migration-from-commercelistener-and-psdkstatuslistener-to-commercelisteneradapter" id="migration-from-commercelistener-and-psdkstatuslistener-to-commercelisteneradapter"></a>

* [CommerceListener](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_commerce_listener2_8java.md) and [PsdkStatusListener](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_psdk_status_listener_8java.md) are being deprecated and consolidated into a single listener [CommerceListenerAdapter](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_commerce_listener_adapter_8java.md). The old and new listeners and the respective APIs should not be used in conjunction.

To use the new CommerceListener :

* create [CommerceListenerAdapter](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_commerce_listener_adapter_8java.md)
* Use the API [PaymentSdk.initializeFromValues(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_8java.md) with this listener.
* Get the [TransactionManager](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md) using [PaymentSdk.getTransactionManager(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_8java.md)
* To Login to the terminal Create the login credentials and call [TransactionManager.loginWithCredentials()](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md)
* To start a session call [TransactionManager.startSession2(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md)

See also

* [Connection to Payment Application](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/pos_guide.html#initialize-payment-sdk).
* login-logout.
* start-session.

Note

* Make sure to use the CommerceListenerAdapter with New APIs only. Using deprecated APIs in conjunction with CommerceListenerAdapter or the other way might lead to unexpected behaviour.

## API Changes <a href="#id1" id="id1"></a>

* [PaymentSdk.initialize(PsdkStatusListener)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md) API is replaced with [PaymentSdk.initialize(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md)
* [PaymentSdk.initializeFromValues(PsdkStatusListener,HashMap)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md) API is replaced with [PaymentSdk.initializeFromValues(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md)
* [PaymentSdk.initializeFromFile(PsdkStatusListener,String)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md) API is replaced with [PaymentSdk.initializeFromFile(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md)
* [PaymentSdk.displayConfiguration(PsdkStatusListener)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md) API is replaced with [PaymentSdk.displayConfiguration(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_payment_sdk_base_8java.md)
* [TransactionManager.startSession(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md) has moved to [TransactionManager.startSession2(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md)
* [TransactionManager.Login(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md) has moved to [TransactionManager.loginWithCredentials(…)](https://github.com/iKettles/verifone-migration-test/blob/main/psdk/_generated/java/file/_transaction_manager_8java.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/psdk/not-sure-where-these-live/migration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
