> For the complete documentation index, see [llms.txt](https://docs.foloosi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.foloosi.com/mobile-sdk-integrations/android-sdk/payment-response-handling.md).

# Payment Response Handling

### Implement Payment Listener

Set and Implement our payment listener to receive payment results.  Use the code below to obtain the payment result.

{% code lineNumbers="true" %}

```java
//Implementing
public class ActDemoPay extends AppCompatActivity implements FPayListener {

    @Override
    public void onTransactionSuccess(String transactionId, String responseCode) {
        // Success Callback
    }

    @Override
    public void onTransactionFailure(String error, String transactionId, String responseCode) {
        // Failure Callback.
    }

    @Override
    public void onTransactionCancelled(String responseCode) {
        // Transaction Cancelled by User
    }

}
```

{% endcode %}

### Foloosi Log

You can enable / disable the SDK logs by using the line of code below. It will be disabled by default.

```
FoloosiLog.setLogVisible(true or false);
```

#### List of properties available, <a href="#list-of-properties-available" id="list-of-properties-available"></a>

​

| Name                       | Type   | Required | Description                                                              |
| -------------------------- | ------ | -------- | ------------------------------------------------------------------------ |
| merchantKey                | string | true     | your foloosi merchant key                                                |
| secretKey                  | string | true     | your foloosi secret key                                                  |
| referenceToken             | string | true     | the reference token - generates automatically if null                    |
| setOrderAmount             | double | true     | transaction amount                                                       |
| setCurrencyCode            | string | true     | transaction currency                                                     |
| setName                    | string | false    | customer name - auto render in payment popup if passed                   |
| setEmail                   | string | false    | customer email - auto render in payment popup if passed                  |
| setMobile                  | string | false    | customer mobile - auto render in payment popup if passed                 |
| setCustomerUniqueReference | string | false    | It must be unique for the customer,Like customer unique id or email id., |

### Support

Visit <https://www.foloosi.com> for support requests or email to <tech@foloosi.com>.

## Developed by

Foloosi Technologies Pvt Ltd.

## License

Copyrights (c) 2025 Foloosi
