---
page_title: Intent Handling
product: UPI TPAP SDK
platform: Android
page_source: https://juspay.io/pe/docs/upi-tpap-sdk-pe/android/interaction-with-sdk/intent-handling
llms_txt: https://juspay.io/pe/docs/llms.txt
product_llms_txt: https://juspay.io/pe/docs/upi-tpap-sdk-pe/llms.txt
---


## Intent Handling




###   Android Manifest Changes


Changes in manifest for Incoming Intent, Incoming Mandate and UPI Global.



#### Code Snippets: -

#### Java Code Snippet:

```java
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="in.juspay.devtools">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.SEND_SMS" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.NoActionBar"
        android:usesCleartextTraffic="true">
        <!-- block:start:intent -->
        <activity
            android:name=".DemoUPIActivity"
            android:exported="true"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data
                android:host="pay"
                android:pathPattern=".*"
                android:scheme="upi" />
            </intent-filter>
        </activity>
        <queries>
            <intent>
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="pay"
                    />
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="mandate"
                    />
                <data
                    android:scheme="upi"
                    android:pathPattern=".*"
                    android:host="global"
                    />
            </intent>
        </queries>
        <!-- block:end:intent -->
    </application>

</manifest>
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"Failed to fetch snippet"}
```



### Intent Response



Android will send result in [onActivityResult](../interaction-with-sdk/life-cycle-events). Following are the intent responses that Android will send:


###   Success



### Payload
- **RequestCode**:
  - Description: Calling apps requestCode
  - Tags: Integer
- **ResultCode**:
  - Description: Result Code
  - Value: Example: RESULT_OK
  - Tags: String
- **Data**:
  - Description: Intent Data
  - Value:
    - **Status**:
      - Description: Intent Status
      - Value: Example: Success
      - Tags: String
    - **TxnId**:
      - Description: Transaction ID
      - Value: Example: YBL99e9db4c88e84fb7834dff54cab92d09
      - Tags: String
    - **Response**:
      - Description: Intent Response
      - Value: Example: txnId=YBL99e9db4c88e84fb7834dff54cab92d09&txnRef=20220511319905447809&Status=Success&responseCode=00
      - Tags: String
    - **TxnRef**:
      - Description: Transaction Reference
      - Value: Example: 20220511319905447809
      - Tags: String
    - **ResponseCode**:
      - Description: Response Code
      - Value: Example: 00
      - Tags: String
  - Tags: JSON




#### Code Snippets: -

#### Java Code Snippet:

```java
{
    "requestCode": "requestcode",
    "resultCode": "RESULT_OK",
    "data": {
        "Status": "Success",
        "txnId": "YBL99e9db4c88e84fb7834dff54cab92d09",
        "response": "txnId=YBL99e9db4c88e84fb7834dff54cab92d09&txnRef=20220511319905447809&Status=Success&responseCode=00",
        "txnRef": " 20220511319905447809",
        "responseCode": "00"
    }
  }
```

#### Kotlin Code Snippet:

```kotlin
{
    "requestCode": "requestcode",
    "resultCode": "RESULT_OK",
    "data": {
        "Status": "Success",
        "txnId": "YBL99e9db4c88e84fb7834dff54cab92d09",
        "response": "txnId=YBL99e9db4c88e84fb7834dff54cab92d09&txnRef=20220511319905447809&Status=Success&responseCode=00",
        "txnRef": " 20220511319905447809",
        "responseCode": "00"
    }
  }
```



###   Failure



### Payload
- **RequestCode**:
  - Description: Calling apps requestCode
  - Tags: Integer
- **ResultCode**:
  - Description: Result Code
  - Value: Example: RESULT_OK
  - Tags: String
- **Data**:
  - Description: Intent Data
  - Value:
    - **Status**:
      - Description: Intent Status
      - Value: Example: FAILURE
      - Tags: String
    - **TxnId**:
      - Description: Transaction ID
      - Value: Example: YBL99e9db4c88e84fb7834dff54cab92d09
      - Tags: String
    - **Response**:
      - Description: Intent Response
      - Value: Example: txnId=YBLa1b5bc0ada0743c292400fa0be124733&txnRef=15155312749&Status=Failed&responseCode=01
      - Tags: String
    - **TxnRef**:
      - Description: Transaction Reference
      - Value: Example: 20220511319905447809
      - Tags: String
    - **ResponseCode**:
      - Description: Response Code
      - Value: Example: 01
      - Tags: String
  - Tags: JSON




#### Code Snippets: -

#### Java Code Snippet:

```java
{
    "requestCode": "requestcode",
    "resultCode": "RESULT_OK",
    "data": {
        "Status": "Failure",
        "txnId": "YBL99e9db4c88e84fb7834dff54cab92d09",
        "response": "txnId=YBL99e9db4c88e84fb7834dff54cab92d09&txnRef=20220511319905447809&Status=Failed&responseCode=01",
        "txnRef": " 20220511319905447809",
        "responseCode": "01"
    }
  }
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"Failed to fetch snippet"}
```



###   Backpress



### Payload
- **RequestCode**:
  - Description: Calling apps requestCode
  - Tags: Integer
- **ResultCode**:
  - Description: Result Code
  - Value: Example: RESULT_OK
  - Tags: String
- **Data**:
  - Description: Intent Data
  - Value:
    - **Status**:
      - Description: Intent Status
      - Value: Example: FAILURE
      - Tags: String
  - Tags: JSON




#### Code Snippets: -

#### Java Code Snippet:

```java
{
    "requestCode": "requestcode",
    "resultCode": "RESULT_OK",
    "data": {
        "Status": "Failure"
    }
  }
```

#### Kotlin Code Snippet:

```kotlin
{
    "requestCode": "requestcode",
    "resultCode": "RESULT_OK",
    "data": {
        "Status": "Failure"
    }
  }
```


---

## Complete Code Reference

The following code files are referenced in the steps above:

### AndroidManifest.xml

```
{"success":false,"message":"Failed to fetch snippet"}
```

### intenthandling.txt

```
{"success":false,"message":"Failed to fetch snippet"}
```


---

## See Also

- [Life Cycle Events](https://juspay.io/pe/docs/upi-tpap-sdk-pe/android/interaction-with-sdk/life-cycle-events)
- [IN-APP UPI with UI](https://juspay.io/pe/docs/upi-tpap-sdk-pe/android/ui-process-payloads/inapp-ui)
