> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/checkout/llms.txt)
> Source: https://docs.saleor.io/api-reference/checkout/mutations/checkout-complete

# checkoutComplete Mutation

Completes the checkout. As a result a new order is created. The mutation allows to create the unpaid order when setting `orderSettings.allowUnpaidOrders` for given `Channel` is set to `true`. When `orderSettings.allowUnpaidOrders` is set to `false`, checkout can be completed only when attached `Payment`/`TransactionItem`s fully cover the checkout's total. When processing the checkout with `Payment`, in case of required additional confirmation step like 3D secure, the `confirmationNeeded` flag will be set to True and no order will be created until payment is confirmed with second call of this mutation.

Triggers the following webhook events:

-   SHIPPING\_LIST\_METHODS\_FOR\_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
-   CHECKOUT\_FILTER\_SHIPPING\_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
-   CHECKOUT\_CALCULATE\_TAXES (sync): Optionally triggered when checkout prices are expired.
-   ORDER\_CREATED (async): Triggered when order is created.
-   NOTIFY\_USER (async): A notification for order placement.
-   NOTIFY\_USER (async): A staff notification for order placement.
-   ORDER\_UPDATED (async): Triggered when order received the update after placement.
-   ORDER\_PAID (async): Triggered when newly created order is paid.
-   ORDER\_FULLY\_PAID (async): Triggered when newly created order is fully paid.
-   ORDER\_CONFIRMED (async): Optionally triggered when newly created order are automatically marked as confirmed.

```graphql
checkoutComplete(
  checkoutId: ID
  id: ID
  metadata: [MetadataInput!]
  paymentData: JSONString
  redirectUrl: String
  storeSource: Boolean = false
  token: UUID
): CheckoutComplete
```

Details

```graphql
type CheckoutComplete {
  order: Order
  confirmationNeeded: Boolean!
  confirmationData: JSONString
  checkoutErrors: [CheckoutError!]! @deprecated
  errors: [CheckoutError!]!
}
```

<a id="arguments"></a>

### Arguments

<a id="id"></a>

#### [`id`](#id) ● [`ID`](/api-reference/miscellaneous/scalars/id.md)

The checkout's ID.

<a id="metadata"></a>

#### [`metadata`](#metadata) ● [`[MetadataInput!]`](/api-reference/miscellaneous/inputs/metadata-input.md)

Fields required to update the checkout metadata. Can be read by any API client authorized to read the object it's attached to.

Warning: never store sensitive information, including financial data such as credit card details.

<a id="payment-data"></a>

#### [`paymentData`](#payment-data) ● [`JSONString`](/api-reference/miscellaneous/scalars/jsonstring.md)

Client-side generated data required to finalize the payment.

<a id="redirect-url"></a>

#### [`redirectUrl`](#redirect-url) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

URL of a view where users should be redirected to see the order details. URL in RFC 1808 format.

Show deprecatedHide deprecated

<a id="checkout-id"></a>

#### [`checkoutId`](#checkout-id) ● [`ID`](/api-reference/miscellaneous/scalars/id.md)

DEPRECATED

Use `id` instead.

The ID of the checkout.

<a id="store-source"></a>

#### [`storeSource`](#store-source) ● [`Boolean`](/api-reference/miscellaneous/scalars/boolean.md)

DEPRECATED

Use checkoutPaymentCreate for this action.

Determines whether to store the payment source for future usage.

<a id="token"></a>

#### [`token`](#token) ● [`UUID`](/api-reference/miscellaneous/scalars/uuid.md)

DEPRECATED

Use `id` instead.

Checkout token.

<a id="type"></a>

### Type

<a id="checkoutcomplete"></a>

#### [`CheckoutComplete`](/api-reference/checkout/objects/checkout-complete.md)

Completes the checkout. As a result a new order is created. The mutation allows to create the unpaid order when setting `orderSettings.allowUnpaidOrders` for given `Channel` is set to `true`. When `orderSettings.allowUnpaidOrders` is set to `false`, checkout can be completed only when attached `Payment`/`TransactionItem`s fully cover the checkout's total. When processing the checkout with `Payment`, in case of required additional confirmation step like 3D secure, the `confirmationNeeded` flag will be set to True and no order will be created until payment is confirmed with second call of this mutation.

Triggers the following webhook events:

-   SHIPPING\_LIST\_METHODS\_FOR\_CHECKOUT (sync): Optionally triggered when cached external shipping methods are invalid.
-   CHECKOUT\_FILTER\_SHIPPING\_METHODS (sync): Optionally triggered when cached filtered shipping methods are invalid.
-   CHECKOUT\_CALCULATE\_TAXES (sync): Optionally triggered when checkout prices are expired.
-   ORDER\_CREATED (async): Triggered when order is created.
-   NOTIFY\_USER (async): A notification for order placement.
-   NOTIFY\_USER (async): A staff notification for order placement.
-   ORDER\_UPDATED (async): Triggered when order received the update after placement.
-   ORDER\_PAID (async): Triggered when newly created order is paid.
-   ORDER\_FULLY\_PAID (async): Triggered when newly created order is fully paid.
-   ORDER\_CONFIRMED (async): Optionally triggered when newly created order are automatically marked as confirmed.
