# CheckoutSession

A cart of prices that a buyer pays on one MONEI page (`url`). Paying it creates a payment and, when a line has a recurring price, a subscription. The buyer's billing details are on the payment.

```
type CheckoutSession {

  id: ID!

  url: String!

  livemode: Boolean!

  status: CheckoutSessionStatus!

  mode: CheckoutSessionMode!

  currency: Currencies!

  lineItems: [CheckoutLineItem!]!

  amountSubtotal: Int!

  amountTax: Int!

  amountTotal: Int!

  recurringAmountTotal: Int

  orderId: String!

  description: String!

  customerId: ID

  billingAddressCollection: BillingAddressCollection!

  businessPurchase: BusinessPurchase!

  purchaserType: PurchaserType

  successUrl: String!

  cancelUrl: String

  paymentId: ID

  subscriptionId: ID

  expiresAt: AWSTimestamp!

  completedAt: AWSTimestamp

  expiredAt: AWSTimestamp

  metadata: [KeyValueItem!]

  createdAt: AWSTimestamp!

  updatedAt: AWSTimestamp

}
```

### Fields[​](#fields "Enlace directo al Fields")

#### [`CheckoutSession.id`](#id) ● [`ID!`](https://docs.monei.com/es/apis/graphql/types/scalars/id.md) non-null scalar[​](#id "Enlace directo al id")

Checkout session ID.

#### [`CheckoutSession.url`](#url) ● [`String!`](https://docs.monei.com/es/apis/graphql/types/scalars/string.md) non-null scalar[​](#url "Enlace directo al url")

Page where the buyer pays the session.

#### [`CheckoutSession.livemode`](#livemode) ● [`Boolean!`](https://docs.monei.com/es/apis/graphql/types/scalars/boolean.md) non-null scalar[​](#livemode "Enlace directo al livemode")

Whether the session is in live mode.

#### [`CheckoutSession.status`](#status) ● [`CheckoutSessionStatus!`](https://docs.monei.com/es/apis/graphql/types/enums/checkout-session-status.md) non-null enum[​](#status "Enlace directo al status")

Status of the session.

#### [`CheckoutSession.mode`](#mode) ● [`CheckoutSessionMode!`](https://docs.monei.com/es/apis/graphql/types/enums/checkout-session-mode.md) non-null enum[​](#mode "Enlace directo al mode")

Whether paying the session creates a subscription.

#### [`CheckoutSession.currency`](#currency) ● [`Currencies!`](https://docs.monei.com/es/apis/graphql/types/enums/currencies.md) non-null enum[​](#currency "Enlace directo al currency")

Three-letter ISO 4217 currency code.

#### [`CheckoutSession.lineItems`](#line-items) ● [`[CheckoutLineItem!]!`](https://docs.monei.com/es/apis/graphql/types/objects/checkout-line-item.md) non-null object[​](#line-items "Enlace directo al line-items")

Lines of the session, in the order they were given.

#### [`CheckoutSession.amountSubtotal`](#amount-subtotal) ● [`Int!`](https://docs.monei.com/es/apis/graphql/types/scalars/int.md) non-null scalar[​](#amount-subtotal "Enlace directo al amount-subtotal")

Amount of the first payment without tax, in the smallest currency unit.

#### [`CheckoutSession.amountTax`](#amount-tax) ● [`Int!`](https://docs.monei.com/es/apis/graphql/types/scalars/int.md) non-null scalar[​](#amount-tax "Enlace directo al amount-tax")

Tax of the first payment, in the smallest currency unit.

#### [`CheckoutSession.amountTotal`](#amount-total) ● [`Int!`](https://docs.monei.com/es/apis/graphql/types/scalars/int.md) non-null scalar[​](#amount-total "Enlace directo al amount-total")

Amount of the first payment, in the smallest currency unit.

#### [`CheckoutSession.recurringAmountTotal`](#recurring-amount-total) ● [`Int`](https://docs.monei.com/es/apis/graphql/types/scalars/int.md) scalar[​](#recurring-amount-total "Enlace directo al recurring-amount-total")

Amount of each renewal of the subscription, with tax, in the smallest currency unit. `null` for a `PAYMENT` session.

#### [`CheckoutSession.orderId`](#order-id) ● [`String!`](https://docs.monei.com/es/apis/graphql/types/scalars/string.md) non-null scalar[​](#order-id "Enlace directo al order-id")

Order ID of the payment.

#### [`CheckoutSession.description`](#description) ● [`String!`](https://docs.monei.com/es/apis/graphql/types/scalars/string.md) non-null scalar[​](#description "Enlace directo al description")

Description of the payment.

