---
title: "Create a human-completed checkout"
method: POST
path: "/api/checkout"
tags: ["Checkout"]
---

# Create a human-completed checkout

`POST /api/checkout`

## Request

- Base URL: `https://api.createprints.ai`
- URL: `https://api.createprints.ai/api/checkout`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.createprints.ai/api/oauth/authorize`, token URL `https://api.createprints.ai/api/oauth/token`, scopes: `checkout:create`)

Creates a checkout link on the Create Prints website for one or more completed, account-owned artworks. Every artwork must have an uploaded image and its aspect must match the selected variant. The agent returns `checkoutUrl` to the person, who reviews the basket and completes payment. A basket supports at most 20 line items; each line supports quantity 1–20. `GB` uses GBP and `US` uses USD. Multi-item or multi-quantity shipping is quoted before checkout; a temporary quote failure returns `503` with `retryable: true`.

## Headers

- `Idempotency-Key` string

## Request body

- union
  - object
    - `jobId` string, uuid, required
    - `productVariantId` string, uuid, required
    - `quantity` integer
    - `frameOptionId` integer: Required for framed variants; invalid for unframed variants.
    - `country` 'GB' | 'US'
  - object
    - `country` 'GB' | 'US'
    - `items` CheckoutItem[], required
      - `jobId` string, uuid, required
      - `productVariantId` string, uuid, required
      - `quantity` integer
      - `frameOptionId` integer: Required for framed variants; invalid for unframed variants.

## Response `200`

Checkout was created.

- CheckoutResponse
  - `code` 'ok', required
  - `checkoutUrl` string, uri, required: Create Prints website URL for human review and payment.
  - `checkoutSessionId` string, required
  - `basketId` string, uuid
  - `jobId` string, uuid
  - `productVariantId` string, uuid
  - `productAmountCents` integer
  - `shippingAmountCents` integer
  - `totalAmountCents` integer
  - `currency` 'GBP' | 'USD', required
  - `productAmountFormatted` string
  - `shippingAmountFormatted` string
  - `totalAmountFormatted` string

## Other responses

- `400`: Missing or invalid input.
- `401`: The credential is missing, invalid, revoked, or expired.
- `403`: The credential lacks the required scope or cannot perform this operation.
- `404`: The resource was not found for the authenticated account.
- `409`: The resource state does not permit this operation.
- `410`: The selected product is no longer available.
- `500`: Create Prints could not complete the request.
- `502`: The payment provider could not create the checkout.
- `503`: A shipping quote could not be obtained for the basket.

---

[API](https://skmtc.dev/createprints/apis/create-prints-api.md) · [All operations](https://skmtc.dev/createprints/apis/create-prints-api/llms.txt) · [OpenAPI document](https://skmtc.dev/createprints/apis/create-prints-api/revisions/05c57f496d51?raw)
