---
id: getcheckoutinformation
title: Acquire information about a Checkout session
hide_title: true
description: "How to acquire information about a specific Checkout session"
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import Ingress from "../../src/components/ingress/ingress.react";

<Ingress title="Get Checkout Information">
  Use the privateId property, also referred to as the private Checkout Id, to
  acquire information about an ongoing or completed Checkout for up to 90 days
  after the session was created. If the customer does not complete a purchase
  within 7 days, Walley aborts the session and requests for that private
  checkout id return a 404 Not Found.
</Ingress>

:::info Before you start
You need the `privateId` returned by [Initialize checkout](/docs/checkout/initcheckout) and an [authorization header](/docs/checkout/authorization).
:::

Acquire the information by sending a GET request to the following URI:
[https://api.uat.walleydev.com](/docs/checkout/endpoints)/checkouts/[`{privateId}`](/docs/checkout/initcheckout)

## The GET request

The GET request is always issued in the same way, but the response can differ depending on the state of the Checkout session and how the customer has been identified, as well as if it is a B2B or B2C session.

```http
GET /checkouts/1eec44b5-66d3-4058-a31f-3444229fb727 HTTP/1.1
Host: api.uat.walleydev.com
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
```

## Example responses

<Tabs defaultValue="b2c" values={[
{ label: 'B2C Response', value: 'b2c', },
{ label: 'B2B Response', value: 'b2b', }
]}>
<TabItem value="b2c">

Response for a private customer strongly identified with a national identification number:

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "9eec015f-4b97-44be-a711-d22f3af75069",
  "data": {
    "customerType": "PrivateCustomer",
    "customer": {
      "email": "test@walleytest.se",
      "mobilePhoneNumber": "+4670707071",
      "deliveryContactInformation": {
        "mobilePhoneNumber": "+46701111111"
      },
      "deliveryAddress": {
        "firstName": "Lars-Erik Rudolf",
        "lastName": "Viberg",
        "coAddress": null,
        "address": "Sommarstugevägen 2",
        "address2": null,
        "postalCode": "85353",
        "city": "Sundsvall",
        "country": "Sverige",
        "countryCode": "SE"
      },
      "billingAddress": {
        "firstName": "Lars-Erik Rudolf",
        "lastName": "Viberg",
        "coAddress": null,
        "address": "Lingonstigen 10",
        "address2": null,
        "postalCode": "85352",
        "city": "Sundsvall",
        "country": "Sverige",
        "countryCode": "SE"
      }
    },
    "businessCustomer": null,
    "countryCode": "SE",
    "status": "PurchaseCompleted",
    "reference": "123456789",
    "cart": null,
    "fees": null,
    "purchase": {
      "amountToPay": 159,
      "paymentName": "Account",
      "purchaseIdentifier": "640173",
      "result": "Preliminary",
      "decisionCategory": "Yellow"
    },
    "order": {
      "orderId": "0466ffb4-80d8-4c55-bd74-af400166b3d7",
      "totalAmount": 159,
      "items": [
        {
          "id": "1",
          "description": "Some product",
          "unitPrice": 200,
          "quantity": 1,
          "vat": 20
        },
        {
          "id": "998",
          "description": "Shipping cost (incl. VAT)",
          "unitPrice": 59,
          "quantity": 1,
          "vat": 25.0
        },
        {
          "id": "10003",
          "description": "Gift Card 100",
          "type": "GiftCard",
          "unitPrice": -100,
          "usedAmount": 100,
          "quantity": 1,
          "vat": 0
        }
      ]
    },
    "customFields": [
      {
        "id": "group1",
        "metadata": {
          "groupMeta": "content"
        },
        "fields": [
          {
            "id": "newsConsent",
            "name": "I agree to receive marketing communications",
            "type": "Checkbox",
            "value": false,
            "metadata": {
              "field1Meta": "field-newsletter-consent"
            }
          },
          {
            "id": "comments",
            "name": "Any additional comments?",
            "type": "Text",
            "value": "no nothing noteworthy"
          }
        ]
      }
    ],
    "hasSessionExpired": false
  },
  "error": null
}
```

</TabItem>

<TabItem value="b2b">

Response for a business customer:

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "80a0b38b-2f8b-47db-81a5-8b56baa4ad84",
  "data": {
    "customerType": "BusinessCustomer",
    "customer": null,
    "businessCustomer": {
      "invoiceTag": "Fakturamärkning: 5678",
      "companyName": "Bra Byggare AB",
      "organizationNumber": "620306-1400",
      "invoiceReference": "Reparation dusch Walley",
      "email": "bosse@brabyggare.se",
      "firstName": "Bosse",
      "lastName": "Byggare",
      "mobilePhoneNumber": "+46730481277",
      "invoiceAddress": {
        "companyName": "Bra Byggare AB",
        "coAddress": null,
        "address": "Storgatan 1",
        "address2": null,
        "postalCode": "50332",
        "city": "Borås",
        "country": "Sverige",
        "countryCode": "SE"
      },
      "deliveryAddress": {
        "companyName": "WalleyPay AB",
        "coAddress": null,
        "address": "Östra Hamngatan 24",
        "address2": "att: Bosse Byggare",
        "postalCode": "41109",
        "city": "Göteborg",
        "country": "Sverige",
        "countryCode": "SE"
      }
    },
    "countryCode": "SE",
    "status": "PurchaseCompleted",
    "reference": "1231",
    "cart": null,
    "fees": {
      "shipping": {
        "id": "Frakt",
        "description": "DHL Ombud",
        "unitPrice": 19,
        "vat": 25
      }
    },
    "purchase": {
      "amountToPay": 377,
      "paymentName": "DirectInvoice",
      "purchaseIdentifier": "33074878",
      "result": "Preliminary"
    },
    "order": {
      "orderId": "0466ffb4-80d8-4c55-bd74-af400166b3d7",
      "totalAmount": 377,
      "items": [
        {
          "id": "scap001",
          "description": "Shower Cap",
          "unitPrice": 10,
          "quantity": 1,
          "vat": 25
        },
        {
          "id": "shipping001",
          "description": "Shipping fee (incl. vat)",
          "unitPrice": 59,
          "quantity": 1,
          "vat": 25
        },
        {
          "id": "dirfee001",
          "description": "Order administration fee (incl. vat)",
          "unitPrice": 299,
          "quantity": 1,
          "vat": 25
        }
      ]
    },
    "hasSessionExpired": false,
    "metadata": {
      "administrator": "John Doe",
      "someOtherData": [1, { "myObj": { "key": 1 } }]
    }
  },
  "error": null
}
```

