> 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/ios-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" %}

```swift
extension ViewController: FoloosiDelegate{
    func onPaymentError(descriptionOfError: String, transactionId: String, responseCode: String) {
        // Failure Callback.
    }

    func onPaymentSuccess(transactionId: String, responseCode: String) {
         // Success Callback
    }
}
```

{% endcode %}

### Foloosi Log

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

```
FLog.setLogVisible(debug: true or false)
```

### Sample Payment Reference.

Please check [this link](https://github.com/FoloosiTech/Foloosi-iOS-SDK/tree/master/Demo) for sample payment with above steps.

**NOTE**

Supports 170 World Currencies.

### Support &#x20;

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

## Developed by

Foloosi Technologies Pvt Ltd.

## License

Copyrights (c) 2025 Foloosi
