title: Installation
description: Install the Wontopos SDK for your language and verify your setup.
Installation
Install an official Wontopos SDK and verify everything works.
Package managers
Choose your language and install the SDK.
# npm (JavaScript/TypeScript)
npm install @wontopos/sdk # pip (Python)
pip install wontopos # Go
go get github.com/wontopos/wontopos-go System requirements
Node.js 18+, Python 3.8+, or Go 1.21+ required.
Environment setup
Set your API key
Store your API key as an environment variable.
export WONTOPOS_API_KEY="sk_live_your_key_here" $env:WONTOPOS_API_KEY="sk_live_your_key_here" Using a .env file
Create a .env file in your project root:
WONTOPOS_API_KEY=sk_live_your_key_here
WONTOPOS_BASE_URL=https://api.wontopos.com
WONTOPOS_ENV=sandbox Do not commit .env files
Add `.env` to your `.gitignore` to avoid leaking credentials.
Environment variables reference
| Variable | Required | Default | Description |
|---|---|---|---|
WONTOPOS_API_KEY | Yes | — | Your API key from the dashboard |
WONTOPOS_BASE_URL | No | https://api.wontopos.com | API base URL |
WONTOPOS_ENV | No | production | sandbox or production |
WONTOPOS_TIMEOUT | No | 30000 | Request timeout in ms |
WONTOPOS_MAX_RETRIES | No | 3 | Max automatic retries |
Verify installation
Run a quick check to confirm the SDK is working.
// JavaScript
import Wontopos from "@wontopos/sdk";
const client = new Wontopos(process.env.WONTOPOS_API_KEY);
const status = await client.health.check();
console.log(status); // { status: "ok" } # Python
import wontopos
import os
client = wontopos.Client(api_key=os.environ["WONTOPOS_API_KEY"])
status = client.health.check()
print(status) # {"status": "ok"} // Go
package main
import (
"context"
"fmt"
"os"
wontopos "github.com/wontopos/wontopos-go"
)
func main() {
client := wontopos.NewClient(os.Getenv("WONTOPOS_API_KEY"))
status, _ := client.Health.Check(context.Background())
fmt.Println(status) // {Status: ok}
} # cURL
curl https://api.wontopos.com/v1/health
-H "Authorization: Bearer $WONTOPOS_API_KEY" Expected output:
{
"status": "ok",
"version": "v1",
"timestamp": "2026-03-30T12:00:00Z"
} Troubleshooting
If you get a `401 Unauthorized` error, double-check that your `WONTOPOS_API_KEY` is set correctly.
Next steps
- First API Call — Build a complete request with error handling
- Environments — Configure sandbox vs. production