# Getting Started with Fluxis API

Fluxis is built on the open-source [NASPIP protocol](https://github.com/fluxisus/naspip). The hosted API handles signing, POS payment requests, webhooks, and reconciliation so you can integrate without running your own NASPIP infrastructure.

## Quick start (≈5 minutes)

### 1. Get credentials

Your Fluxis representative provides an **API key** and **API secret** for staging (`https://api.stgfluxis.us`) or production (`https://api.fluxis.us`).

### 2. Authenticate

```bash
curl -X POST https://api.fluxis.us/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","api_secret":"YOUR_API_SECRET"}'
```

Use the returned Bearer token on all protected calls, together with your API key header:

```
Authorization: Bearer <access_token>
x-fluxis-api-key: <your_api_key>
```

### 3. Discover your Point of Sale

```bash
curl "https://api.fluxis.us/v1/pos?page=1&page_size=20" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "x-fluxis-api-key: YOUR_API_KEY"
```

### 4. Create a payment request

```bash
curl -X POST "https://api.fluxis.us/v1/pos/YOUR_POS_ID/payment-request" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "x-fluxis-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "49.99",
    "unique_asset_id": "npolygon_t0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
    "reference_id": "order-001"
  }'
```

The response includes a **NASPIP token** to show as a QR code or payment link.

### 5. Receive status updates

Register an account webhook (`POST /v1/account/{accountID}/webhook`) and verify signatures — see [Webhooks](/docs/developers/webhooks) and [Webhook Signature Verification](/docs/developers/webhook-signature-verification).

### 6. Reconcile (fallback)

List settlements with pagination: `GET /v1/transactions?page=1&page_size=50`.

## Next steps

1. **[API Integration Guide](/docs/developers/tutorials/api-integration-guide)** — full end-to-end flow
2. **[API Reference](/api)** — all endpoints
3. **[Unique Asset IDs](/docs/key-concepts/uai)** — including USDC.e mappings
4. **[NASPIP Security Model](/docs/key-concepts/naspip/security-model)** — token verification model
5. **[Merchant onboarding](/docs/merchant-integration/sign-up)** — Ready → Set → Go

---

For production access and settlement address setup, contact [support@fluxis.us](mailto:support@fluxis.us).
