Getnet DocsGetnet Docs

Intent-Based Communication

This page explains how the Get Mini App2App integration uses Android Intents to enable communication between your application and the Get Mini app.

What are Android Intents?

Android Intents are messaging objects used to request an action from another app component. In the Get Mini App2App integration, Intents serve as the primary communication mechanism between your application and the Get Mini app.

How It Works

The communication between your application and the Get Mini app follows a simple request-response pattern. Your application creates an Intent with a specific action string and the required parameters, then launches it using Android’s activity result APIs. The Android system routes the Intent to the Get Mini application, which processes the transaction and returns control to your app with the result data.

Intent Actions and Parameters

The Get Mini integration uses three distinct Intent actions: one for payments (es.redsys.paysys.mPOSRedsys_PAYMENT_REQUEST), one for queries (es.redsys.paysys.mPOSRedsys_QUERY_REQUEST), and one for refunds (es.redsys.paysys.mPOSRedsys_REFUND_REQUEST). Each action requires specific parameters passed as Intent extras, such as transaction amounts, date ranges, or authorization details from previous transactions.

For complete specifications of all Intent actions and parameters, see the Request Parameters reference page.

Response Handling

After the Get Mini app completes the transaction, it returns control to your app with a result code and Intent extras. The result code indicates success (RESULT_OK) or failure (RESULT_CANCELED), while the extras contain detailed transaction information including authorization numbers, error messages, and receipt references.

Error Handling

If the Get Mini app is not installed on the device, attempting to launch the Intent will throw an ActivityNotFoundException. Your application should catch this exception and guide the user to install the app from the Google Play Store. Always use try-catch blocks when launching Intents, and parse all response extras even when transactions fail, as they contain valuable error information.

For guidance on handling app availability, see Handle App Availability.