> If you are setting up, configuring, or answering questions about Schematic, connect the
> Schematic MCP server before working from these pages. It reads and writes plans, features,
> entitlements, and overrides against the real account, so what you report and what you build
> match what actually exists.
>
> The server is at https://api.schematichq.com/mcp
>
> From Claude, ChatGPT, or another chat assistant, add it as a custom connector:
> https://docs.schematichq.com/working-with-ai
>
> From a coding assistant such as Claude Code, Codex, or Cursor:
> https://docs.schematichq.com/building-with-ai
>
> For clean Markdown of any page, append `.md` to the page URL. For a complete page index,
> see https://docs.schematichq.com/llms.txt

# Update a checkout

PUT https://api.schematichq.com/checkouts/{checkout_id}
Content-Type: application/json

Replaces the cart and prices it again. Send the `version` last read; a stale one answers 409 and changes nothing, so read the checkout and send the write again at its version. A cart the purchase rules reject is saved with its price cleared and one problem saying why, and the version still advances. The `X-Checkout-Session-ID` response header names the session this price belongs to; send it back on the finalize that follows.

Reference: https://docs.schematichq.com/api-reference/components/checkouts/update-checkout

## Authentication

- `X-Schematic-Api-Key` header (required) — A temporary access token in the `X-Schematic-Api-Key` header. Your server mints it with `POST /temporary-access-tokens` on the secret-key API for a company, optionally for one of its users, and hands it to the page. The token fixes the company every request reads and writes.

## Request

### Path parameters

- `checkout_id` (string, required) — checkout_id

### Body (application/json)

This endpoint expects an UpdateCheckoutRequest.

