> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/api-reference/open-api-references/checkout/checkout-sessions.md).

# Checkout Sessions

A **checkout session** generates a hosted payment page (HPP) URL that the customer visits to complete payment. Sessions support cards, digital wallets (Google Pay, Apple Pay, PayPal), and local payment methods (Klarna, Vipps, Swish, MobilePay, and more). Once created, a session URL is valid for up to **30 days**.

{% hint style="warning" %}
A checkout session expires after 30 days or after 3 failed payment attempts (error `165`). Completed sessions cannot be reused (error `168`).
{% endhint %}

## How It Works

{% stepper %}
{% step %}

### Create the session

Call `POST /v2/checkout` with your `entity_id`, `amount`, `currency_code`, and the payment method configuration(s) you want to accept. The response includes a `redirect_url` — this is the hosted payment page you send the customer to.
{% endstep %}

{% step %}

### Redirect the customer

Send the customer to the `redirect_url`. Verifone hosts the payment form; the customer selects their payment method and completes the transaction.
{% endstep %}

{% step %}

### Handle the return

After payment, the customer is redirected to your `return_url`. Use `GET /v2/checkout/{checkoutId}` to retrieve the final session status and transaction details.
{% endstep %}
{% endstepper %}

## Payment Method Configurations

The `configurations` object in the create request controls which payment methods appear on the hosted page and how they behave.

{% tabs %}
{% tab title="Card" %}

#### Card (`configurations.card`)

Supports modes: `PAYMENT`, `3DS_PAYMENT`, `3DS`, and `CARD_CAPTURE`.

* `mode` ✅ — Controls the transaction type
* `payment_contract_id` ✅ — Required for `PAYMENT` and `3DS_PAYMENT`
* `capture_now` ➖ — Set `true` to capture immediately; `false` for pre-auth (not compatible with `CARD_CAPTURE`)
* `threed_secure` ➖ — 3DS configuration block; required for `3DS` and `3DS_PAYMENT` modes

{% hint style="info" %}
`CARD_CAPTURE` mode captures the card details only — no payment is processed.
{% endhint %}
{% endtab %}

{% tab title="Digital Wallets" %}

#### Google Pay, Apple Pay (`configurations.google_pay` / `configurations.apple_pay`)

Both wallets use a nested `card` block for payment contract and 3DS settings:

* `capture_now` ➖ — Capture immediately or hold for later
* `card.payment_contract_id` ✅ — Payment contract to use
* `card.sca_compliance_level` ✅ — `NONE`, `WALLET`, or `FORCE_3DS`
* `card.threed_secure` ➖ — 3DS configuration

**SCA compliance levels:**

| Value        | Behaviour                              |
| ------------ | -------------------------------------- |
| `NONE`       | No SCA required                        |
| `WALLET`     | Rely on the wallet's own SCA mechanism |
| `FORCE_3DS`  | Always perform an additional 3DS step  |
| {% endtab %} |                                        |

{% tab title="PayPal" %}

#### PayPal (`configurations.paypal`)

* `payment_contract_id` ✅ — PayPal payment contract
* `capture_now` ➖ — Immediate capture or deferred
* `shopper_interaction` ➖ — `ECOMMERCE` or `MOTO`
  {% endtab %}

{% tab title="Local Methods" %}

#### Klarna, Vipps, Swish, MobilePay, Bank, PLCC

Each method has its own configuration key under `configurations`. Common fields:

* `payment_contract_id` ✅ — Required for most methods
* `capture_now` ➖ — Where applicable
* `shopper_interaction` ➖ — Swish requires `MCOMMERCE` or `ECOMMERCE`

{% hint style="info" %}
For Swish mobile commerce (`MCOMMERCE`), you may also pass `app_phone_number` to pre-fill the shopper's number.
{% endhint %}
{% endtab %}
{% endtabs %}

***

## API Reference

## Create a Checkout

{% openapi src="/files/2a1a4293ec587ee0129ad1caaed6983120845ba1" path="/v2/checkout" method="post" %}
[a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml](https://content.gitbook.com/content/OiXbo96Og9EN7rz2U44K/blobs/guUKPLHPZbgfg8qR8yIs/a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml)
{% endopenapi %}

## List Checkouts

{% openapi src="/files/2a1a4293ec587ee0129ad1caaed6983120845ba1" path="/v2/checkout" method="get" %}
[a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml](https://content.gitbook.com/content/OiXbo96Og9EN7rz2U44K/blobs/guUKPLHPZbgfg8qR8yIs/a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml)
{% endopenapi %}

## Get a Checkout

{% openapi src="/files/2a1a4293ec587ee0129ad1caaed6983120845ba1" path="/v2/checkout/{checkoutId}" method="get" %}
[a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml](https://content.gitbook.com/content/OiXbo96Og9EN7rz2U44K/blobs/guUKPLHPZbgfg8qR8yIs/a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml)
{% endopenapi %}

## Update a Checkout

{% openapi src="/files/2a1a4293ec587ee0129ad1caaed6983120845ba1" path="/v2/checkout/{checkoutId}" method="patch" %}
[a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml](https://content.gitbook.com/content/OiXbo96Og9EN7rz2U44K/blobs/guUKPLHPZbgfg8qR8yIs/a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml)
{% endopenapi %}

## Count Checkouts

{% openapi src="/files/2a1a4293ec587ee0129ad1caaed6983120845ba1" path="/v2/checkout/count" method="get" %}
[a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml](https://content.gitbook.com/content/OiXbo96Og9EN7rz2U44K/blobs/guUKPLHPZbgfg8qR8yIs/a477f48dd9168bd2ee1077c6399dab106e5491bf785fbde57185db0fcb31d32b.yaml)
{% endopenapi %}

## Response Key Fields

After creating a checkout, store these values from the response:

```
CreateCheckoutResponse
  └── id                  ← checkout session ID — use in all subsequent calls
  └── redirect_url        ← send the customer here to pay
  └── status              ← PENDING → COMPLETED / FAILED / EXPIRED
```

{% hint style="danger" %}
Store the `id` immediately. You will need it to retrieve the session status and to create notifications or refund previews.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/api-reference/open-api-references/checkout/checkout-sessions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
