# Development stores

> Free shops to build against, which never open and take test payments only.

Source: https://storeware.ai/docs/get-started/development-stores

## What they are

A development store belongs to your developer organisation and works like any shop, except that it can never open to the public, it sends no email, and it takes [test payments](https://storeware.ai/docs/get-started/test-payments) only, where no money moves. An organisation may have 25. In the admin, each one carries a **Test payments** badge.

- A draft app installs only on its developer's own development stores.
- A development release, which `app dev` sends, runs only there too, and is never offered to a merchant.
- Sample data and test orders go through the same services a real shop uses, so the events your app receives are the real ones.
- Charges your app asks for on a development store are always tests: the whole lifecycle runs and no money moves.

## Making one

From the Developer page in the admin, or from the CLI:

> **Early access.** The CLI and the SDK are not on npm yet, so the commands below do not run for everyone. To build an app now, write to https://storeware.ai/contact.

```bash
npx @storeware/cli store create "Size guide test shop"
npx @storeware/cli store list
```

`app dev` makes one for you the first time if you have none.

## Giving it something to work with

```bash
npx @storeware/cli store seed
```

Seeding adds six products with stock, four customers and a trade account, and sets up delivery, so an app has a catalogue to read and customers to look up.

```bash
npx @storeware/cli store test-order
npx @storeware/cli store test-order --paid
```

A test order is a real order placed on account, so `order.created.v1` and `order.invoiced.v1` are sent as they would be on any shop. With `--paid` it is also marked paid, and `order.paid.v1` follows.

```bash
npx @storeware/cli store test-order --pay approve
```

With `--pay`, the order is paid by a test payment instead, ending the way you say: `approve`, `decline`, `needs_action` or `error`.

## Taking a test payment

In the store's preview, the checkout shows four buttons instead of a card form. Each ends the payment a different way: approved, declined, stopped for the bank, or an error. See [Test payments](https://storeware.ai/docs/get-started/test-payments) for what each ending sends your app, and how refunds work.

Add `--store <handle>` to pick a store, and `--json` to any read for a script.
