# Changelog

> What changed in the GameCoin API, the server SDKs and the browser files, newest first, with the version where each thing arrived.

## How to read this page

The **API** is versioned by its address, `/api/v1`. A client should ignore a field it does not know, so that a field added later does not break it. The **server SDKs** (Node.js, Python, PHP, Go and C#) share one version number and ship the same features together: while the version is `0.x`, a minor release may change an SDK's API. The **browser files** are served by GameCoin itself, so you always get the current version.

> [!NOTE]
> The server SDKs are a pre-release and are not on the package registries yet. The versions below are the ones you get from the source of each SDK. The full list of changes of each one is in its `CHANGELOG.md`.

## Server SDKs

### 0.4.0: manage the catalog (October 2026)

- New resources `currencies`, `items` and `packs`, each with `create`, `get`, `update`, `archive` and `list`. They are the [catalog management API](/docs/api/catalog-management), in all five SDKs.
- Results carry the catalog object plus its `status`, `createdAt` and `updatedAt`. A pack also carries its `sortOrder` and `availability`.
- `archive` never deletes: the resource stays readable, and `list` leaves archived resources out unless you ask for them.
- Each environment has its own catalog: what a test key creates exists in `test` only.
- A create has no idempotency key, because the code or the SKU is its natural key. A taken one is `CONFLICT` with `CODE_TAKEN` or `SKU_TAKEN`.
- Twelve resources and thirty-two calls in all.

### 0.3.0: gift codes and pack availability

- `codes.redeem` redeems a [gift code](/docs/guides/codes) for a player. A refused code is `VALIDATION_FAILED` with `CODE_INVALID` and is never retried.
- `checkouts.create` takes a `creatorCode`, and an order shows its `creatorCode`.
- Packs have an `availability` (sale window, stock left, founder flag), and the catalog tells whether the game is in `prelaunch` and when it launches.
- New error codes `PACK_NOT_AVAILABLE` and `PACK_SOLD_OUT`, both `409`.
- Fields added in this version read as empty when an older server does not send them, so an older API or a queued webhook event stays readable.

### 0.2.0: locale and webhook verification

- `checkouts.create` takes a `locale` (`fr`, `en` or `nl`): the language of the payment page, the receipt and the e-mails.
- A function that checks the signature of a [webhook](/docs/guides/webhooks) and returns a typed event. It needs no client and makes no request. A call older than five minutes is refused.
- A signature error with a `reason`: `missing_header`, `malformed_header`, `no_matching_signature`, `timestamp_out_of_tolerance` or `invalid_payload`.
- Event types as constants: `order.fulfilled`, `order.refunded`, `order.chargeback`, `wallet.credited` and `webhook.test`.

### 0.1.0: the first release

- The whole server API: `catalog`, `players`, `wallet`, `ledger`, `inventory`, `purchases`, `checkouts` and `orders`.
- The `ext()` helper for players named with your own id, with the reference encoded exactly once.
- An idempotency key on every write, and a `replayed` flag on each result.
- Automatic retries on network errors, timeouts, `5xx` and `429`, with backoff and `Retry-After`. The refund is retried on `429` only.
- A typed error with `code`, `status`, `details` and `retryAfter`. The secret key never appears in an error or in a printed client.

## Browser files

| File | Version | What it is |
|---|---|---|
| `/sdk/gamecoin-1.2.0.js` | 1.2.0 | The [browser SDK](/docs/sdk/browser): one file, no dependency. Never changes. `/sdk/gamecoin.js` serves the latest version. |
| `/sdk/gamecoin-widget-1.0.0.js` | 1.0.0 | The [shop widget](/docs/sdk/widget), loaded from the same host. Never changes. `/sdk/gamecoin-widget.js` serves the latest version. |

## API

### Catalog management

`GET`, `POST`, `PATCH` and `DELETE` on `/currencies`, `/items` and `/packs`, with the secret key: create a catalog from a script, change a price, archive a pack. See [Catalog management](/docs/api/catalog-management).

### Codes, creator codes and founder packs

Gift codes (`POST /players/{player}/codes/redeem` and `POST /client/me/codes/redeem`), a `creatorCode` on checkouts, and a sale window, a stock and a founder flag on packs. See [Gift codes and creator codes](/docs/guides/codes) and [Founder packs](/docs/guides/founder-packs).

### Webhooks

Signed events for orders and wallets, with retries and a delivery log. See [Webhooks](/docs/guides/webhooks).

### The first release

The server API (`/players`, `/wallet`, `/ledger`, `/inventory`, `/purchases`, `/checkouts`, `/orders`) and the client API (`/client/**`) for browsers, with the three credentials: secret key, publishable key and player token.

## Where next

- [Server SDKs](/docs/sdk/server): the five SDKs side by side.
- [API reference](/docs/api): every route and field.
