> ## 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 medium providers

> Inspect which PSP providers will service a checkout/medium combination.

Returns the PSP providers that will be used when a customer pays this
checkout via the given medium. Useful for diagnostics and for
rendering provider-specific inputs (e.g. "which bank do you want
to dial?" for `ussd`).

## Path parameters

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

<ParamField path="mediumId" type="string" required>
  Medium identifier, `bank_transfer`, `mobile_money`, or `ussd`.
</ParamField>

## Response

An array of provider entries. The shape varies by medium, but every
entry carries at least a `psp` identifier; mediums like `ussd` and
`mobile_money` also list the banks or wallet providers each PSP
supports.

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

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

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

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

  providers = requests.get(
      f"https://api.kwugwo.africa/v1/checkouts/{checkout_id}/{medium_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/%s", checkoutId, mediumId)
  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}
  [
    {
      "psp": "paystack",
      "banks": [
        { "code": "058", "name": "GTBank" },
        { "code": "044", "name": "Access Bank" }
      ]
    }
  ]
  ```
</ResponseExample>
