---
updatedAt: 2026-03-24T12:18:28.000Z
agentTools:
  projectIndex: https://docs.clover.com/dev/llms.txt
---

# Capture and tip adjust

[block:html]
{
  "html": "<meta name=\"description\" content=\"Learn how to use the Clover Go SDK to capture or tip adjust funds for pre-auth transactions.\">\n\n<!--DS-5851-->\n<!--DS-6147-->"
}
[/block]

[block:html]
{
  "html": "<div class=\"container-top\">\n  <!--United States-->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">United States</div>\n    </div>\n  </div>\n\n</div>\n<!-- CSS moved to global stylesheet-->\n<!--REMOVE\n<style>\n.container-top {\n  top: -15px;\n  position: relative;\n  margin-bottom: -5px;\n}\n\n.container-reg {\n  align-items: center;\n  min-width: auto; \n  width: fit-content;\n  text-align: left;\n  overflow: auto;\n  display: inline-block; \n}\n\n/*Pill format REG*/\n.pill-reg {\n  background: #44BB44;\n  border: .5px solid #44BB44;\n  margin-left: 5px;\n  overflow: auto;\n  display: flex; \n  justify-content: center; \n  align-items: center; \n  border-radius: 10px;\n  height: 1.8rem;\n  margin-top: 10px;\n  margin-bottom: 1.5px; \n  padding: 0 10px; \n}\n\n/*Text FORMAT inside REG pills */\n.pill-reg .label-reg, \n.pill-reg__addon .label-reg \n{\n  font-style: normal;\n  font-weight: normal;\n  font-size: 12px;\n  color: #fff;\n  vertical-align: middle;\n  margin: 0;\n  padding: 0 5px;\n}\n</style>-->"
}
[/block]

For more information, see [Supported payment methods](https://docs.clover.com/docs/clover-go-sdk#supported-payment-transactions).

# Prerequisites

Before you integrate with the Go SDK, complete the following:

* [Create a global developer account](https://docs.clover.com/docs/gdp-create-global-developer-account) with a default test merchant account.
* Create [additional test merchants](https://docs.clover.com/docs/use-test-merchants-dashboard#create-additional-test-merchants), if needed.
* [Create an app](https://docs.clover.com/docs/creating-an-app) in the sandbox.
* Create at least one [employee](https://docs.clover.com/docs/clover-data-model#employees) role user for the [OAuth flow](https://docs.clover.com/docs/clover-oauth-on-mobile).
* Order a [Clover Go reader Developer Kit (Dev Kit)](https://cloverdevkit.com/) and [set it up](https://docs.clover.com/docs/clover-dev-kits#set-up-devices-and-dev-kits).

# Field descriptions

## TipAdjustRequest fields

[block:parameters]
{
  "data": {
    "h-0": "Field",
    "h-1": "Required",
    "h-2": "Type",
    "h-3": "Description",
    "0-0": "`paymentId`",
    "0-1": "true",
    "0-2": "String",
    "0-3": "Clover-assigned universally unique identifier (UUID) of the payment, to which the tip is added.  \nMinimum and Maximum length: 13 characters  \n  \n**Note**: The `paymentId` displays in the Payment details in PayResponse for which a successful Auth/pre-auth PayRequest was sent.",
    "1-0": "`tip`",
    "1-1": "true",
    "1-2": "Int64",
    "1-3": "Tip amount in cents.  \n  \n**Format**: Cents; cannot be a negative or zero value.  \n  \nMaximum amount = 999999999"
  },
  "cols": 4,
  "rows": 2,
  "align": [
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

## CaptureRequest fields

[block:parameters]
{
  "data": {
    "h-0": "Field",
    "h-1": "Required",
    "h-2": "Type",
    "h-3": "Description",
    "0-0": "`paymentId`",
    "0-1": "true",
    "0-2": "String",
    "0-3": "Clover-assigned universally unique identifier (UUID) of the payment, to which the tip is added.  \n  \nMinimum and Maximum length: 13 characters  \n  \n**Note**: The `paymentId` displays in the Payment details in PayResponse for which a successful auth/pre-auth PayRequest was sent.",
    "1-0": "`amount`",
    "1-1": "true",
    "1-2": "Int64",
    "1-3": "Total amount payment from pre-auth transaction in cents including taxes.  \n  \n**Format**: Cents; cannot be a negative value.  \n  \nMaximum amount = 999999999.",
    "2-0": "`tipAmount`",
    "2-1": "true",
    "2-2": "Int64",
    "2-3": "Tip amount in cents.  \n  \n**Format**: Cents; cannot be a negative or zero value.  \n  \nMaximum amount = 999999999."
  },
  "cols": 4,
  "rows": 3,
  "align": [
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

# Android

## TipAdjust

To adjust a tip for an open auth or pre-auth payment, enter values in the tipAdjust request parameters. See [TipAdjustRequest](https://docs.clover.com/docs/capture-and-tip-adjust#tipadjustrequest-fields).

The following are the response scenarios for the `TipAdjustState`:

* Successful request returns the `OnComplete` state.
* Invalid input error returns the `OnError` state with a `GenericTransactionError`.

### TipAdjust request example

```Text TipAdjust request
fun tipAdjust(request: TipAdjustRequest): Flow<TipAdjustState>
```

```kotlin Kotlin TipAdjust example
lifecycleScope.launch {
    val request = TipAdjustRequest(
        tip = tipAmount,
        paymentId = paymentId
    )
    goSdk.tipAdjust(
        request
    ).collectLatest { tipAdjustState ->
 
        when(tipAdjustState) {
            is TipAdjustState.OnError -> {
                println("Tip adjust failed: ${tipAdjustState.error}")
                updateUI(tipAdjustState)
            }
            is TipAdjustState.OnComplete -> {
                println("Tip adjust succeeded: ${tipAdjustState.response}")
                updateUI(tipAdjustState)
            }
            else -> {
                //Something unexpected happened
            }
        }
    }
}
```

## Capture

After a pre-auth is tipAdjusted, capture all the pre-auth payment(s).

To capture a pre-auth payment, enter values in the CaptureRequest parameters. See [CaptureRequest](https://docs.clover.com/docs/capture-and-tip-adjust#capturerequest-fields).

The following are the response scenarios for the `CaptureState`:

* Successful request returns the `OnComplete` state with a Payment object.

* Invalid input error returns the `OnError` state with a `GenericTransactionError`.

### Capture example

```Text Capture request
fun capture(request: CaptureRequest): Flow<CaptureState>
```

```kotlin Kotlin Capture example
lifecycleScope.launch {
    val request = CaptureRequest(
        amount = transactionAmount,
        tipAmount = tipAmount,
        paymentId = paymentId
    )

    goSdk.capture(
        request
    ).collectLatest { captureState ->

        when (captureState) {
            is CaptureState.OnError -> {
                println("Capture failed: ${captureState.error}")
                updateUI(captureState)
            }
            is CaptureState.OnComplete -> {
                println("Capture succeeded: ${captureState.response}")
                updateUI(captureState)
            }
            else -> {
                //Something unexpected happened
            }
        }
    }
}
```

# iOS

## TipAdjust

To adjust a tip for an open auth or pre-auth payment, enter values in the `tipAdjust` request parameters. See [TipAdjustRequest](https://docs.clover.com/docs/capture-and-tip-adjust#tipadjustrequest-fields).

The following are the response scenarios for the `TipAdjustState`:

* Successful request returns the `.success` result and the  `TipAdjustResponse`.
* Invalid input error returns the `.failure` result and a `CLVGoError`.

### TipAdjust example

```swift Swift TipAdjust example
let tipRequest = TipAdjustRequest(tip: 400, paymentId: "123456789ABCD")
 
do {
   let tipAdjustResponse = try await CloverPaymentSDK.shared.tipAdjust(tipAdjustRequest:tipRequest)
   print("Tip adjust successful")
} catch {
   print("Tip adjust failure: \(error)")
}
```

## Capture

To capture a pre-auth payment, enter values in the CaptureRequest parameters. See [CaptureRequest](https://docs.clover.com/docs/capture-and-tip-adjust#capturerequest-fields).

**Note:** You can add `tipAmount` optionally at the time of capture. See [TipCapture example](https://docs.clover.com/docs/capture-and-tip-adjust#capture-example-1) . You can also request an independent tip adjustment after capture but before closeout. See [TipAdjust example](https://docs.clover.com/docs/capture-and-tip-adjust#tipadjust-example).

The following are the response scenarios for the `CaptureState`:

* Successful request returns a `.success` result with `CaptureResponse`.

* Invalid input error returns a `.failure` result and a `CLVGoError`.

### Capture example

```Text Swift Capture example
var captureRequest = CaptureRequest(amount: 2000, paymentId: "123456789ABCD")          
 
do {
   let captureResponse = try await CloverPaymentSDK.shared.capture(captureRequest: captureRequest)
   print("Capture successful")
} catch {
   print("Capture failure: \(error)")
}
```