# CreateCheckoutSessionRequest

**lineItems** <!-- -->object\[]required

The lines of the cart, from 1 to 20, in the order the checkout page shows them. All prices must be active, of your account and in the same currency. At most one price is `RECURRING`: with one, the session is a `SUBSCRIPTION` session.

**Possible values:** `>= 1`, `<= 20`

* Array \[

**priceId**string\<uuid>required

The ID of an active [price](https://docs.monei.com/apis/rest/prices-create/).

**Example:<!-- -->&#x20;**`3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13`

**quantity**integer\<int32>required

The number of units. A `RECURRING` price takes `1`.

**Possible values:** `>= 1` and `<= 999`

**Example:<!-- -->&#x20;**`1`

* ]

**successUrl**string\<uri>required

The page the buyer goes to after paying.

**Example:<!-- -->&#x20;**`https://example.com/checkout/success`

**cancelUrl**string\<uri>

The page the buyer goes to after leaving without paying.

**Example:<!-- -->&#x20;**`https://example.com/cart`

**customerId**CheckoutSession-CustomerId

A [customer](https://docs.monei.com/apis/rest/customers-create/) of your account. Without it, MONEI creates a customer for the buyer when they pay, with the details they type.

**Example:<!-- -->&#x20;**`9f1e2d3c-4b5a-4968-8776-655443322110`

**orderId**CheckoutSession-OrderId

The order ID of the payment. Up to 40 characters: ASCII letters, digits and `_ @ . / # & + -` (no spaces). When you omit it, MONEI generates 12 characters from A-Z and 0-9.

**Example:<!-- -->&#x20;**`K7Q2M9XB4T1A`

**description**CheckoutSession-Description

The description of the payment. When you omit it, the product names.

**Example:<!-- -->&#x20;**`Starter kit, Gold plan`

**billingAddressCollection**CheckoutSession-BillingAddressCollection

Whether the checkout page asks the buyer for a billing address.

**Possible values:** \[`OPTIONAL`, `REQUIRED`]

**Default value:<!-- -->&#x20;**`OPTIONAL`

**Example:<!-- -->&#x20;**`OPTIONAL`

**businessPurchase**CheckoutSession-BusinessPurchase

Whether the buyer can pay as a company, with legal name, tax ID and full address:

* `DISABLED`: only as an individual.
* `OPTIONAL`: the buyer chooses.
* `REQUIRED`: only as a company.

A Spanish tax ID is checked.

**Possible values:** \[`DISABLED`, `OPTIONAL`, `REQUIRED`]

**Default value:<!-- -->&#x20;**`DISABLED`

**Example:<!-- -->&#x20;**`OPTIONAL`

**expiresAt**integer\<int64>

Time the session expires if it is not paid, from 30 minutes to 24 hours from now. The default is 24 hours from now. Measured in seconds since the Unix epoch.

**Example:<!-- -->&#x20;**`1794564000`

**metadata**object

A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.

**Example:<!-- -->&#x20;**`{"systemId":"12345"}`

CreateCheckoutSessionRequest

```
{

  "lineItems": [

    {

      "priceId": "3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13",

      "quantity": 1

    }

  ],

  "successUrl": "https://example.com/checkout/success",

  "cancelUrl": "https://example.com/cart",

  "customerId": "9f1e2d3c-4b5a-4968-8776-655443322110",

  "orderId": "K7Q2M9XB4T1A",

  "description": "Starter kit, Gold plan",

  "billingAddressCollection": "OPTIONAL",

  "businessPurchase": "OPTIONAL",

  "expiresAt": 1794564000,

  "metadata": {

    "systemId": "12345"

  }

}
```
