# Create Card Present QR Code Payments (Account-to-Account)

This guide walks you through processing an **account-to-account QR Code payment** in a **Card Present (CP)** environment using the Getnet Regional API. In this flow, the merchant's physical terminal requests a dynamic EMV QR code from the gateway, displays it to the customer, and the customer scans it with their banking app to authorize the payment directly from their bank account.

<Callout type="warning">

This is not Pix.** The QR Code flow described here is an **account-to-account** payment method processed through the Visa/Mastercard networks. It is currently available for **Chile only**. Support for additional countries (Argentina via Transferencia 3.1, Brazil via Pix) will be added in future releases.

</Callout>

## Requirements

Before initiating a QR code request, ensure the following:

- **API Credentials**: Obtain your `client_id` and `client_secret` from the Integration Support team.
- **Authentication**: Generate a Bearer token via the [Authentication endpoint](https://docs.globalgetnet.com/en/products/online-payments/regional-api/swagger#tag/authentication).
- **Terminal Hardware**: A physical device (POS/TEF) capable of displaying images or high-resolution text for QR code rendering.
- **Serial Number**: The physical `serial_number` of the device must be provided in every request.
- **Brand Support**: Currently available exclusively for **Visa** and **Mastercard**.

## How It Works

The Card Present QR Code flow has three stages:

| Stage | Actor | Action |
| --- | --- | --- |
| **1. Generate** | Terminal → API | The terminal sends a `POST` request to the QR Code endpoint and receives an EMV QR payload (`HTTP 201`). |
| **2. Display** | Terminal → Customer | The terminal renders the QR string as a scannable image on its screen. The customer scans it with their banking app. |
| **3. Confirm** | API → Terminal | The payment is authorized asynchronously. The terminal confirms the final status via webhooks or the Get Transaction endpoint. |

<Callout type="warning">

**Expiration**: QR codes generated via this endpoint expire after **1 minute and 50 seconds**. If the customer does not scan and authorize within this window, discard the code and generate a new one.

</Callout>

## QR Code Payment Process

### Step 1: Create the QR Code Request

Send a `POST` request to the [QR Code endpoint](https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/qrcode) to generate the EMV QR payload.

#### Request Fields

| Field | Type | Constraints | Description | Required |
| --- | --- | --- | --- | --- |
| `idempotency_key` | String | 1–64 chars, alphanumeric + `.-_` | Unique key to prevent duplicate requests. | **Yes** |
| `request_id` | String (UUID) | 36 chars | Unique identifier for this request. | **Yes** |
| `order_id` | String | 1–36 chars | Your internal order reference. | **Yes** |
| `amount` | Integer | In cents | Transaction amount (e.g., `10000` = 100.00). | **Yes** |
| `currency` | String | ISO 4217 | Currency code (e.g., `CLP`). | **Yes** |
| `payment_method` | Enum | `PURCHASE`, `INVOICE`, `COLLECTION` | The type of payment operation. | **Yes** |
| `transaction_type` | Enum | `NO_INTEREST`, `WITH_INTEREST` | Whether installment interest applies. | **Yes** |
| `serial_number` | String | — | Unique serial number of the physical terminal. | **Yes** |
| `payment_id` | String (UUID) | 36 chars | Optional payment identifier if pre-assigned. | No |
| `additional_data.fee.range_acquirer` | String | — | Acquirer fee range code. | No |
| `additional_data.fee.range_issuer` | String | — | Issuer fee range code. | No |

#### Example Request

```bash
curl --location --request POST 'https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/qrcode' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'x-transaction-channel-entry: XX' \
--data-raw '{
  "idempotency_key": "cp-qr-visa-001",
  "request_id": "daac03dc-73db-453f-9bea-b1391669d5d3",
  "order_id": "ORDER-101",
  "amount": 10000,
  "currency": "CLP",
  "payment_method": "PURCHASE",
  "transaction_type": "NO_INTEREST",
  "serial_number": "CL00027L"
}'
```

### Step 2: Display the QR Code

A successful request returns `HTTP 201` with a JSON body containing the `qr_code` EMV string inside `additional_data`. Render this string as a scannable image on the terminal screen.

#### Response Fields

| Field | Type | Description |
| --- | --- | --- |
| `payment_id` | String (UUID) | Unique identifier for this payment. Use this to poll the final status. |
| `seller_id` | String (UUID) | Identifier of the seller account. |
| `request_id` | String (UUID) | Echoes the `request_id` sent in the request. |
| `idempotency_key` | String | Echoes the `idempotency_key` sent in the request. |
| `order_id` | String | Echoes the `order_id` sent in the request. |
| `amount` | Integer | Transaction amount in cents. |
| `currency` | String | ISO 4217 currency code. |
| `status` | Enum | Result of QR code generation: `APPROVED`, `DENIED`, `ERROR`, or `ACCEPTED`. |
| `reason_code` | String (2 chars) | Return code from the gateway or acquirer. |
| `reason_message` | String | Human-readable return message from the gateway. |
| `additional_data.transaction_id` | String | Transaction identifier generated by the gateway. |
| `additional_data.creation_date_qrcode` | String (ISO 8601) | Timestamp when the QR code was created. |
| `additional_data.expiration_date_qrcode` | String (ISO 8601) | Timestamp when the QR code expires (110 seconds after creation). |
| `additional_data.qr_code` | String | The EMV QR code string to render as a scannable image. |
| `additional_data.qr_code_emv_type` | Enum | QR code type: `static` or `dynamic`. |
| `additional_data.third_party_qr_code_id` | String | QR code identifier generated by the third-party provider. |
| `additional_data.third_party_order_id` | String | Order identifier generated by the third-party provider. |

#### Example Response (`HTTP 201`)

```json
{
  "payment_id": "03ec0ede-3bc9-42dd-a71b-1c3a670b2b89",
  "seller_id": "e0ed6f00-fdc5-46d6-9557-6a2cac641b09",
  "request_id": "daac03dc-73db-453f-9bea-b1391669d5d3",
  "idempotency_key": "cp-qr-visa-001",
  "order_id": "ORDER-101",
  "amount": 10000,
  "currency": "CLP",
  "status": "APPROVED",
  "reason_code": "00",
  "reason_message": "TRANSACTION EXECUTED SUCCESSFULLY",
  "additional_data": {
    "transaction_id": "890005df15a2-0b1e-4c6e-8ece",
    "qr_code": "00020101021241260009cl.getnet98097605970315204...",
    "qr_code_emv_type": "dynamic",
    "creation_date_qrcode": "2026-02-19T14:48:00.000Z",
    "expiration_date_qrcode": "2026-02-19T14:49:50.000Z",
    "third_party_qr_code_id": "61260970G",
    "third_party_order_id": "61260970G"
  }
}
```

<Callout type="note">

`status: "APPROVED"` means the **QR code was successfully generated** — it does **not** indicate that the customer has paid. You must verify the actual fund-transfer status separately using the `payment_id`.

</Callout>

**To process the response:**

1. Extract `additional_data.qr_code` and render it as a scannable QR image on the POS screen.
2. Start a countdown timer using `expiration_date_qrcode` to auto-discard expired codes.
3. Store the `payment_id` to query the final authorization status in Step 3.

### Step 3: Verify the Transaction Status

After the customer scans the QR code, verify that the payment was completed using one of these methods:

- **Webhooks**: Configure your integration to receive asynchronous payment status notifications.
- **Polling**: Call the [Get Transaction endpoint](https://docs.globalgetnet.com/en/products/online-payments/regional-api/swagger#tag/payment-record-management/get/dpm/hub-payment-info/v1/payments/info/{payment_id}) with the `payment_id` returned in Step 2.

## Error Responses

| HTTP Status | Description |
| --- | --- |
| `400 Bad Request` | Malformed request or missing required fields. |
| `401 Unauthorized` | Invalid or expired Bearer token. |
| `404 Not Found` | Referenced resource not found. |
| `422 Unprocessable Entity` | Request was well-formed but failed business logic validation. |
| `429 Too Many Requests` | Rate limit exceeded. |
| `500 Internal Server Error` | Unexpected error on the server. |
| `503 Service Unavailable` | Service temporarily unavailable. |
| `504 Gateway Timeout` | Gateway did not receive a timely response. |

## Next Steps

Now that you understand QR Code payments, explore these related Card Present features:

- **[Single-Step Payments](/en/global-api/sep-card-present/payment-guides-cp/single-step-payment-cp)**: Process standard chip and magnetic stripe sales.
- **[Pre-authorized Payments](/en/global-api/sep-card-present/payment-guides-cp/pre-auth-payment-cp)**: Manage two-step flows for reservations and delayed captures.
- **[Cancel a Payment](/en/global-api/sep-card-present/payment-guides-cp/cancel-a-payment-cp)**: Reverse a previously captured transaction.
- **[Terminal Requirements](/en/global-api/reference-global/terminal-requirements)**: Verify your device supports QR display capabilities.
- **[Card Present Workflow](/en/global-api/sep-card-present/core-concepts-cp/card-payment-flow-cp)**: Review the low-level sequence diagrams for all CP flows.