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
- Log into your Pixlpay dashboard at
https://yourstore.pixlpay.net - Navigate to Settings > API Tokens
- Click Create API Token
- Enter a name (e.g., "Quick Start Test")
- Select the scopes you need (or use "Full Access" for testing)
- Click Generate
Important
Copy your token immediately - it's only shown once! Store it securely.
Your token will look like this:
a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6Step 2: Make Your First API Call
Let's fetch your products using cURL:
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/products" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"Expected Response
{
"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
{
"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
{
"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:
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
{
"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:
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
{
"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:
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:
- Listen for
order.paidwebhook - Verify the signature
- Deliver items to the player
- Mark order as fulfilled via API
Inventory Sync
Keep products synchronized:
- Use
GET /productsto fetch all products - Compare with your external system
- Use webhooks to track changes in real-time
Analytics Dashboard
Build custom reporting:
- Use
GET /analytics/revenuefor revenue data - Use
GET /analytics/salesfor product performance - Aggregate and display in your dashboard
Estimated Time: 5 minutes Difficulty: Beginner