# Create a Single-Step Payment

This guide shows you how to create an automated payment flow that minimizes user interaction by pre-configuring payment parameters and bypassing manual selection screens. With a single-step payment, the terminal processes the transaction quickly with minimal taps from the user.

## Before you begin

Before starting, ensure you have:

* Read how to perform a [Polling call](/en/app2app/first-steps-a2a/create-polling-guide) (`getnet://payment/v1/polling`) before initiating the transaction to ensure there are no pending transactions or locked processes.
* Getnet Payment App installed on the Android terminal.
* A unique `callerId` to correlate the request with the response.

<Callout type="warning">

Single-step payments work best when combined with calculated operation mode (`operationMode = "1"`), where your application handles all interest calculations before sending the request.

</Callout>

## Step 1: Configure and send the payment Intent

To create a single-step flow, configure the Intent with all required parameters and automation flags. The following table describes all parameters you can use:

| 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. |
| `tip` | String | No | Tip amount to be added to the transaction total. Decimal representation is the same as amount parameter (e.g., "500" = \$5.00) |
| `waiterCode` | String | Conditional | Waiter code for tip attribution. Required if a tip is provided. |
| `receiptCode` | String | Yes | Identification code to be printed on receipt |
| `callerId` | String | Yes | Unique identifier to correlate request with response |
| `paymentMethod` | String | No | `"1"` for Card, `"2"` for QR Code. Skips payment method selection screen. |
| `installments` | String | No | Number of desired installments (credit card only) |
| `planId` | String | No | Installment plan ID. Check available plans for your market. |
| `interest` | String | No | Whether the installment plan includes interest (`"true"`) or is interest-free (`"false"`) |
| `operationMode` | String | No | `"1"` for calculated mode (your app handles interest), `"0"` for manual (terminal processes business rules). See Interest Calculation Strategy guide. |
| `skipConfirmation` | String | No | Set to `"true"` to bypass the installment and interest review screen. `"false"` (default) displays the screen normally - users must interact to proceed. |
| `skipReceipt` | String | No | Set to `"true"` to suppress the customer receipt view screen after approval. `"false"` (default) displays the screen normally. |
| `allowPrintCurrentTransaction` | String | No | Set to `"true"` to let Getnet handle receipt printing (default behavior). See Printing Responsibility guide. |

Here's a basic example with the required parameters:

```kotlin
private val REQUEST_CODE = 1001

val intent = Intent(Intent.ACTION_VIEW, Uri.parse("getnet://payment/v1/payment"))
intent.putExtra("amount", "10000")              // $100.00
intent.putExtra("originalAmount", "10000")
intent.putExtra("receiptCode", "987654")
intent.putExtra("callerId", "req_001")

startActivityForResult(intent, REQUEST_CODE)
```

## Step 2: Handle the response

The terminal returns the response via `onActivityResult`. Check the `result` field to confirm success:

```kotlin
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    
    if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) {
        val result = data?.extras?.getString("result")
        
        when (result) {
            "0" -> {
                // Transaction approved
                val nsu = data?.extras?.getString("nsu")
                val authCode = data?.extras?.getString("authorizationCode")
                val amount = data?.extras?.getString("amount")
                // Handle success
            }
            else -> {
                // Transaction failed or cancelled
                val resultDetails = data?.extras?.getString("resultDetails")
                // Handle error
            }
        }
    }
}
```

**Response Parameters**

The terminal response includes the following key fields:

| Parameter | Type | Description |
| :--- | :--- | :--- |
| result | String | Transaction result: `"0"` for success, other values indicate failure or cancellation. See Result Codes reference. |
| resultDetails | String | Detailed message about transaction results (e.g., "APPROVED", error descriptions) |
| amount | String | Final charged amount with two implicit decimal places |
| tip | String | Tip amount added to the transaction (if provided) |
| waiterCode | String | Waiter code for tip attribution (if provided) |
| receiptCode | String | Identification code printed on receipt |
| callerId | String | The unique identifier sent in the request to correlate with response |
| nsu | String | Getnet transaction authorization code - unique per terminal (cannot be repeated in a day) |
| authorizationCode | String | Authorization code provided by the card issuer |
| paymentType | String | Payment type used: credit, debit, voucher, etc. |
| brand | String | Card brand (e.g., "VISA", "MASTERCARD") |
| cardBin | String | First 8 digits of the card (BIN) |
| cardLastDigits | String | Last 4 digits of the card used |
| inputType | String | Card input method: `"021"` (magnetic stripe), `"051"` (chip), `"071"` (contactless chip), `"801"` (magnetic stripe - fallback) |
| gmtDateTime | String | GMT date and time of transaction (format: MMDDhhmmss, GMT UTC 0) |
| installments | String | Number of installments processed (if applicable) |
| planId | String | Installment plan ID used during transaction (if applicable) |
| interest | String | Whether interest was applied: `"true"` (with interest) or `"false"` (without interest) |
| automationSlip | String | Receipt data in JSON format (returned when `allowPrintCurrentTransaction = "false"`). See Printing Responsibility guide. |

## Next steps

After successfully creating a payment, you may want to explore:

* [Create Payments with Installments](/en/app2app/payment-guides-a2a/create-installments-and-plan) - Process credit card payments with installment plans
* [Interest Calculation Strategy](/en/app2app/core-concept-a2a/interest-calculation-strategy) - Understand operation modes for installment calculations
* [Process Refunds and Cancellations](/en/app2app/core-concept-a2a/refund-and-cancellation) - Reverse or cancel previous transactions
* [Printing Responsibility](/en/app2app/core-concept-a2a/printing-responsibility) - Handle custom receipt printing in your application
* [Result Codes Reference](/en/app2app/reference-a2a/result-codes-data-structure) - Complete list of transaction status codes