</TabItem>
</Tabs>

## Faulty response

Response for an unknown, aborted or expired `privateId`:

```http
HTTP/1.1 404 Not Found
Content-Type: application/json

{
  "id": "0b18555c-3c84-4bfd-901a-f15c368ba3d9",
  "data": null,
  "error": {
    "code": 404,
    "message": "The resource requested was not found.",
    "errors": []
  }
}
```

## Request properties

**Request headers**

| Header            | Required | Explanation                                                                                                       |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| **Authorization** | Yes      | See [how to generate the authorization header value](/docs/checkout/authorization).                               |

**Important properties in the response body**

Some of the properties listed below may have their values set to null if they are not applicable in the current state for a Checkout. For example, the customer property is set to null if the customer has not been identified yet.

| Property                                     | Explanation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **data.countryCode**                         | The country code you specify in [initialize Checkout request](/docs/checkout/initcheckout)                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **data.status**                              | Contains the current status of the Checkout. Possible values include `Initialized`, `CustomerIdentified`, `CommittedToPurchase`, `PurchaseCompleted`, `Aborted`. An explanation of the different statuses can be found [further down](#datastatus) in this section.                                                                                                                                                                                                                                                                      |
| **data.reference**                           | Equal to the reference field provided in the [initialize Checkout request](/docs/checkout/initcheckout).                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **data.cart**                                | Contains all items for a purchase that has not yet been completed. Once the purchase is complete, all items are moved in under the `data.order` property and the `data.cart` is set to null.                                                                                                                                                                                                                                                                                                                                             |
| **data.fees**                                | Contains the fees, like shipping, when the purchase is not yet completed. Once the purchase is complete, the fee items are moved last in the `data.order.items` property and the `data.fees.shipping` is set to null. **Note** that if you are using [Custom Delivery Adapter](/docs/checkout/delivery/custom-adapter#get-delivery-methods) that the shipping fee is taken care of there instead.                                                                                                                              |
| **data.customerType**                        | Indicates what type of customer the checkout is initialized for. Values are `PrivateCustomer` or `BusinessCustomer`                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **data.customer**                            | Contains all customer details for a **private customer** including the delivery address to which the order should be sent. If the customer is strongly identified with a national identification number, billing address will be included. For a private customer who is identified without a national identification number, the billing address will be the same as the delivery address. We only accept card purchase for those customers and hence a billing address is not needed. For a business customer `data.customer` is null. |
| **data.customer.deliveryContactInformation** | Only used if the contact information that has been optionally entered by the user in the delivery address view differs from billing address and will override the corresponding customer property values.                                                                                                                                                                                                                                                                                                                                |
| **data.businessCustomer**                    | Contains all customer details for a **business customer** including the invoice address and a delivery address to which the order should be sent. Also includes delivery contact information such as mobile phone number for delivery notification (only used if delivery address differs from invoice address). For a private customer `data.businessCustomer` is null.                                                                                                                                                                 |
| **data.purchase**                            | Contains details for a completed purchase.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **data.purchase.paymentName**                | The name of the chosen Payment option the customer used to pay for the purchase.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **data.purchase.amountToPay**                | The total amount for the customer to pay for the purchase. This value may be greater than the `data.order.totalAmount` property due to fees issued by Walley for the chosen payment method.                                                                                                                                                                                                                                                                                                                                              |
| **data.purchase.purchaseIdentifier**         | Required to manage the invoice for the purchase, for example to activate or make changes to an invoice. The purchase identifier is the identifier for a purchase when interacting with the [Walley Payments API Integration](/docs/paymentsApi/paymentsapi).                                                                                                                                                                                                                                                                    |
| **data.purchase.result**                     | The status for the purchase **at time when the purchase was made**. For details regarding different possible statuses for a purchase, see [possible values here](#datapurchaseresult).                                                                                                                                                                                                                                                                                                                                                   |
| **data.purchase.decisionCategory**           | Credit decision outcome for the completed purchase. **Only applicable to Norwegian (`countryCode: "NO"`) checkouts**, and only included when `redirectPageUri` was set on [Initialize Checkout](/docs/checkout/optional/init-checkout-features) — i.e. the merchant displays its own thank-you page instead of Walley's hosted one. Use this value to render the appropriate purchase-outcome message to the customer on your custom thank-you page. See [possible values](#datapurchasedecisioncategory).                                |
| **data.purchase.externalPaymentReference**   | The third party reference for the payment made with Swish or Vipps with settlements directly using your own agreement.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **data.purchase.card**                       | Contains card details for a purchase configured as a tokenized payment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **data.purchase.card.lastFour**              | Contains the last four digits of the card number                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **data.purchase.card.expiryDate**            | Contains the expiry date of the card.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **data.order**                               | Contains the total amount and all items for a completed purchase.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **data.order.orderId**                       | The unique identifier for the order created. This is used in calls to [manage the order](/docs/manage/getting-started/overview).                                                                                                                                                                                                                                                                                                                                                                                                         |
| **data.order.totalAmount**                   | The total amount to be settled, i.e. the sum to be paid to you as a merchant for the purchase.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **data.order.customerToken**                 | The customer token to use for future [tokenized payments.](/docs/checkout/tokenization/introduction) (only available if configured by Walley Merchant Services)                                                                                                                                                                                                                                                                                                                                                                          |
| **data.appliedVouchers**                     | Array of bonus vouchers that were applied and successfully redeemed as part of the purchase. Only present when a voucher adapter is configured for the store and the customer activated at least one voucher — otherwise the field is omitted. Each entry contains `voucherId`, `code`, `description`, and `discountAmount`. The discount is not added as a line item under `data.order.items`, and neither `data.order.totalAmount` nor `data.purchase.amountToPay` includes it. Use `appliedVouchers` to reconcile the discount. See [Voyado bonus vouchers](/docs/checkout/loyalty-booster/voyado/voyado-integration#bonus-vouchers) for details. |
| **data.hasSessionExpired**                   | If true, the Checkout session has expired and a new session must be initialized.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **data.customFields**                        | If there are custom fields present, the user entered data will be present in the array. The structure mirrors the configuration object with `value` holding the users submitted data.                                                                                                                                                                                                                                                                                                                                                    |

### data.status

Possible values for the `data.status` property:

- **Initialized** denotes that the Checkout is started but no information has been supplied by the customer.
- **CustomerIdentified** denotes that a customer has been successfully identified by the Checkout.
- **CommittedToPurchase** a customer has pressed the purchase button and the system is waiting for a successful/unsuccessful outcome, for example when waiting for a bank id session to authenticate. In this state the checkout is locked for modifications such as adding/removing from the cart.
- **PurchaseCompleted** denotes that the purchase has been completed.
- **Aborted** denotes that the session has been aborted and a purchase will not be possible for this session.

### data.purchase.paymentName

Possible values for the `data.purchase.paymentName` property:

:::info
These values are subject to change — handle them dynamically.
New payment names may emerge without notice, so design your system to accommodate unknown values.
:::

- **DirectInvoice** Purchase made with the direct invoice option. The invoice will be sent directly by email.
- **Invoice** Purchase made with Invoice option. All purchases made within a month will be aggregated into one notification that is sent to the end customer in the end of that month.
- **Account** Purchase made with Account option. All purchases made within a month will be aggregated into one notification that is sent to the end customer in the end of that month.
- **PartPayment** Purchase was made using a part payment option. For example split the payment into 36 months.
- **Campaign** Purchase was made with a Buy-Now-Pay-Later option. For example buy now - pay in August.
- **Card** Purchase was made with the card option.
- **Trustly** Purchase was made with a direct bank transfer using Trustly option.
- **Swish** Purchase was made with the Swish option.
- **MobilePay** Purchase was made with the Mobile Pay option.
- **Vipps** Purchase was made with the Vipps option.
- **PayPal** Purchase was made with the PayPal option.

### data.purchase.result

Possible values for the `data.purchase.result` property:

- **Preliminary** The purchase is pending and waiting for activation by Merchant when shipping is initiated.
- **OnHold** The purchase is under fraud investigation. Once the status changes of the purchase, a [callback will be sent](/docs/checkout/notificationcallback).
- **Activated** The purchase has been automatically activated. Auto activation is not standard. To request it contact your delivery manager.
- **Rejected** The purchase has been rejected and cannot be activated.
- **Signing** The purchase is waiting for electronic signing of a credit agreement by the end customer. Once the status changes on the purchase, a [callback will be sent](/docs/checkout/notificationcallback).

:::info
For a completed purchase, verify all details such as articles and prices before registering the order as complete on your end.
:::

### data.purchase.decisionCategory

:::info
This field is only applicable to Norwegian checkouts (`countryCode: "NO"`). It will not be returned for any other market.
:::

Possible values for the `data.purchase.decisionCategory` property:

- **Green** — purchase approved without conditions. No additional message is required on your thank-you page.
- **Yellow** — purchase approved on conditions. If you are **not** using Walley's hosted confirmation page (i.e. you set `redirectPageUri` and render your own thank-you page), you **must** display the specific text shown [below](#required-thank-you-page-copy-yellow) to the customer. Walley already renders this text on its hosted confirmation page.

The field is only present when `redirectPageUri` was set on [Initialize Checkout](/docs/checkout/optional/init-checkout-features). Merchants that use Walley's hosted thank-you page do not need to consume this field — Walley renders the required text there.

Treat unknown values as `Green` so future categories do not break your thank-you page.

#### Required thank-you page copy (Yellow)

When `decisionCategory` is `Yellow` and you are rendering your own thank-you page, the following Norwegian copy must be displayed to the customer:

| decisionCategory | Copy (NO)              |
| ---------------- | ---------------------- |
| **Yellow**       | **Kjøpet ditt ble godkjent med vilkår**<br/>Kreditten din er innvilget. Basert på vår vurdering av din samlede økonomi vurderer vi denne kreditten som moderat risiko for deg. Ved en vesentlig renteøkning kan du måtte gjøre tilpasninger i økonomien. |
