---
title: "CheckoutCreateInput"
description: "用于创建结账单的输入字段。"
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/inputs/checkout-create-input'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/inputs/checkout-create-input.md'
---
# CheckoutCreateInput

用于创建结账单的输入字段。

- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Input Fields

* `lineItems`

  [[CheckoutLineItemInput]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/inputs/checkout-line-item-input.md)

  商品行列表。

* `email`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  关联客户的邮箱地址。

* `orderFrom`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/int.md)

  订单来源。有效枚举值包含：
  
  - `0`：客户下单
  - `1`：商家下单
  
  :::danger{title="废弃"}
  该字段自 `v20251201` 起已废弃。
  :::

* `buyerIdentity`

  [CheckoutBuyerIdentityInput](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/inputs/checkout-buyer-identity-input.md)

  关联的客户身份信息。

* `customAttributes`

  [[AttributeInput]](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/inputs/attribute-input.md)

  添加到结账单的自定义属性列表，用于收集额外业务信息。

* `note`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  商家添加到结账单的备注。

* `shippingAddress`

  [ShippingAddressInput](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common-objects/inputs/shipping-address-input.md)

  关联的收货地址。

* `allowPartialAddresses`

  [Boolean](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/boolean.md)

  是否允许提交不完整的收货地址。
    - `true`：允许。系统将跳过收货人姓名字段（`firstName` 和 `lastName`）和详细地址字段（`zip`、`city`、`address1` 和 `address2`）的必填校验，允许字段缺失、为 `null` 或为空字符串 `""`。
    - `false`：不允许。

* `cartId`

  [ID](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/id.md)

  购物车的唯一标识 ID。用于定位对应的购物车，以将其商品转化为结账单商品行。该字段与 `lineItems` 互斥，若同时传入，系统会报错。

* `language`

  [String](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/common/scalars/string.md)

  结账页的语言编码。遵循 [IETF BCP 47](https://www.rfc-editor.org/info/bcp47/) 标准。  
  例子：`en`

## Argument from

* [Mutation](https://developer.shopline.com/zh-hans-cn/docs/storefront-api/checkouts/mutations/checkout-create.md).checkoutCreate

