Getnet DocsGetnet Docs

Query Operations

This guide walks you through retrieving transaction history using the Get Mini App2App integration. You’ll learn how to query operations within a specific date range for reporting and reconciliation purposes.

Requirements

Before following the steps, ensure you have:

  • Get Mini application installed on the Android device
  • Compatible PIN pad device paired and connected
  • ActivityResultLauncher properly registered in your Activity or Fragment

Query operations are useful for end-of-day reports, shift reconciliation, and transaction lookups.

Query Process

This section guides you through creating a query Intent with a date range. The Get Mini app will retrieve all transactions processed within the specified period and return them as a formatted report.

Step 1: Create the Query Intent

Create an Intent with the action es.redsys.paysys.mPOSRedsys_QUERY_REQUEST and specify the date range for your query. Both dates must be provided in YYYYMMDD format.

The table below lists the required fields:

ParameterTypeRequiredDescription
dateFromStringYesStart date for the query range (YYYYMMDD format).
dateUntilStringYesEnd date for the query range (YYYYMMDD format).

Ensure both dates use consistent YYYYMMDD formatting (e.g., 20240101 for January 1, 2024).

The following code shows how to create and launch the query Intent:

// Create the Intent
Intent intent = new Intent("es.redsys.paysys.mPOSRedsys_QUERY_REQUEST");

// Add date range parameters
intent.putExtra("dateFrom", "20240101");
intent.putExtra("dateUntil", "20240131");

// Launch the Get Mini app
queryLauncher.launch(intent);

Step 2: Handle the Query Result

After retrieving the transaction data, the Get Mini app returns control to your application with the result. The response includes a receipt document containing the transaction history for the specified period.

For complete details on handling responses, see Handle Transaction Results.

Next Steps

Now that you’ve retrieved transaction history, you can explore related features: