Skip to content

Quick Start

Get up and running with the Pixlpay API in 5 minutes! This guide walks you through creating your first API integration.

Prerequisites

  • An active Pixlpay store account
  • Basic knowledge of REST APIs
  • A tool to make HTTP requests (cURL, Postman, or your preferred programming language)

Step 1: Create an API Token

  1. Log into your Pixlpay dashboard at https://yourstore.pixlpay.net
  2. Navigate to Settings > API Tokens
  3. Click Create API Token
  4. Enter a name (e.g., "Quick Start Test")
  5. Select the scopes you need (or use "Full Access" for testing)
  6. Click Generate

Important

Copy your token immediately - it's only shown once! Store it securely.

Your token will look like this:

a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6

Step 2: Make Your First API Call

Let's fetch your products using cURL:

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/products" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Expected Response

json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "VIP Rank",
      "description": "Access to VIP features",
      "price": "9.99",
      "type": "digital",
      "is_active": true,
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 1,
    "per_page": 15,
    "total": 1
  }
}

Congratulations! You've made your first API call.

Troubleshooting

401 Unauthorized

json
{
  "success": false,
  "error": "Unauthorized",
  "message": "Invalid or missing API token"
}
  • Check that you copied your token correctly
  • Ensure the token hasn't been revoked

Empty data array

json
{
  "success": true,
  "data": [],
  "meta": { "total": 0 }
}
  • Your store doesn't have any products yet - that's okay!

Step 3: View an Order

Let's fetch your recent orders:

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/orders?per_page=5" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Response

json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "order_number": "ORD-2025-001",
      "status": "completed",
      "payment_status": "paid",
      "total": "29.99",
      "customer_email": "player@example.com",
      "items": [
        {
          "product_id": 1,
          "product_name": "VIP Rank",
          "quantity": 1,
          "price": "29.99"
        }
      ],
      "created_at": "2025-01-20T14:30:00Z"
    }
  ]
}

Step 4: Set Up a Webhook

Webhooks notify you in real-time when events occur. Let's create one:

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/pixlpay",
    "events": ["order.created", "order.paid", "order.completed"]
  }'

Response

json
{
  "success": true,
  "data": {
    "id": 1,
    "url": "https://yourapp.com/webhooks/pixlpay",
    "events": ["order.created", "order.paid", "order.completed"],
    "is_active": true,
    "secret": "whsec_abc123def456...",
    "created_at": "2025-01-20T15:00:00Z"
  }
}

Save Your Secret

Store the secret securely - you'll need it to verify webhook signatures.

Step 5: Test Your Webhook

Send a test webhook to verify your endpoint:

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/webhooks/1/test" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Check your endpoint - you should receive a test payload!

What's Next?

You've completed the basics! Here's what to explore next:

  • Webhooks Guide - Learn about all webhook events and signature verification
  • API Reference - Interactive documentation for all endpoints
  • Code Examples - Ready-to-use code in PHP, Node.js, Python, and more

Common Integration Patterns

Order Fulfillment

Automatically process orders when payment is received:

  1. Listen for order.paid webhook
  2. Verify the signature
  3. Deliver items to the player
  4. Mark order as fulfilled via API

Inventory Sync

Keep products synchronized:

  1. Use GET /products to fetch all products
  2. Compare with your external system
  3. Use webhooks to track changes in real-time

Analytics Dashboard

Build custom reporting:

  1. Use GET /analytics/revenue for revenue data
  2. Use GET /analytics/sales for product performance
  3. Aggregate and display in your dashboard

Estimated Time: 5 minutes Difficulty: Beginner

Built for game developers, by game developers.