---
title: "Publish Checkout Configuration"
method: PUT
path: "/checkouts/{checkout_code}"
---

# Publish Checkout Configuration

`PUT /checkouts/{checkout_code}`

Writes configuration and/or styling for the checkout in a single call. The body may contain a `config` object, a `styling` object, or both — at least one is required. Each part is validated independently before being applied; if any rule fails, the request is rejected with a single aggregated 400 and nothing is applied. Configuration is a sparse upsert (omitted payment methods keep their previous state; new methods cannot be created). Styling is a partial merge (omitted or null fields are preserved).

## Path parameters

- `checkout_code` string, required

## Headers

- `X-Idempotency-Key` string

## Request body

- object — At least one of `config` or `styling` is required.
  - `config` object — Checkout configuration: payment methods and general settings. Sparse upsert — omitted payment methods keep their previous state.
    - `payment_methods` object[] — Payment methods to update. Order is driven by `order_to_show` (lower = first).
      - `payment_method_type` string — Payment method type, e.g. CARD, PAYPAL, NU_PAY, GOOGLE_PAY.
      - `order_to_show` integer — Display order (>= 0). Lower is shown first.
      - `is_active` boolean — Whether the method is offered.
      - `active_enrollment_type` 'ENROLLMENT' | 'NO_ENROLLMENT' | 'BOTH' | 'NONE' — Enrollment posture for the method.
      - `conditions_to_override` object[] — Payment-method-level condition sets that gate when the method appears. A client-supplied set `code` (UUID) is preserved.
      - `required_fields_to_override` object — Per-field configuration. `fields` = non-enrolled flow; `enrollment_fields` = enrolled (saved-card) flow. At most one condition set per field (a second is rejected with 400).
        - `is_active` boolean
        - `fields` object[]
        - `enrollment_fields` object[]
        - `is_enrollment_active` boolean
    - `general_settings` object
      - `country_documents` object[]
        - `country_code` string — ISO 3166-1 alpha-2 country code.
        - `documents` string[]
  - `styling` object — Checkout styling and SDK settings. Partial merge — omitted or null fields are preserved; use `flags.force_default_styles` to reset. `settings.urls`, `settings.click_to_pay`, `settings.form` and `settings.google_pay` are beta-locked and rejected if sent with a non-empty value.
    - `styles` object — global, header and button styles. All `*_color` fields must be a 6- or 8-digit hex color (#RRGGBB / #RRGGBBAA); `font_weight` must be one of 100..900 (step 100); `font_family` must be in the supported catalog or declared in `external_fonts`. Logos must be an HTTPS URL to a public host or a relative path (no data:/SVG/javascript:).
    - `settings` object — SDK settings, forwarded to the checkout SDK. `settings.urls`, `settings.click_to_pay`, `settings.form` and `settings.google_pay` are beta-locked and rejected if sent with a non-empty value.
      - `card` object — Card SDK settings.
        - `save_on_success` boolean — Offer to save the card for future payments.
        - `visualization_mode` string — Card form visualization mode.
        - `enable_ocr` boolean — Enable card scanning (OCR).
        - `credit_card_only_processing` boolean — Process credit cards only.
        - `enable_payment_retry` boolean — Allow retrying a declined card payment.
        - `default_network` string — Default card network: DOM or INT.
      - `sdk_type` object
      - `web_sdk` object
      - `payment_method_list` object
      - `ui` object
    - `flags` object
      - `force_default_styles` boolean
    - `external_fonts` object[] — Custom fonts. `files[].url` must be an HTTPS URL to a public host.
    - `payment_link_styles` object

## Response `200`

The updated checkout (configuration + styling composed). Its identifier is exposed as the top-level `id`.

- object

## Other responses

- `400` — Validation failed. All violations are aggregated into a single response. A malformed JSON body also returns 400.
- `401` — Not authenticated, or the account is not in the beta allowlist.
- `404` — The checkout was not found for this account.

---

[API](https://skmtc.net/y/apis/ai-caller.md) · [All operations](https://skmtc.net/y/apis/ai-caller/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/y/ai-caller/versions/05b629819b49/schema)
