> ## 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.

# List checkouts

> List the checkout configurations on this workspace.

Returns the checkouts you have configured in the dashboard, optionally
filtered by status and currency. Use a checkout's `uid` as the
`checkout` parameter on [Create an ugwo](/ugwo/create) to route the
payment through that checkout's specific rules.

<Note>
  Checkouts are created and edited from the dashboard, not from this
  API. This endpoint is read-only.
</Note>

## Query parameters

<ParamField query="filter[status][]" type="integer[]">
  Status filter, repeatable. `1` = active, `2` = inactive.
  Defaults to active + inactive when omitted.
</ParamField>

<ParamField query="filter[currency][]" type="string[]">
  Currency filter, repeatable. ISO-4217 codes (`NGN`, `GHS`, …).
</ParamField>

## Response

Returns an array of checkout objects (no pagination at this endpoint,
since a workspace rarely has more than a handful).

<ResponseField name="uid" type="string">Checkout ID (`chk.…`).</ResponseField>
<ResponseField name="name" type="string">Human-readable name from the dashboard.</ResponseField>
<ResponseField name="currency" type="string">ISO-4217 currency code.</ResponseField>
<ResponseField name="status" type="string">`active` or `inactive`.</ResponseField>
<ResponseField name="mediums" type="object[]">Mediums enabled on this checkout, ordered by `position`. Each entry has `medium`, `position`, `is_default`.</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  # All active NGN checkouts
  curl -G https://api.kwugwo.africa/v1/checkouts \
    -H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
    --data-urlencode "filter[status][]=1" \
    --data-urlencode "filter[currency][]=NGN"
  ```

  ```js Node theme={null}
  const q = "filter[status][]=1&filter[currency][]=NGN";
  const checkouts = await fetch(`https://api.kwugwo.africa/v1/checkouts?${q}`, {
    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?" . http_build_query([
      'filter' => ['status' => [1], 'currency' => ['NGN']],
  ]));
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY')],
  ]);
  $checkouts = json_decode(curl_exec($ch), true);
  curl_close($ch);
  ```

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

  checkouts = requests.get(
      "https://api.kwugwo.africa/v1/checkouts",
      headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
      params=[("filter[status][]", 1), ("filter[currency][]", "NGN")],
  ).json()
  ```

  ```go Go theme={null}
  url := "https://api.kwugwo.africa/v1/checkouts?filter%5Bstatus%5D%5B%5D=1&filter%5Bcurrency%5D%5B%5D=NGN"
  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 }
      ]
    }
  ]
  ```
</ResponseExample>
