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

# Select a receipt

Android Payments API

<meta name=" description" content="Learn how to use the `SelectReceiptRequestIntentBuilder` class to create intents for selecting payment, refund, and credit receipts, with options to customize receipt delivery methods (SMS, email, print, or no receipt) and handle responses through `onActivityResult()`.">

[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 `SelectReceiptRequestIntentBuilder` class to build an Intent to start an activity for receipt selection. Use this Intent to:

* Initiate payment, credit, and refund receipts.
* Configure hide or show options.
* Indicate if a default Clover receipt can be sent.

# 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).

# Select a payment receipt

Build a payment receipt selection request.

```kotlin Kotlin
val paymentId = "<Id of an online Payment>"
val builder = SelectReceiptRequestIntentBuilder.Payment(paymentId)
val intent = builder.build(context)
```
```java Java
String paymentId = "<Id of an online Payment>";
SelectReceiptRequestIntentBuilder builder = SelectReceiptRequestIntentBuilder.Payment(paymentId);
Intent intent = builder.build(context);
```

# Select a refund receipt

Build a refund receipt selection request.

```kotlin Kotlin
val refundId = "<Id of an online Refund>"
val builder = SelectReceiptRequestIntentBuilder.Refund(refundId)
val intent = builder.build(context)
```
```java Java
String refundId = "<Id of an online Refund>";
SelectReceiptRequestIntentBuilder builder = SelectReceiptRequestIntentBuilder.Refund(refundId);
Intent intent = builder.build(context);
```

# Select a credit receipt

Build a credit receipt selection request.

```kotlin Kotlin
val creditId = "<Id of an online Credit>"
val builder = SelectReceiptRequestIntentBuilder.Credit(creditId)
val intent = builder.build(context)
```
```java Java
String creditId = "<Id of an online Credit>";
SelectReceiptRequestIntentBuilder builder = SelectReceiptRequestIntentBuilder.Credit(creditId);
Intent intent = builder.build(context);
```

# ReceiptOptions

Use the `ReceiptOptions` class to customize the receipt selection screen, such as turn on or turn off SMS/Email/No Receipt/Print options.

| Method                                                              | Description                                                               |
| :------------------------------------------------------------------ | :------------------------------------------------------------------------ |
| `smsReceiptOptions(smsReceiptOption : SmsReceiptOption)`            | Use to turn on or off the SMS  receipt option and pass a phone number.    |
| `emailReceiptOptions(emailReceiptOption : EmailReceiptOption)`      | Use to turn on or off the email receipt option and pass an email address. |
| `printReceiptOptions(printReceiptOption : PrintReceiptOption)`      | Use to turn on or off the print receipt option.                           |
| `noReceiptReceiptOptions(noReceiptReceiptOption : NoReceiptOption)` | Use to turn on or off the no Receipt receipt option.                      |

## Example—Pass a phone number to the SMS receipt option

```kotlin kotlin
val paymentId = "<Id of an online Payment>"
val smsReceiptOption = SelectReceiptRequestIntentBuilder.SmsReceiptOption.Enable("5551231234")
val noReceiptOption = SelectReceiptRequestIntentBuilder.NoReceiptOption.Enable()
val printReceiptOption = SelectReceiptRequestIntentBuilder.PrintReceiptOption.Enable()
val emailReceiptOption = SelectReceiptRequestIntentBuilder.EmailReceiptOption.Enable(null)
val builder = SelectReceiptRequestIntentBuilder.Payment(paymentId)
.smsReceiptOptions(smsReceiptOption)
.emailReceiptOptions(emailReceiptOption)
.noReceiptReceiptOptions(noReceiptOption)
.printReceiptOptions(printReceiptOption)
 
val intent = builder.build(context)
```

## Additional field

Additional field to set on the `SelectReceiptRequestIntentBuilder` class.

[block:parameters]
{
  "data": {
    "h-0": "Field",
    "h-1": "Description",
    "0-0": "`cloverShouldHandleReceipts : Boolean`",
    "0-1": "Values:  \n  \n- True: Clover handles the delivery of the selected receipt option.\n- False: Clover does not deliver the selected receipt option; it is retrievable in the response."
  },
  "cols": 2,
  "rows": 1,
  "align": [
    "left",
    "left"
  ]
}
[/block]

# Response details

When the receipt selection flow completes, the response is available through `onActivityResult()`.

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

For a successful request:

* Retrieve the payment object using the Intent: `SelectReceiptRequestIntentBuilder.Response.PAYMENT`
* Retrieve the status of the receipt delivery, such as Requested or Processed, using the Intent: `SelectReceiptRequestIntentBuilder.Response.RECEIPT_DELIVERY_STATUS`
* Retrieve the status of the receipt selection type, such as Email, SMS, Print, or No\_Receipt, using the Intent:`SelectReceiptRequestIntentBuilder.Response.RECEIPT_DELIVERY_TYPE`
* Retrieve the email or SMS value, such as <customer@example.com>  or 5555551234, using the Intent: `SelectReceiptRequestIntentBuilder.Response.ENTERED_RECEIPT_VALUE`

## Response example

```kotlin Kotlin
fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
        super.onActivityResult(requestCode, resultCode, data)
        if (requestCode == SELECT_RECEIPT_REQUEST_CODE) {
            if (resultCode == RESULT_OK) {
                val payment: Payment = data.getParcelableExtra(SelectReceiptRequestIntentBuilder.Response.PAYMENT)
                val receiptDeliveryStatus = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.RECEIPT_DELIVERY_STATUS)
                val receiptDeliveryType = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.RECEIPT_DELIVERY_TYPE)
                val enteredReceiptValue = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.ENTERED_RECEIPT_VALUE)
            } else {
                // select receipt failed, check for error
                val failureMessage = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.FAILURE_MESSAGE)
            }
        }
    }
```
```java Java
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == SELECT_RECEIPT_REQUEST_CODE) {
      if (resultCode == RESULT_OK) {
        Payment payment = data.getParcelableExtra(SelectReceiptRequestIntentBuilder.Response.PAYMENT);
        String receiptDeliveryStatus = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.RECEIPT_DELIVERY_STATUS);
        String receiptDeliveryType = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.RECEIPT_DELIVERY_TYPE);
        String enteredReceiptValue = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.ENTERED_RECEIPT_VALUE);
      } else {
       // select receipt failed, check for error
        String failureMessage = data.getStringExtra(SelectReceiptRequestIntentBuilder.Response.FAILURE_MESSAGE);
      }
    }
  }
```