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

# Quickstart

> Place your first order and fetch its codes in a few minutes.

This walks through placing an order with a sandbox key and fetching its codes.

## 1. Create a sandbox key

In your reseller dashboard, create an API key in the **test** environment. It is
prefixed `sc_test_` and shown once — copy it now.

## 2. Browse the catalog

Each product is a purchasable denomination. Its `id` is what you order.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.sodacards.com/v1/catalog \
    -H "X-API-Key: sc_test_your_key_here"
  ```

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

  resp = requests.get(
      "https://api.sodacards.com/v1/catalog",
      headers={"X-API-Key": "sc_test_your_key_here"},
  )
  print(resp.json())
  ```

  ```js Node theme={null}
  const resp = await fetch("https://api.sodacards.com/v1/catalog", {
    headers: { "X-API-Key": "sc_test_your_key_here" },
  });
  console.log(await resp.json());
  ```
</CodeGroup>

## 3. Place an order

Send the product id and quantity. Include an `Idempotency-Key` so a retry never
places the order twice (see [Idempotency](/idempotency)).

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.sodacards.com/v1/orders \
    -H "X-API-Key: sc_test_your_key_here" \
    -H "Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7" \
    -H "Content-Type: application/json" \
    -d '{"product_id": "prod_123", "quantity": 1}'
  ```

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

  resp = requests.post(
      "https://api.sodacards.com/v1/orders",
      headers={
          "X-API-Key": "sc_test_your_key_here",
          "Idempotency-Key": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      },
      json={"product_id": "prod_123", "quantity": 1},
  )
  print(resp.json())
  ```
</CodeGroup>

The response carries the order `id` and its `status`.

## 4. Fetch the codes

Once the order is `completed` — you will receive an
[`order.fulfilled` webhook](/webhooks), or you can poll `GET /v1/orders/{id}` —
fetch the codes:

```bash theme={null}
curl https://api.sodacards.com/v1/orders/ord_123/codes \
  -H "X-API-Key: sc_test_your_key_here"
```

In the sandbox the codes are deterministic test values. Switch to a `sc_live_` key
to order against your real wallet and supply.
