Quick Start
This practical guide will walk you through the basic integration between your Android application and the Getnet payment application via Deeplink. By the end of this tutorial, you will have triggered a payment command and processed the transaction response.
Before you begin
Before proceeding with the steps below, make sure you can meet these prerequisites.
-
You need to understand what a Polling call (
getnet://payment/v1/polling) to verify if the Getnet payment app is properly connected and ready to receive commands before starting a transaction. -
Basic knowledge of Android Intents and
onActivityResult.
Step 1: Validate the terminal connection (polling)
Before initiating a payment, it is a best practice to perform a Polling operation. This non-financial request verifies that the Getnet payment app is connected and ready to process transactions.
To perform this check, trigger an Intent using the following URI:
getnet://payment/v1/pollingHere's an example implementation:
Note: Polling does not require any parameters. Send the deeplink and the terminal responds with its current status.
The Getnet app returns the following parameters:
| Parameter | Type | Description |
|---|---|---|
result | String | Result of the operation: "0" for success (terminal ready). |
resultDetails | String | Detailed message regarding the terminal status. |
If theresultis"0", you are cleared to proceed to the Payment.
Step 2: Initialize the payment transaction
Intent with a specific URI. For the purpose of this tutorial, you will create a payment transaction using the following URI:getnet://payment/v1/paymentTo initiate a payment, you must build an Intent with specific request parameters passed as extras. Below is the table of the required parameters for the payment transaction:
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | String | Yes | Transaction amount with two implicit decimal places (e.g., "10000" = $100.00) |
originalAmount | String | Yes | Value in local currency to perform the transaction |
receiptCode | String | Yes | Identification code to be printed on receipt |
callerId | String | Yes | Unique identifier to correlate request with response |
| Parameter | Type | Description |
|---|---|---|
paymentMethod | String | "1" for Card, "2" for QR Code. Skips payment method selection screen. |
operationMode | String | "1" for calculated mode, "0" for manual (default) |
skipReceipt | String | Set to "true" to suppress the customer receipt view screen after approval |
allowPrintCurrentTransaction | String | Set to "true" to let Getnet handle receipt printing, "false" to receive raw receipt data |
Here is an example of an Android implementation:
Step 3: Process the payment response
After the payment process completes, the Getnet app returns an Intent containing the transaction results. You must extract these extras to verify if the payment was approved.
| Parameter | Type | Description |
|---|---|---|
result | String | Result of the operation: "0" for success, any other value indicates failure or cancellation |
resultDetails | String | Detailed message about the transaction result |
amount | String | Final charged amount with two implicit decimal places |
receiptCode | String | Identification code printed on receipt |
callerId | String | The unique identifier sent in the request |
nsu | String | Getnet transaction authorization code (unique per terminal) |
authorizationCode | String | Authorization code provided by the card issuer |
brand | String | Card brand used in the transaction (e.g., "VISA", "MASTERCARD") |
cardLastDigits | String | Last 4 digits of the card used |
cardBin | String | First 8 digits of the card (BIN) |
inputType | String | Card input method: "021" (magnetic), "051" (chip), "071" (contactless), "801" (fallback) |
installments | String | Number of installments (if applicable) |
planId | String | Installment plan ID used (if applicable) |
gmtDateTime | String | Transaction timestamp in GMT format (MMDDhhmmss) |
automationSlip | String | Receipt data in JSON format (if allowPrintCurrentTransaction = "false") |
Here's an example of a successful transaction response:
onActivityResult method to extract the response parameters. Here's an example implementation of how to handle the payment response:Complete implementation example
Here's a complete example that brings together all three steps:
Next steps
Congratulations! You have successfully completed the basic integration between your Android application and the Getnet payment app via Deeplink.
You now have a working foundation for processing payments through the Getnet payment app. With this knowledge, you can expand your integration to handle more complex scenarios, implement additional payment options, and create a robust payment experience for your users.
- Create a single-step payment - remove user interaction from the terminal flow.
- Create a payment with installments - offer installment plans at the terminal.
- Deeplink parameters reference - every parameter available per operation.
On this page