> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/docs/checkout/in-person/creating-terminal-session",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Creating a terminal session

> Build the request body for an in-person card payment on a Dintero terminal, including store identifiers, sale, and refund examples.

A terminal session is a regular Checkout session with one addition: `order.store` carries the identifiers that route the payment to a specific terminal. The `seitatech.in_person` payment method is enabled through your [payment profile](/docs/checkout/payment-profiles).

## Endpoint

```http theme={null}
POST https://checkout.dintero.com/v1/sessions-profile
Authorization: Bearer <token>
Content-Type: application/json
```

See [POST /sessions-profile](/api-reference/session/create-checkout-session-from-profile) for the full schema.

## Enable in-person payments via a payment profile

In-person payments are enabled on a [payment profile](/docs/checkout/payment-profiles) in Dintero Backoffice → **Settings** → **Payment Profiles**. Enable **Seitatech In-Person Payments** on the profile you reference with `profile_id`, and the session will accept terminal payments without any payment-method configuration in the request body.

<Info>
  Managing payment methods through profiles means you can add or change methods without redeploying integration code. Avoid sending a hardcoded `configuration.seitatech` block on the request - let the profile drive it.
</Info>

## Where the terminal ID goes

The terminal ID belongs in `order.store.terminal_id`. The payment profile toggles the payment method on; `order.store` says which physical terminal the payment runs on.

```json theme={null}
{
  "order": {
    "store": {
      "id": "oslo-center",
      "terminal_id": "T0292",
      "payout_destination_id": "seller-1"
    }
  }
}
```

The three fields are required together for in-person payments:

| Field                               | Description                                                                                                                                                              |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `order.store.id`                    | Your merchant store identifier - the `store_id` you sent when creating the store, the same one you already use in the payment-link flow. Not the Dintero-generated `id`. |
| `order.store.terminal_id`           | The `terminal_id` returned when the terminal was registered (for example `P11223351-T0013`). Must be enrolled and linked to the store.                                   |
| `order.store.payout_destination_id` | The `payout_destination_id` linked to the store.                                                                                                                         |

<Info>
  The `order.store.id` you use today in the payment-link flow is fine to keep using - in-person payments use the same store identifier. You just need to add `terminal_id` and `payout_destination_id` alongside it.
</Info>

## Sale: full request

This example creates a session that immediately triggers a payment on terminal `T0292` at store `oslo-center` for 399.00 NOK. The payment profile referenced by `profile_id` has Seitatech In-Person Payments enabled, so no `configuration` block is needed.

```json theme={null}
{
  "url": {
    "return_url": "https://yourpos.example.com/payment/return",
    "callback_url": "https://yourpos.example.com/payment/callback"
  },
  "order": {
    "amount": 39900,
    "currency": "NOK",
    "merchant_reference": "order-12345",
    "items": [
      {
        "id": "sku-coffee-001",
        "line_id": "1",
        "description": "Premium Coffee Beans 1kg",
        "quantity": 2,
        "amount": 39900,
        "vat_amount": 4275,
        "vat": 12
      }
    ],
    "store": {
      "id": "oslo-center",
      "terminal_id": "T0292",
      "payout_destination_id": "seller-1"
    }
  },
  "profile_id": "your_profile_id"
}
```

<Info>
  Amounts are in the smallest unit of the currency. `39900` is 399.00 NOK.
</Info>

### When does the terminal start prompting?

Dintero starts the transaction on the terminal as soon as the session is created. You don't have to do anything else.

<Info>
  `seitatech.in_person` must be the only enabled payment method on the session. Mixing it with other payment methods is not currently supported - configure a dedicated in-person payment profile for terminal sessions.
</Info>

### Receiving the result

Use the `callback_url` and webhooks to know when the transaction is authorized and captured. Terminal payments use auto-capture by default. See [Checkout webhooks](/docs/checkout/checkout-webhooks) and [transaction management](/docs/checkout/transaction-management).

## Refund

Refunds for in-person payments use the standard [refund endpoint](/api-reference/transactions/refund-transaction). There is no terminal-specific refund flow.

```http theme={null}
POST https://checkout.dintero.com/v1/transactions/{transaction_id}/refund
Authorization: Bearer <token>
Content-Type: application/json
```

Full refund:

```json theme={null}
{
  "amount": 39900,
  "reason": "Customer return"
}
```

Partial refund with line items:

```json theme={null}
{
  "amount": 19900,
  "reason": "One item returned",
  "items": [
    {
      "line_id": "1",
      "amount": 19900,
      "quantity": 1
    }
  ]
}
```

The refund is settled against the original card payment - the customer does not need to present the card again.

## Quick reference: answers to common integration questions

| Question                            | Answer                                                                                                                                        |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| How do I enable in-person payments? | Enable Seitatech In-Person Payments on a [payment profile](/docs/checkout/payment-profiles) in Backoffice and reference it with `profile_id`. |
| Where does `terminal_id` go?        | `order.store.terminal_id`.                                                                                                                    |
| Is `order.store.id` enough?         | Yes - reuse the same store ID you already send. Just add `terminal_id` and `payout_destination_id` alongside it.                              |
| How do I trigger a sale?            | Create the session against an in-person payment profile with the `order.store` identifiers. The terminal prompts automatically.               |
| How do I refund?                    | `POST /v1/transactions/{transaction_id}/refund` - same as e-commerce.                                                                         |
