> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kwugwo.africa/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a checkout

> Fetch a single checkout configuration.

Returns one checkout by ID. Use this when you have the ID stored on
an order and need to render a specific surface for the customer.

## Path parameters

<ParamField path="checkoutId" type="string" required>
  Checkout ID, `chk.XXXX.YYYY...`.
</ParamField>

## Response

Same shape as one entry from [List checkouts](/checkouts/list#response).

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.kwugwo.africa/v1/checkouts/chk.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE \
    -H "Authorization: Bearer $KWUGWO_SECRET_KEY"
  ```

  ```js Node theme={null}
  const checkout = await fetch(
    `https://api.kwugwo.africa/v1/checkouts/${checkoutId}`,
    { headers: { Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}` } }
  ).then(r => r.json());
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init("https://api.kwugwo.africa/v1/checkouts/{$checkoutId}");
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY')],
  ]);
  $checkout = json_decode(curl_exec($ch), true);
  curl_close($ch);
  ```

  ```python Python theme={null}
  import os, requests

  checkout = requests.get(
      f"https://api.kwugwo.africa/v1/checkouts/{checkout_id}",
      headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
  ).json()
  ```

  ```go Go theme={null}
  url := fmt.Sprintf("https://api.kwugwo.africa/v1/checkouts/%s", checkoutId)
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "uid": "chk.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    "name": "Main checkout",
    "currency": "NGN",
    "status": "active",
    "mediums": [
      { "medium": "bank_transfer", "position": 0, "is_default": true },
      { "medium": "ussd", "position": 1, "is_default": false }
    ]
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "type": "https://tools.ietf.org/html/rfc2616#section-10",
    "title": "Not Found",
    "status": 404,
    "detail": "checkout.error.not_found"
  }
  ```
</ResponseExample>
