Quick Start Guide

Get up and running with TOWN Platform in under 10 minutes.

10 minute read
Last updated: January 2025
📄

Prerequisites

Before you begin, make sure you have:

  • ✔ A TOWN Platform account (sign up at Request Access).
  • ✔ Your API keys from the Dashboard.
  • ✔ Basic knowledge of REST APIs and your chosen programming language.
1

Get Your API Keys

Navigate to your Dashboard → API Keys to generate your credentials.

Sandbox API KeyTest Environment
sk_sandbox_1234567890abcdefghijklmnopqrstuvwxyz

Important

Keep your API keys secure! Never commit them to version control or expose them in client-side code. Use environment variables to store your keys safely.

2

Install the SDK

Choose your preferred programming language:

Code
// Install the TOWN SDK
npm install @town-platform/sdk

// Initialize the client
import { TownClient } from '@town-platform/sdk';

const client = new TownClient({
  apiKey: 'your_api_key_here',
  environment: 'sandbox', // or 'production'
});

// Make your first API call
async function createTransaction() {
  try {
    const transaction = await client.fiero.transactions.create({
      amount: 100_00,
      currency: 'USD',
      userId: 'user_123',
      type: 'deposit',
    });

    console.log('Transaction created', transaction.id);
  } catch (error) {
    console.error('Error:', error.message);
  }
}

createTransaction();
3

Verify Your Integration

Test your integration with a simple API call. If everything is configured correctly, you should receive a 200 OK response with transaction details.

Code
curl https://api.town.dev/v1/transactions \
  -H "Authorization: Bearer sk_sandbox_123" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "currency": "USD",
    "userId": "user_123",
    "type": "deposit"
  }'

If you receive an authentication error, double-check that you're using your sandbox secret key and that the environment is set to sandbox.

Need help getting started?