Getnet DocsGetnet Docs

Create Payments with Installments and Plans

This guide walks you through processing credit card payments with installments using the Getnet Payment App. You can choose to let the terminal handle interest calculations (Manual Mode) or send the final calculated amount from your own system (Calculated Mode).

Before you begin

Before following the steps, you need to:

  • Getnet Payment App installed on the terminal.
  • Use a credit card as the payment method (paymentMethod="1").
  • The merchant must be authorized for specific installment plans via their tax engine configuration.

Installment parameters only apply to credit card transactions. They are not applicable to debit, QR Code, or voucher payments.

How it works

When a credit card is detected, the terminal validates the requested plan against the merchant’s authorized configurations via a Tax Engine. Understanding this validation process helps you anticipate the terminal behavior:

StepConditionTerminal Behavior
SelectionIf planId or installments parameters are missingThe terminal displays a selection screen for the operator to manually choose the plan.
Plan ValidationIf the provided planId matches the Tax Engine responseThe terminal skips the plan selection screen.
Installment ValidationIf the installments value is compatible with the Tax Engine responseThe terminal skips the installment selection screen and proceeds to confirmation.
AdjustmentIf the requested plan is not authorized or differs from the Tax EngineThe terminal forces the user to manually select a valid and authorized option.

Step 1: Choose the operation mode

Before initiating the transaction, define the operationMode. This parameter controls how transaction values are calculated:

Operation ModeValueBehavior
Manual“0” (default)The terminal calculates the final transaction values based on internal business rules and real-time user input collected during the payment flow.
Calculated“1”The third-party application is responsible for performing calculations and sending the final amount; the terminal receives the data without performing any modifications.

If operationMode is not specified, the terminal defaults to manual mode ("0").

Step 2: Create the payment with installments

To process a payment with installments, you need to create an Intent with the payment operation and include the installment-specific parameters.

How Plan and Installment Validation Works

The terminal performs a two-step validation process against the Tax Engine:

  1. Plan Validation: If the planId you send matches the merchant’s authorized plans returned by the Tax Engine, the terminal skips the plan selection screen.

  2. Installment Validation: After validating the plan, if the installments value is compatible with the Tax Engine response for that plan, the terminal also skips the installment selection screen.

Only when both validations pass does the terminal proceed directly to the confirmation screen. If either validation fails, the terminal prompts the user to manually select a valid and authorized option.

The table below lists the parameters you can send in the Intent:

ParameterTypeDescriptionRequired
amountStringTransaction amount with two implicit decimal places (e.g., “10000” = $100.00).Yes
originalAmountStringValue in local currency to perform the transaction.Yes
tipStringTip amount to be added to the transaction total. Decimal representation is the same as amount parameter (e.g., “500” = $5.00).No
waiterCodeStringWaiter code for tip attribution. Required if a tip is provided.Conditional
receiptCodeStringIdentification code to be printed on receipt.Yes
callerIdStringUnique identifier to correlate request with response.Yes
paymentMethodStringPayment method: "1" for Card, "2" for QR Code. If not specified, user will be prompted to select.No
installmentsStringNumber of desired installments. Only applicable to credit transactions.No
planIdStringInstallment plan ID. Check the available plans for your market.No
interestStringWhether the installment plan includes interest ("true") or is interest-free ("false").No
operationModeStringDefines calculation mode: "0" for manual (terminal calculates) or "1" for calculated (app calculates). See Interest Calculation Strategy guide.No
skipConfirmationStringSet to "true" to skip installment details confirmation screens; "false" (default) displays screen normally - users must interact to proceed.No
skipReceiptStringSet to "true" to suppress the customer receipt view screen after approval. "false" (default) displays screen normally.No
allowPrintCurrentTransactionStringSet to "true" to let Getnet handle receipt printing (default behavior), "false" to receive raw receipt data. See Printing Responsibility guide.No

The following code block shows an example of how to create a payment with installments:

private val REQUEST_CODE = 1001

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    val intent = Intent(Intent.ACTION_VIEW, Uri.parse("getnet://payment/v1/payment"))
    
    // Mandatory for Payment
    intent.putExtra("amount", "10000") // $100.00
    intent.putExtra("originalAmount", "10000")
    intent.putExtra("callerId", "123456")
    intent.putExtra("receiptCode", "654321")
    
    // Specific for Installments and Plans
    intent.putExtra("installments", 5) 
    intent.putExtra("planId", "plan_emisor")
    intent.putExtra("interest", "false")
    intent.putExtra("operationMode", "1") // Calculated mode
    intent.putExtra("skipConfirmation", "false")
    
    startActivityForResult(intent, REQUEST_CODE)
}

Step 3: Handle the response

After the customer completes the transaction, the Getnet Payment App returns the final confirmed plan details to your application via onActivityResult.

Response Parameters

The following table lists the response parameters you will receive:

ParameterTypeDescription
resultStringTransaction result: "0" indicates success. See Result Codes reference for all codes.
resultDetailsStringDetailed message about transaction results (e.g., “APPROVED”, error descriptions)
amountStringFinal transaction amount with two implicit decimal places
tipStringTip amount added to the transaction (if provided)
waiterCodeStringWaiter code for tip attribution (if provided)
receiptCodeStringIdentification code printed on receipt
callerIdStringThe unique identifier sent in the request to correlate with response
nsuStringGetnet transaction authorization code - unique per terminal (cannot be repeated in a day)
authorizationCodeStringAuthorization code provided by the card issuer
paymentTypeStringPayment type used: credit, debit, voucher, etc.
brandStringCard brand (e.g., “VISA”, “MASTERCARD”)
cardBinStringFirst 8 digits of the card (BIN)
cardLastDigitsStringLast 4 digits of the card used
inputTypeStringCard input method: "021" (magnetic stripe), "051" (chip), "071" (contactless chip), "801" (magnetic stripe - fallback)
gmtDateTimeStringGMT date and time of transaction (format: MMDDhhmmss, GMT UTC 0)
installmentsStringNumber of installments confirmed for the transaction
planIdStringInstallment plan selected or validated during the transaction
interestStringWhether interest was applied: "true" (with interest) or "false" (without interest)
automationSlipStringReceipt data in JSON format (returned when allowPrintCurrentTransaction = "false"). See Printing Responsibility guide.

The following code block shows an example of handling the response:

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    
    if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
        val extras = data?.extras
        val result = extras?.getString("result")
        
        if (result == "0") {
            // SUCCESS: Extract transaction details
            val installments = extras?.getString("installments")
            val planId = extras?.getString("planId")
            val interest = extras?.getString("interest")
            val nsu = extras?.getString("nsu")
            val authCode = extras?.getString("authorizationCode")
            val amount = extras?.getString("amount")
            
            Log.d("Payment", "Payment approved with $installments installments")
            Log.d("Payment", "Plan: $planId, Interest: $interest")
            Log.d("Payment", "NSU: $nsu, Auth Code: $authCode")
        } else {
            // FAILURE: Handle error
            val errorDetails = extras?.getString("resultDetails")
            Log.e("Payment", "Payment failed: $errorDetails (Code: $result)")
        }
    }
}

Example of a successful response:

{
  "result": "0",
  "resultDetails": "APPROVED",
  "amount": "10000",
  "installments": "5",
  "planId": "plan_emisor",
  "interest": "false",
  "callerId": "123456",
  "nsu": "57003",
  "authorizationCode": "004433"
}

Next steps