> 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-latest/psdk-user-guide-and-training/psdk-user-guide/payment_functions/semi-integrated-payments/pre-authorization-operations.md).

# Pre-authorization Operations

The [TransactionType.PAYMENT](https://docs.verifone.com/psdk-api-latest/android-java/index/transactiontype) is the default setting when [Payment](https://docs.verifone.com/psdk-api-latest/android-java/index/payment) is created. For initializing pre-authorization. set it to [TransactionType.PRE\_AUTHORIZATION](https://docs.verifone.com/psdk-api-latest/android-java/index/transactiontype) prior to calling [TransactionManager.startPayment().](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager#startpayment-payment) Once pre-authorization is approved, for any follow on pre-authorization transactions, either pass the original [Payment](https://docs.verifone.com/psdk-api-latest/android-java/index/payment) object from the pre-auth or configure a new payment object with the app-specific data from the original pre-auth, and update the the requested amounts if it is applicable. On approved pre-authorizations, for any Increment, Decrement, Extend, Reauth, set the transaction type to [TransactionType.PRE\_AUTHORIZATION\_UPDATE](https://docs.verifone.com/psdk-api-latest/android-java/index/transactiontype) and call [TransactionManager.startPayment(),](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager#startpayment-payment) for Cancel or Partial Cancel, call [TransactionManager.processVoid()](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager#processvoid-payment). For completing the pre-authorization transaction, set the transaction type to [TransactionType.PRE\_AUTHORIZATION\_COMPLETION ](https://docs.verifone.com/psdk-api-latest/android-java/index/transactiontype)and call [TransactionManager.startPayment().](https://docs.verifone.com/psdk-api-latest/android-java/index/transactionmanager#startpayment-payment)

### Pre-auth initialization <a href="#pre-auth-initialization" id="pre-auth-initialization"></a>

{% tabs fullWidth="false" %}
{% tab title="Java" %}
{% code lineNumbers="true" fullWidth="true" %}

```java
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization.
Payment payment = Payment.create();
payment.setTransactionType(TransactionType.PRE_AUTHORIZATION);
// Configure amounts and other payment properties before starting.
transactionManager.startPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
 // A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization.
val payment = Payment.create()
payment.setTransactionType(TransactionType.PRE_AUTHORIZATION)
// Configure amounts and other payment properties before starting.
transactionManager.startPayment(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization.
var payment = VFIPayment.create()
payment?.setTransactionType(transactionType: VFITransactionType.PREAUTHORIZATION)
// Configure amounts and other payment properties before starting.
sdk.getTransactionManager()?.startPayment(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

<pre class="language-csharp" data-line-numbers data-full-width="true"><code class="lang-csharp"><strong> // A session must be open to perform a payment
</strong>
// Create the payment and set the transaction type to pre-authorization.
Payment payment = new Payment();
payment.TransactionType(TransactionType.PRE_AUTHORIZATION);
// Configure amounts and other payment properties before starting.
transactionManager.StartPayment(payment);
// Listener receives the PaymentCompletedEvent.
</code></pre>

{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization.
auto payment = Payment::create();
payment->setTransactionType(TransactionType::PRE_AUTHORIZATION);
// Configure amounts and other payment properties before starting.
transaction_manager->startPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title=".NET" %}
{% code lineNumbers="true" %}

```aspnet
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization.
var payment = Payment.Create();
payment.TransactionType = TransactionType.PRE_AUTHORIZATION;
// Configure amounts and other payment properties before starting.
transactionManager.StartPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Pre-auth update <a href="#pre-auth-update" id="pre-auth-update"></a>

{% tabs fullWidth="false" %}
{% tab title="Java" %}
{% code lineNumbers="true" fullWidth="true" %}

```java
// A session must be open to perform a payment

// Create the payment.
Payment payment = Payment.create();
// For pre-auth operations of increment, decrement, extend, reauth,set the
// transaction type to pre-authorization update and configure the requested amounts
// if it is applicable.
payment.setTransactionType(TransactionType.PRE_AUTHORIZATION_UPDATE);
payment.setRequestedAmounts(changedAmountTotals);
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth);
// Configure the other payment properties before starting.
transactionManager.startPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
 // A session must be open to perform a payment

// Create the payment.
val payment = Payment.create()
// For pre-auth operations of increment, decrement, extend, reauth,set the
// transaction type to pre-authorization update and configure the requested amounts
// if it is applicable.
payment.setTransactionType(TransactionType.PRE_AUTHORIZATION_UPDATE)
payment.setRequestedAmounts(changedAmountTotals)
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth)
// Configure the other payment properties before starting.
transactionManager.startPayment(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// A session must be open to perform a payment

// Create the payment.
var payment = VFIPayment.create()
// For pre-auth operations of increment, decrement, extend, reauth,set the
// transaction type to pre-authorization update and configure the requested amounts
// if it is applicable.
payment?.setTransactionType(transactionType: VFITransactionType.PREAUTHORIZATIONUPDATE)

payment?.setRequestedAmounts(changedAmountTotals)
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth)
// Configure the other payment properties before starting.
sdk.getTransactionManager()?.startPayment(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

<pre class="language-csharp" data-line-numbers data-full-width="true"><code class="lang-csharp"><strong> // A session must be open to perform a payment
</strong>
// Create the payment.
Payment payment = new Payment();
// For pre-auth operations of increment, decrement, extend, reauth,set the
// transaction type to pre-authorization update and configure the requested amounts
// if it is applicable.
payment.TransactionType(TransactionType.PRE_AUTHORIZATION_UPDATE);
payment.setRequestedAmounts(changedAmountTotals);
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.AppSpecificData(dataFromPreAuth);
// Configure the other payment properties before starting.
payment_sdk_.TransactionManager.StartPayment(payment);
// Listener receives the PaymentCompletedEvent.
</code></pre>

{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
// A session must be open to perform a payment

// Create the payment.
auto payment = Payment::create();
// For pre-auth operations of increment, decrement, extend, reauth,set the
// transaction type to pre-authorization update and configure the requested amounts
// if it is applicable.
payment->setTransactionType(TransactionType::PRE_AUTHORIZATION_UPDATE);
payment->setRequestedAmounts(changedAmountTotals);
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment->setAppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
psdk->getTransactionManager()->startPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title=".NET" %}
{% code lineNumbers="true" %}

```aspnet
// A session must be open to perform a payment

// Create the payment.
var payment = Payment.Create();
// For pre-auth operations of increment, decrement, extend, reauth,set the
// transaction type to pre-authorization update and configure the requested amounts
// if it is applicable.
payment.TransactionType = TransactionType.PRE_AUTHORIZATION_UPDATE;
payment.RequestedAmounts = changedAmountTotals;
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.AppSpecificData = dataFromPreAuth;
// Configure the other payment properties before starting.
payment_sdk_.TransactionManager.StartPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Pre-auth cancel <a href="#pre-auth-cancel" id="pre-auth-cancel"></a>

{% tabs fullWidth="false" %}
{% tab title="Java" %}
{% code lineNumbers="true" fullWidth="true" %}

```java
// A session must be open to perform a payment

// Create the payment.
Payment payment = Payment.create();
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
transactionManager.processVoid(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
 // A session must be open to perform a payment

// Create the payment.
val payment = Payment.create()
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth)
// Configure amounts and other payment properties before starting.
transactionManager.processVoid(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// A session must be open to perform a payment

// Create the payment.
var payment = VFIPayment.create()
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth)
// Configure amounts and other payment properties before starting.
sdk.getTransactionManager()?.processVoid(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

<pre class="language-csharp" data-line-numbers data-full-width="true"><code class="lang-csharp"><strong> // A session must be open to perform a payment
</strong>
// Create the payment.
Payment payment = new Payment();
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.AppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
payment_sdk_.TransactionManager.ProcessVoid(payment);
// Listener receives the PaymentCompletedEvent.
</code></pre>

{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
// A session must be open to perform a payment

// Create the payment.
auto payment = Payment::create();
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment->setAppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
psdk->getTransactionManager()->processVoid(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title=".NET" %}
{% code lineNumbers="true" %}

```aspnet
// A session must be open to perform a payment

// Create the payment.
var payment = Payment.Create();
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.AppSpecificData = dataFromPreAuth;
// Configure amounts and other payment properties before starting.
payment_sdk_.TransactionManager.ProcessVoid(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Pre-auth completion <a href="#pre-auth-completion" id="pre-auth-completion"></a>

{% tabs fullWidth="false" %}
{% tab title="Java" %}
{% code lineNumbers="true" fullWidth="true" %}

```java
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization completion.
Payment payment = Payment.create();
payment.setTransactionType(TransactionType.PRE_AUTHORIZATION_COMPLETION);
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
transactionManager.startPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code lineNumbers="true" %}

```kotlin
 // A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization completion.
val payment = Payment.create()
payment.setTransactionType(TransactionType.PRE_AUTHORIZATION_COMPLETION)
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth)
// Configure amounts and other payment properties before starting.
transactionManager.startPayment(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization completion.
var payment = VFIPayment.create()
payment?.setTransactionType(transactionType: VFITransactionType.PREAUTHORIZATIONCOMPLETION)
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.setAppSpecificData(dataFromPreAuth)
// Configure amounts and other payment properties before starting.
sdk.getTransactionManager()?.startPayment(payment)
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

<pre class="language-csharp" data-line-numbers data-full-width="true"><code class="lang-csharp"><strong> // A session must be open to perform a payment
</strong>
// Create the payment and set the transaction type to pre-authorization completion.
Payment payment = new Payment();
payment.TransactionType(TransactionType.PRE_AUTHORIZATION_COMPLETION);
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.AppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
payment_sdk_.TransactionManager.StartPayment(payment);
// Listener receives the PaymentCompletedEvent.
</code></pre>

{% endtab %}

{% tab title="C++" %}
{% code lineNumbers="true" %}

```cpp
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization completion.
auto payment = Payment::create();
payment->setTransactionType(TransactionType::PRE_AUTHORIZATION_COMPLETION);
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment->setAppSpecificData(dataFromPreAuth);
// Configure amounts and other payment properties before starting.
psdk->getTransactionManager()->startPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}

{% tab title=".NET" %}
{% code lineNumbers="true" %}

```aspnet
// A session must be open to perform a payment

// Create the payment and set the transaction type to pre-authorization completion.
var payment = Payment.Create();
payment.TransactionType = TransactionType.PRE_AUTHORIZATION_COMPLETION;
// Set the AppSpecificData from the approved pre-authorization here to link the two.
payment.AppSpecificData = dataFromPreAuth;
// Configure amounts and other payment properties before starting.
payment_sdk_.TransactionManager.StartPayment(payment);
// Listener receives the PaymentCompletedEvent.
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Getting pre-auth operations history <a href="#getting-pre-auth-operations-history" id="getting-pre-auth-operations-history"></a>

[Payment.getOperationsHistory() ](https://docs.verifone.com/psdk-api-latest/android-java/index/payment#getoperationshistory)get the history of operations performed on a payment including pre-authorizations.It returns the list of operations that have been performed on the current payment. If null then the operations history is unknown. If an empty list, then there is no history.

### Linking Pre-Auth and Pre-Auth Completion <a href="#linking-pre-auth-and-pre-auth-completion" id="linking-pre-auth-and-pre-auth-completion"></a>

After configuring the Transaction.PRE\_AUTHORIZATION\_COMPLETION\_TYPE on the transaction object, either pass the original Payment object from the pre-auth or configure a new payment object with the app-specific data from the original pre-auth. The requested amounts can be updated on the payment object to reflect any changes, such as gratuity, or left empty to simply complete the original amount that was authorized. See [Setup and Start a Payment](/psdk-latest/psdk-user-guide-and-training/psdk-user-guide/payment_functions/semi-integrated-payments/performing-a-sale.md#setup-and-start-a-payment) for more information on updating the requested amounts.

{% @plantuml/diagram content="    @startuml

```
hide footbox

participant POS order 10
participant POI order 20
|||
POS <- POI: Receives PaymentCompletedEvent for PRE_AUTHORIZATION_TYPE
POS <- POS: Stores App Specific Data from Payment.
...Collects tip information from customer...
POS -> POS: Configure new payment object with the App Specific\nData and the new requested AmountTotals.
POS -> POI: Configure PRE_AUTHORIZATION_COMPLETION_TYPE transaction
note right
  Configuring the payment 
  and transaction can be 
  done in any order.
end note
POS ->> POI: transactionManager.startPayment(payment)
...POI collects card information and gets approval from host...
POS <- POI: Receive PaymentCompletedEvent for the pre-auth completion
|||
@enduml" %}
```

***

{% columns %}
{% column width="25%" %}

<figure><img src="/files/9ezXRridnCaI1awLr3X9" alt="" width="150"><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="25%" %}

{% endcolumn %}

{% column width="16.66666666666666%" %}
**Version:**\
**Date:**
{% endcolumn %}

{% column width="33.333333333333336%" %} <code class="expression">space.vars.psdk\_version</code>\ <code class="expression">space.vars.psdk\_date</code>
{% endcolumn %}
{% endcolumns %}


---

# 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-latest/psdk-user-guide-and-training/psdk-user-guide/payment_functions/semi-integrated-payments/pre-authorization-operations.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.
