Skip to content

Quick Start

  1. Create a project

    After signing in, create a new project from the dashboard. Each project is an isolated environment with its own customers, wallets, and promotions.

  2. Get your API key

    Navigate to Settings → API Keys in your project dashboard and create a new API key. You’ll need this for all API requests.

  3. Make your first API call

    Terminal window
    curl -X GET https://api.storelayer.io/v1/customers \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json"
  4. Create a customer

    Terminal window
    curl -X POST https://api.storelayer.io/v1/customers \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "email": "customer@example.com",
    "name": "Jane Doe",
    "metadata": {
    "source": "website"
    }
    }'
  5. Credit points to a customer’s wallet

    Terminal window
    curl -X POST https://api.storelayer.io/v1/wallets/{customerId}/credit \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "amount": 500,
    "reason": "Welcome bonus"
    }'

All API responses follow a consistent format:

// Success
{
"success": true,
"data": { ... }
}
// Error
{
"success": false,
"error": {
"code": 400,
"message": "Validation error: email is required"
}
}