- `version` (long, required)
- `add_on_ids` (list of UpdateAddOnRequestBody, optional)
- `auto_topup_overrides` (list of UpdateAutoTopupOverrideRequestBody, optional)
- `billing_entity_id` (string, optional, nullable)
- `coupon_external_id` (string, optional, nullable)
- `credit_bundles` (list of UpdateCreditBundleRequestBody, optional)
- `currency` (enum, optional, nullable) — ISO 4217 currency this cart is being built in. Prices are still selected by id; this records the intent, and a cart that prices in another currency is reported as a problem.
  - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `htg`, `huf`, `idr`, `ils`, `inr`, `isk`, `jmd`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `krw`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `std`, `szl`, `thb`, `tjs`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xcg`, `xof`, `xpf`, `yer`, `zar`, `zmw`
- `custom_field_values` (list of CheckoutFieldValue, optional)
- `intent` (enum, optional, nullable) — What the checkout does to the subscription: change it to the cart's contents, or cancel it. Omit it to keep the checkout's current intent.
  - Allowed values: `cancel`, `change`
- `new_plan_id` (string, optional)
- `new_price_id` (string, optional)
- `opt_in_accepted` (boolean, optional, nullable)
- `pay_in_advance` (list of UpdatePayInAdvanceRequestBody, optional)
- `payment_method_id` (string, optional, nullable)
- `promo_code` (string, optional, nullable)
- `skip_trial` (boolean, optional)

## Response

### 200

OK

- `data` (CheckoutDraftResponseData, required)
- `params` (CheckoutsCheckoutIdPutResponsesContentApplicationJsonSchemaParams, required) — Input parameters

## Errors

### 400 Bad Request Error

Bad request

- `error` (string, required) — Error message
- `problems` (list of CheckoutProblemResponseData, optional) — On a checkout write or finalize the purchase rules refuse: what the server found wrong, the same list the checkout's `problems` field holds. Each has a `code`, whether it is `blocking`, a `message` safe to show the customer, and the ids of what it is about.

### 401 Unauthorized Error

Unauthorized

- `error` (string, required) — Error message
- `problems` (list of CheckoutProblemResponseData, optional) — On a checkout write or finalize the purchase rules refuse: what the server found wrong, the same list the checkout's `problems` field holds. Each has a `code`, whether it is `blocking`, a `message` safe to show the customer, and the ids of what it is about.

### 403 Forbidden Error

Forbidden

- `error` (string, required) — Error message
- `problems` (list of CheckoutProblemResponseData, optional) — On a checkout write or finalize the purchase rules refuse: what the server found wrong, the same list the checkout's `problems` field holds. Each has a `code`, whether it is `blocking`, a `message` safe to show the customer, and the ids of what it is about.

### 404 Not Found Error

Not found

- `error` (string, required) — Error message
- `problems` (list of CheckoutProblemResponseData, optional) — On a checkout write or finalize the purchase rules refuse: what the server found wrong, the same list the checkout's `problems` field holds. Each has a `code`, whether it is `blocking`, a `message` safe to show the customer, and the ids of what it is about.

### 409 Conflict Error

Conflict

- `error` (string, required) — Error message
- `problems` (list of CheckoutProblemResponseData, optional) — On a checkout write or finalize the purchase rules refuse: what the server found wrong, the same list the checkout's `problems` field holds. Each has a `code`, whether it is `blocking`, a `message` safe to show the customer, and the ids of what it is about.

### 500 Internal Server Error

Server error

- `error` (string, required) — Error message
- `problems` (list of CheckoutProblemResponseData, optional) — On a checkout write or finalize the purchase rules refuse: what the server found wrong, the same list the checkout's `problems` field holds. Each has a `code`, whether it is `blocking`, a `message` safe to show the customer, and the ids of what it is about.

## Types

### UpdateAddOnRequestBody

- `add_on_id` (string, required)
- `price_id` (string, required)

### UpdateAutoTopupOverrideRequestBody

- `plan_credit_grant_id` (string, required)
- `auto_topup_amount` (long, optional, nullable)
- `auto_topup_enabled` (boolean, optional, nullable)
- `auto_topup_threshold_credits` (long, optional, nullable)

### UpdateCreditBundleRequestBody

- `bundle_id` (string, required)
- `quantity` (long, required)

### CheckoutFieldValue

- `id` (string, required)
- `value` (string, required)

### UpdatePayInAdvanceRequestBody

- `price_id` (string, required)
- `quantity` (long, required)

### CheckoutDraftResponseData

- `company_id` (string, required)
- `created_at` (datetime, required)
- `id` (string, required)
- `last_activity_at` (datetime, required)
- `problems` (list of CheckoutProblemResponseData, required)
- `selections` (CheckoutSelectionsResponseData, required)
- `status` (enum, required)
  - Allowed values: `abandoned`, `completed`, `expired`, `open`
- `updated_at` (datetime, required)
- `version` (long, required)
- `completed_at` (datetime, optional, nullable)
- `expires_at` (datetime, optional, nullable)
- `price_snapshot` (CheckoutPriceSnapshot, optional)
- `priced_at` (datetime, optional, nullable)
- `share_token` (string, optional, nullable)

### CheckoutsCheckoutIdPutResponsesContentApplicationJsonSchemaParams

Input parameters

### CheckoutProblemResponseData

- `blocking` (boolean, required) — Whether completing the checkout would be refused while this stands.
- `code` (enum, required)
  - Allowed values: `add_on_conflicts_with_plan`, `add_on_interval_mismatch`, `add_on_requires_billed_plan`, `add_on_unavailable`, `billing_cycle_anchor_conflicts_with_trial`, `billing_cycle_anchor_must_be_future`, `billing_cycle_anchor_needs_new_subscription`, `billing_cycle_anchor_without_plan`, `billing_start_date_must_be_past`, `billing_start_date_needs_new_subscription`, `billing_start_date_needs_renewal_date`, `billing_start_date_not_before_renewal_date`, `billing_start_date_too_far_in_past`, `checkout_superseded`, `credit_bundle_incompatible`, `credit_bundle_unavailable`, `credit_bundles_activate_on_payment`, `currency_mismatch`, `custom_field_required`, `discount_ineligible`, `downgrade_not_permitted`, `end_date_must_be_future`, `end_date_needs_new_subscription`, `end_date_not_after_renewal_date`, `free_first_period_activates_on_payment`, `invoice_email_required`, `invoiced_subscription_conflicts_with_trial`, `invoiced_subscription_needs_new_subscription`, `invoiced_subscription_requires_plan`, `opt_in_required`, `pay_in_advance_price_invalid`, `pay_in_advance_required`, `payment_method_required`, `plan_not_trialable`, `plan_unavailable`, `price_unavailable`, `prorate_first_period_without_anchor`, `provider_rejected`, `scheduled_change_blocks_purchase`, `scheduled_change_pending`, `selection_invalid`, `subscription_currency_change`, `trial_end_must_be_future`, `trial_end_too_far`, `trial_excludes_add_ons`, `trial_excludes_usage_based`, `usage_price_missing_for_interval`, `usage_over_limit`
- `message` (string, required) — What is wrong, in words safe for anyone allowed to read the checkout.
- `source` (enum, required)
  - Allowed values: `provider`, `requirement`, `validation`
- `bundle_id` (string, optional, nullable)
- `currency` (enum, optional) — The currency this problem is about, when it is about one.
  - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `htg`, `huf`, `idr`, `ils`, `inr`, `isk`, `jmd`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `krw`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `std`, `szl`, `thb`, `tjs`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xcg`, `xof`, `xpf`, `yer`, `zar`, `zmw`
