Skip to content

Feedback (Webhooks)

This is the service through which payment-related statuses (sale, cancellation) are sent to you. Delivery is provided by defining a callback URL for services that conform to the feedback models and by meeting the expected models.

INFO

If feedback is not expected, defining a callback URL is not mandatory.

Manifest Settings

The following intent filter must be added to your application's AndroidManifest.xml file:

xml
<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:scheme="https"/>
    <data android:host="www.domain.com"/>
    <data android:pathPattern="/odeal_gateway"/>
</intent-filter>

Important

Remember to replace the android:host and android:pathPattern values with your own domain and path information.

Retrieving the Payment Result

Whichever Activity the above intent filter was added to, the payment result can be accessed by calling the following function in that Activity's onCreate() method:

java
private void getDeeplinkData() {
    Uri intentData = getIntent().getData();
    
    if (intentData != null) {
        try {
            // Log all incoming data
            Log.d("IntentDataTag", "IntentData: " + intentData);

            // Parse query parameters
            String basketReferenceCode = intentData.getQueryParameter("basketReferenceCode");
            String reason = intentData.getQueryParameter("reason");
            boolean result = Boolean.parseBoolean(intentData.getQueryParameter("result"));
            
            Log.d("IntentDataTag", "IntentData: Basket Reference Code: " + basketReferenceCode 
                + " Reason: " + reason + " Result: " + result);
        } catch (Exception e) {
            Log.e("IntentDataTag", "IntentData: Exception -> " + e);
        }
    } else {
        Log.d("IntentDataTag", "IntentData: There is no data");
    }
}

Returned Parameters

ParameterTypeDescription
basketReferenceCodeStringBasket reference code
reasonStringDescription of the transaction result
resultBooleanTransaction success status (true/false)

Usage

If the result parameter is true, the payment was successful; if false, the payment failed or was cancelled.

https://www.domain.com/odeal_gateway?basketReferenceCode=ABC123&reason=Payment+successful&result=true

Ödeal A.Ş.