#### [`CheckoutSession.customerId`](#customer-id) ● [`ID`](https://docs.monei.com/es/apis/graphql/types/scalars/id.md) scalar[​](#customer-id "Enlace directo al customer-id")

ID of the customer the session is for. When the session was created without one, a customer is created for the buyer.

#### [`CheckoutSession.billingAddressCollection`](#billing-address-collection) ● [`BillingAddressCollection!`](https://docs.monei.com/es/apis/graphql/types/enums/billing-address-collection.md) non-null enum[​](#billing-address-collection "Enlace directo al billing-address-collection")

Whether the checkout page asks for a billing address.

#### [`CheckoutSession.businessPurchase`](#business-purchase) ● [`BusinessPurchase!`](https://docs.monei.com/es/apis/graphql/types/enums/business-purchase.md) non-null enum[​](#business-purchase "Enlace directo al business-purchase")

Whether the buyer can pay as a company.

#### [`CheckoutSession.purchaserType`](#purchaser-type) ● [`PurchaserType`](https://docs.monei.com/es/apis/graphql/types/enums/purchaser-type.md) enum[​](#purchaser-type "Enlace directo al purchaser-type")

Who paid the session. Set when the session is `COMPLETE`.

#### [`CheckoutSession.successUrl`](#success-url) ● [`String!`](https://docs.monei.com/es/apis/graphql/types/scalars/string.md) non-null scalar[​](#success-url "Enlace directo al success-url")

Page the buyer goes to after paying.

#### [`CheckoutSession.cancelUrl`](#cancel-url) ● [`String`](https://docs.monei.com/es/apis/graphql/types/scalars/string.md) scalar[​](#cancel-url "Enlace directo al cancel-url")

Page the buyer goes to after leaving without paying.

#### [`CheckoutSession.paymentId`](#payment-id) ● [`ID`](https://docs.monei.com/es/apis/graphql/types/scalars/id.md) scalar[​](#payment-id "Enlace directo al payment-id")

ID of the latest payment the buyer started.

#### [`CheckoutSession.subscriptionId`](#subscription-id) ● [`ID`](https://docs.monei.com/es/apis/graphql/types/scalars/id.md) scalar[​](#subscription-id "Enlace directo al subscription-id")

ID of the subscription of a `SUBSCRIPTION` session.

#### [`CheckoutSession.expiresAt`](#expires-at) ● [`AWSTimestamp!`](https://docs.monei.com/es/apis/graphql/types/scalars/awstimestamp.md) non-null scalar[​](#expires-at "Enlace directo al expires-at")

Time the session expires if it is not paid. Measured in seconds since the Unix epoch.

#### [`CheckoutSession.completedAt`](#completed-at) ● [`AWSTimestamp`](https://docs.monei.com/es/apis/graphql/types/scalars/awstimestamp.md) scalar[​](#completed-at "Enlace directo al completed-at")

Time the session became `COMPLETE`. Measured in seconds since the Unix epoch.

#### [`CheckoutSession.expiredAt`](#expired-at) ● [`AWSTimestamp`](https://docs.monei.com/es/apis/graphql/types/scalars/awstimestamp.md) scalar[​](#expired-at "Enlace directo al expired-at")

Time the session became `EXPIRED`. Measured in seconds since the Unix epoch.

#### [`CheckoutSession.metadata`](#metadata) ● [`[KeyValueItem!]`](https://docs.monei.com/es/apis/graphql/types/objects/key-value-item.md) list object[​](#metadata "Enlace directo al metadata")

Key/value metadata that the merchant set.

#### [`CheckoutSession.createdAt`](#created-at) ● [`AWSTimestamp!`](https://docs.monei.com/es/apis/graphql/types/scalars/awstimestamp.md) non-null scalar[​](#created-at "Enlace directo al created-at")

Creation time. Measured in seconds since the Unix epoch.

#### [`CheckoutSession.updatedAt`](#updated-at) ● [`AWSTimestamp`](https://docs.monei.com/es/apis/graphql/types/scalars/awstimestamp.md) scalar[​](#updated-at "Enlace directo al updated-at")

Last update time. Measured in seconds since the Unix epoch.

### Returned By[​](#returned-by "Enlace directo al Returned By")

[`checkoutSession`](https://docs.monei.com/es/apis/graphql/operations/queries/checkout-session.md) query ● [`createCheckoutSession`](https://docs.monei.com/es/apis/graphql/operations/mutations/create-checkout-session.md) mutation

### Member Of[​](#member-of "Enlace directo al Member Of")

[`CheckoutSessionsConnection`](https://docs.monei.com/es/apis/graphql/types/objects/checkout-sessions-connection.md) object
