Orders API
Access and manage orders in your store.
List Orders
http
GET /api/external/v1/ordersQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (default: 15, max: 100) |
status | string | Filter: pending, completed, refunded, cancelled |
payment_status | string | Filter: pending, paid, failed |
from | string | Start date (YYYY-MM-DD) |
to | string | End date (YYYY-MM-DD) |
customer_email | string | Filter by customer email |
sort | string | Sort field: created_at, total |
order | string | Sort order: asc, desc |
Example Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/orders?status=pending&from=2025-01-01" \
-H "Authorization: Bearer YOUR_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",
"subtotal": "29.99",
"tax": "0.00",
"currency": "USD",
"customer": {
"id": 1,
"email": "player@example.com",
"username": "Player123"
},
"items": [
{
"id": 1,
"product_id": 1,
"product_name": "VIP Rank",
"quantity": 1,
"price": "29.99",
"delivery_status": "delivered"
}
],
"payment_method": "stripe",
"created_at": "2025-01-20T14:30:00Z",
"completed_at": "2025-01-20T14:35:00Z"
}
],
"meta": {
"current_page": 1,
"last_page": 10,
"per_page": 15,
"total": 150
}
}Get Single Order
http
GET /api/external/v1/orders/{id}Example Request
bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/orders/1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"Response
Returns full order object with items and delivery details.
Fulfill Order
Mark an order as fulfilled (delivered).
http
POST /api/external/v1/orders/{id}/fulfillRequest Body
json
{
"note": "Delivered manually via console"
}Example Request
bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/orders/1/fulfill" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note": "Delivered manually"}'Response
json
{
"success": true,
"data": {
"id": 1,
"order_number": "ORD-2025-001",
"status": "completed",
"completed_at": "2025-01-20T15:00:00Z"
},
"message": "Order fulfilled successfully"
}Order Object
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier |
order_number | string | Human-readable order number |
status | string | Order status |
payment_status | string | Payment status |
total | string | Total amount |
subtotal | string | Subtotal before tax |
tax | string | Tax amount |
currency | string | Currency code |
customer | object | Customer information |
items | array | Order items |
payment_method | string | Payment provider used |
created_at | string | ISO 8601 timestamp |
completed_at | string | ISO 8601 timestamp |
Order Item Object
| Field | Type | Description |
|---|---|---|
id | integer | Item ID |
product_id | integer | Product ID |
product_name | string | Product name at time of purchase |
quantity | integer | Quantity ordered |
price | string | Price per item |
delivery_status | string | pending, delivered, failed |
Errors
| Status | Error | Description |
|---|---|---|
| 401 | Unauthorized | Invalid or missing token |
| 403 | Forbidden | Token lacks required scope |
| 404 | Not Found | Order doesn't exist |
| 422 | Unprocessable | Order already fulfilled |