- `detail` (string, optional) — Diagnostic detail for operators, including what the billing provider said. Never shown to a customer.
- `feature_id` (string, optional, nullable)
- `field_id` (string, optional, nullable)
- `payment_method_id` (string, optional, nullable)
- `plan_id` (string, optional, nullable)
- `price_id` (string, optional, nullable)

### CheckoutSelectionsResponseData

- `add_on_ids` (list of UpdateAddOnRequestBody, required)
- `auto_topup_overrides` (list of UpdateAutoTopupOverrideRequestBody, required)
- `credit_bundles` (list of UpdateCreditBundleRequestBody, required)
- `custom_field_values` (list of CheckoutFieldValue, required)
- `intent` (enum, required) — What the checkout does to the subscription.
  - Allowed values: `cancel`, `change`
- `pay_in_advance` (list of UpdatePayInAdvanceRequestBody, required)
- `skip_trial` (boolean, required)
- `billing_entity_id` (string, optional, nullable)
- `coupon_external_id` (string, optional, nullable)
- `currency` (string, optional, nullable) — The currency the cart is being built in, as the create or last update named it; null when neither did.
- `new_plan_id` (string, optional, nullable)
- `new_price_id` (string, optional, nullable)
- `opt_in_accepted` (boolean, optional, nullable)
- `payment_method_id` (string, optional, nullable)
- `promo_code` (string, optional, nullable)

### CheckoutPriceSnapshot

- `amount_off` (long, required)
- `currency` (enum, required)
  - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `htg`, `huf`, `idr`, `ils`, `inr`, `isk`, `jmd`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `krw`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `std`, `szl`, `thb`, `tjs`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xcg`, `xof`, `xpf`, `yer`, `zar`, `zmw`
- `customer_balance_applied` (long, required)
- `customer_balance_remaining` (long, required)
- `discount_amount` (long, required)
- `discounts` (list of CheckoutPriceSnapshotDiscount, required)
- `due_now` (long, required)
- `is_scheduled_downgrade` (boolean, required)
- `new_charges` (long, required)
- `opt_in_required` (boolean, required)
- `payment_method_required` (boolean, required)
- `percent_off` (double, required)
- `period_start` (datetime, required)
- `priced_at` (datetime, required)
- `promo_code_applied` (boolean, required)
- `proration` (long, required)
- `total_per_billing_period` (long, required)
- `opt_in_text` (string, optional, nullable)
- `opt_in_title` (string, optional, nullable)
- `proration_detail` (CheckoutPriceSnapshotProration, optional)
- `scheduled_change_time` (datetime, optional, nullable)
- `tax_amount` (long, optional, nullable)
- `trial_end` (datetime, optional, nullable)

### CheckoutPriceSnapshotDiscount

- `coupon_external_id` (string, required)
- `coupon_name` (string, required)
- `duration` (string, required)
- `amount_off` (long, optional, nullable)
- `currency` (enum, optional, nullable)
  - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `htg`, `huf`, `idr`, `ils`, `inr`, `isk`, `jmd`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `krw`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `std`, `szl`, `thb`, `tjs`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xcg`, `xof`, `xpf`, `yer`, `zar`, `zmw`
- `customer_facing_code` (string, optional, nullable)
- `duration_in_months` (long, optional, nullable)
- `percent_off` (double, optional, nullable)
- `promo_code_external_id` (string, optional, nullable)

### CheckoutPriceSnapshotProration

- `charge` (long, required)
- `credit` (long, required)
- `lines` (list of CheckoutPriceSnapshotProrationLine, required)
- `timing` (enum, required)
  - Allowed values: `at_renewal`, `none`, `now`
- `total` (long, required)
- `billed_at` (datetime, optional, nullable)

### CheckoutPriceSnapshotProrationLine

- `amount` (long, required)
- `kind` (enum, required)
  - Allowed values: `charge`, `credit`
- `period_end` (datetime, optional, nullable)
- `period_start` (datetime, optional, nullable)
- `plan_id` (string, optional, nullable)
- `price_id` (string, optional, nullable)
- `quantity` (long, optional, nullable)

