Development store

The API has no test mode. A test mode would have to run through payments, invoices and stock; instead, the integration is tested in a separate store of the same account.

Loading the search index…

Development store

A store for tests

The plan belongs to the account, so the API works in every store of an account whose plan includes it, the free trial too. A token sees only the store it was issued in: the integration moves between the development and the production store by changing the token, and the address of the API stays the same.

Set it up

  1. In your Saleya account, create another store, for example Acme (dev), and set it up like the production store — country, currency, time zone — so that money and dates behave the same.
  2. Add a few categories, products and a location, or create them through the API itself.
  3. In the new store, open Settings → API and webhooks, create an app with the same scopes as in production and issue a token.
  4. Call GET /store with the new token and check the name: requests now go to the development store.

What is real in it

A development store is a real store without customers:

  • its orders, payments and invoices are real documents of that store — do not connect the payment and tax accounts of the business to it;
  • its team gets the notifications of its orders, like in any store;
  • its requests count against its own limits, not those of the production store;
  • webhooks need a public https address: point them to a tunnel to your machine, because localhost and private addresses are rejected.

When the tests are over, delete the store in the account: its apps and tokens stop working with it.

Next guidePagination and sync