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

# Adjust a tip

Android Payments API

<meta name=" description" content="See instructions on using the `TipAdjustRequestIntentBuilder` class to add a tip to an existing payment, either by specifying a `tipAmount` directly or allowing a merchant to enter it through a user interface.">

[block:html]
{
  "html": "<div class=\"container-top\">\n  <!-- North America -->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">North America</div>\n    </div>\n  </div>\n\n  <!-- Europe -->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">Europe</div>\n    </div>\n  </div>\n\n  <!-- Latin America -->\n  <div class=\"container-reg\">\n    <div class=\"pill-reg\">\n      <div class=\"label-reg\">Latin America</div>\n    </div>\n  </div>\n</div>\n\n<!-- CSS moved to global stylesheet-->\n"
}
[/block]

Use the `TipAdjustRequestIntentBuilder` class to build an Intent to add a tip to a payment. This Intent **does not** prompt the customer for a tip; rather, it allows a merchant to apply a tip to an existing payment, for example, from a tip amount left on a receipt. A user interface is displayed if the tip amount is not provided (null), allowing a merchant to enter a tip amount.

# Prerequisites

* Read [overview of the Clover platform](https://docs.clover.com/docs/clover-architecture).
* [Create a global developer account](https://sandbox.dev.clover.com/developer-home/create-account) with a default test merchant account.
* Order a [Clover Developer Kit (Dev Kit)](https://cloverdevkit.com/) and [set it up](https://www.clover.com/en-US/help/set-up-hardware).
* [Use the required Android SDK versions](https://docs.clover.com/docs/setting-android-sdk-versions).

# Request a headless tip adjust

Build a tip adjust request with `tipAmount` that is not entered through a user interface.

```kotlin Kotlin
val paymentId = payment.id // should be id from a payment
val tipAmount = 300L
val builder = TipAdjustRequestIntentBuilder.AdjustTip(paymentId, tipAmount)
val intent = builder.build(context)
```
```java Java
String paymentId = payment.getId(); // should be id from a payment
long tipAmount = 300l;
TipAdjustRequestIntentBuilder builder = TipAdjustRequestIntentBuilder.AdjustTip(paymentId, tipAmount);
Intent intent = builder.build(context);
```

# Request a tip adjust with keypad

Build a tip adjust request with no`tipAmount`.

```kotlin Kotlin
val paymentId = payment.id // should be id from a payment
val builder = TipAdjustRequestIntentBuilder.AdjustTip(paymentId, null)
val intent = builder.build(context)
```
```java Java
String paymentId = payment.getId(); // should be id from a payment
TipAdjustRequestIntentBuilder builder = TipAdjustRequestIntentBuilder.AdjustTip(paymentId, null);
Intent intent = builder.build(context);
```

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/f709142-singtip.png",
        "",
        "Tip adjust keypad page - no tipAmont entered"
      ],
      "align": "center",
      "sizing": "80",
      "border": true,
      "caption": "Tip adjust keypad page: no `tipAmount `entered"
    }
  ]
}
[/block]

# Response details

When the tip adjust flow completes, the response is available through `onActivityResult()`.

Check the `TipAdjustRequestIntentBuilder.Response` class for the response fields.

* For a successful request, retrieve the mapping of `paymentId` to  selected `tipAmount` values using the Intent: `TipAdjustRequestIntentBuilder.Response.TIP_AMOUNTS`
* For an unsuccessful request (error, failure, or cancellation), retrieve the optional failure message using the Intent: `TipAdjustRequestIntentBuilder.Response.FAILURE_MESSAGE`

### Response example

```kotlin Kotlin
fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
        super.onActivityResult(requestCode, resultCode, data)
        if (requestCode == TIP_ADJUST_REQUEST_CODE) {
            if (resultCode == RESULT_OK) {
                val tipAmounts: Map<String, Long> = data?.getSerializableExtra(TipAdjustRequestIntentBuilder.Response.TIP_AMOUNTS) as Map<String, Long>
            } else {
                // tip adjust request failed, check for error
                val failureMessage = data?.getStringExtra(TipAdjustRequestIntentBuilder.Response.FAILURE_MESSAGE)
            }
        }
    }
```
```java Java
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == TIP_ADJUST_REQUEST_CODE) {
      if (resultCode == RESULT_OK) {
        Map<String, Long> tipAmount = data.getSerializableExtra(TipAdjustRequestIntentBuilder.Response.TIP_AMOUNTS);
      } else {
       // tip adjust request failed, check for error
        String failureMessage = data.getStringExtra(TipAdjustRequestIntentBuilder.Response.FAILURE_MESSAGE);
      }
    }
  }
```