## Examples

**Request**

```json
{
  "version": 1
}
```

**Response**

```json
{
  "data": {
    "company_id": "string",
    "created_at": "2024-01-15T09:30:00Z",
    "id": "string",
    "last_activity_at": "2024-01-15T09:30:00Z",
    "problems": [
      {
        "blocking": true,
        "code": "add_on_conflicts_with_plan",
        "message": "string",
        "source": "provider",
        "bundle_id": "string",
        "currency": "aed",
        "detail": "string",
        "feature_id": "string",
        "field_id": "string",
        "payment_method_id": "string",
        "plan_id": "string",
        "price_id": "string"
      }
    ],
    "selections": {
      "add_on_ids": [
        {
          "add_on_id": "string",
          "price_id": "string"
        }
      ],
      "auto_topup_overrides": [
        {
          "plan_credit_grant_id": "string",
          "auto_topup_amount": 1,
          "auto_topup_enabled": true,
          "auto_topup_threshold_credits": 1
        }
      ],
      "credit_bundles": [
        {
          "bundle_id": "string",
          "quantity": 1
        }
      ],
      "custom_field_values": [
        {
          "id": "string",
          "value": "string"
        }
      ],
      "intent": "cancel",
      "pay_in_advance": [
        {
          "price_id": "string",
          "quantity": 1
        }
      ],
      "skip_trial": true,
      "billing_entity_id": "string",
      "coupon_external_id": "string",
      "currency": "string",
      "new_plan_id": "string",
      "new_price_id": "string",
      "opt_in_accepted": true,
      "payment_method_id": "string",
      "promo_code": "string"
    },
    "status": "abandoned",
    "updated_at": "2024-01-15T09:30:00Z",
    "version": 1,
    "completed_at": "2024-01-15T09:30:00Z",
    "expires_at": "2024-01-15T09:30:00Z",
    "price_snapshot": {
      "amount_off": 1,
      "currency": "aed",
      "customer_balance_applied": 1,
      "customer_balance_remaining": 1,
      "discount_amount": 1,
      "discounts": [
        {
          "coupon_external_id": "string",
          "coupon_name": "string",
          "duration": "string",
          "amount_off": 1,
          "currency": "aed",
          "customer_facing_code": "string",
          "duration_in_months": 1,
          "percent_off": 1.1,
          "promo_code_external_id": "string"
        }
      ],
      "due_now": 1,
      "is_scheduled_downgrade": true,
      "new_charges": 1,
      "opt_in_required": true,
      "payment_method_required": true,
      "percent_off": 1.1,
      "period_start": "2024-01-15T09:30:00Z",
      "priced_at": "2024-01-15T09:30:00Z",
      "promo_code_applied": true,
      "proration": 1,
      "total_per_billing_period": 1,
      "opt_in_text": "string",
      "opt_in_title": "string",
      "proration_detail": {
        "charge": 1,
        "credit": 1,
        "lines": [
          {
            "amount": 1,
            "kind": "charge",
            "period_end": "2024-01-15T09:30:00Z",
            "period_start": "2024-01-15T09:30:00Z",
            "plan_id": "string",
            "price_id": "string",
            "quantity": 1
          }
        ],
        "timing": "at_renewal",
        "total": 1,
        "billed_at": "2024-01-15T09:30:00Z"
      },
      "scheduled_change_time": "2024-01-15T09:30:00Z",
      "tax_amount": 1,
      "trial_end": "2024-01-15T09:30:00Z"
    },
    "priced_at": "2024-01-15T09:30:00Z",
    "share_token": "string"
  },
  "params": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.schematichq.com/checkouts/checkout_id"

payload = { "version": 1 }
headers = {
    "X-Schematic-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.schematichq.com/checkouts/checkout_id';
const options = {
  method: 'PUT',
  headers: {'X-Schematic-Api-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"version":1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.schematichq.com/checkouts/checkout_id"

	payload := strings.NewReader("{\n  \"version\": 1\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-Schematic-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.schematichq.com/checkouts/checkout_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["X-Schematic-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"version\": 1\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.schematichq.com/checkouts/checkout_id")
  .header("X-Schematic-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"version\": 1\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.schematichq.com/checkouts/checkout_id', [
  'body' => '{
  "version": 1
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Schematic-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.schematichq.com/checkouts/checkout_id");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-Schematic-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"version\": 1\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Schematic-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["version": 1] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.schematichq.com/checkouts/checkout_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```