# Developer FAQ

Each answer is short and links to the page that holds the facts. Examples use the **test** environment; see [Environments](https://code.salaxy.com/get-started/environments.md) for demo and production. If your question is not here, see [Support](https://code.salaxy.com/get-started/support.md).

## Accounts and environments

**How do I get a test account?**
Create a test company at [test.palkkaus.fi](https://test.palkkaus.fi) with email and password. It takes a few minutes. See [Get a test account](https://code.salaxy.com/get-started/test-account.md).

**Do I need a real email address?**
No. After the first verification the test environment sends no emails, and verification is not required. See [Create an account](https://code.salaxy.com/get-started/rest/create-account.md).

**Is data in test also in demo?**
Yes. Test and demo share the same data. Production is separate. See [Environments](https://code.salaxy.com/get-started/environments.md).

**Which environment should I build against?**
Test. It runs the latest development code, and the examples on this site use it. Demo runs stable code on the same data, so you can check your integration there too. See [Environments](https://code.salaxy.com/get-started/environments.md).

## Authentication

**How long does an access token last?**
48 hours, with no refresh token. Repeat the grant when it expires. See [Tokens](https://code.salaxy.com/security/rest-authentication.md#tokens).

**Why does the token call fail with "not allowed to impersonate account"?**
The customer company has not authorised your partner account. For example, it may have been created under another partner. Create it through partner-initiated account creation, or ask Salaxy. See [Impersonation](https://code.salaxy.com/security/impersonation.md) and [Partner-initiated account creation](https://code.salaxy.com/security/account-creation.md).

**Does my test certificate work in production?**
No. A test certificate works only in test and demo. Create a separate certificate for production. See [Get a test account](https://code.salaxy.com/get-started/test-account.md#partner-integration).

## API behaviour

**Which API version should I use?**
Start on the version the note below names. See [Versions and changes](https://code.salaxy.com/reference/versions.md) for how the versions differ.

**Start on v03.** Salaxy API v03 is the current version. Salaxy API v04 is in beta: it may change, and it is not used in production yet. Build on v03, the current version. [Reference for v04 (beta)](https://code.salaxy.com/reference/rest-api-v04.md).

**Why does a status query return an empty list although the invoice exists?**
`GET /v03/api/payment-channel/{channel}/status/{status}` without `start` and `end` covers only the last 14 days. It returns `200` with an empty list, not an error. Pass an explicit date range for reconciliation and catch-up. See [Invoices and payments](https://code.salaxy.com/integration/invoices-and-payments.md).

**Why does a payment channel call answer `400` with a customer company token?**
Payment channel calls answer only to the account that owns the channel, normally your technical account. Any other account gets `400`. Use the owner account's token. See [Payment channels](https://code.salaxy.com/integration/payment-channels.md).

**How do I retry a failed create safely?**
The REST API has no general idempotency key. Set your own id on what you create and search for it before you create again. See [Retries and idempotency](https://code.salaxy.com/reference/idempotency.md).

**How do I read an error?**
See [Errors](https://code.salaxy.com/reference/errors.md).

## Embedded white label

**Why did my embedded session end?**
After the first load, change only what comes after the `#` in the iframe URL. Changing anything before it restarts the application and ends the session. See [URL parameters and sizing](https://code.salaxy.com/white-label/url-parameters.md).

## Help

**What do I ask Salaxy for, and what can I do myself?**
See [Support](https://code.salaxy.com/get-started/support.md).
