Error Response Format
All errors follow a consistent structure:| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error code |
message | string | Human-readable description |
doc_url | string | Link to relevant documentation |
details | array | Field-level validation errors (optional) |
HTTP Status Codes
| Code | Name | Description |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
204 | No Content | Success with no response body (e.g., DELETE) |
400 | Bad Request | Invalid request syntax |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Valid key but insufficient permissions |
404 | Not Found | Resource doesn’t exist |
422 | Validation Error | Invalid field values |
429 | Too Many Requests | Rate limit exceeded |
500 | Server Error | Something went wrong on our end |
Error Codes Reference
Authentication Errors
UNAUTHORIZED
UNAUTHORIZED
FORBIDDEN
FORBIDDEN
HTTP 403 - API key is valid but your shop is suspended or doesn’t have access.Solution: Contact support to resolve account issues.
Validation Errors
VALIDATION_ERROR
VALIDATION_ERROR
HTTP 422 - One or more fields failed validation.Solution: Check the
details array for specific field errors.Resource Errors
NOT_FOUND
NOT_FOUND
HTTP 404 - The requested resource doesn’t exist.Solution: Verify the resource ID is correct.
PRODUCT_NOT_FOUND
PRODUCT_NOT_FOUND
HTTP 404 - Specific product not found.
INVOICE_NOT_FOUND
INVOICE_NOT_FOUND
HTTP 404 - Specific invoice not found.
PAYMENT_NOT_FOUND
PAYMENT_NOT_FOUND
HTTP 404 - Payment not found.
CUSTOMER_NOT_FOUND
CUSTOMER_NOT_FOUND
HTTP 404 - Customer not found.
CATEGORY_NOT_FOUND
CATEGORY_NOT_FOUND
HTTP 404 - Category not found.
COUPON_NOT_FOUND
COUPON_NOT_FOUND
HTTP 404 - Coupon not found.
SUBSCRIPTION_NOT_FOUND
SUBSCRIPTION_NOT_FOUND
HTTP 404 - Subscription not found.
TICKET_NOT_FOUND
TICKET_NOT_FOUND
HTTP 404 - Support ticket not found.
REVIEW_NOT_FOUND
REVIEW_NOT_FOUND
HTTP 404 - Review not found.
ESCROW_NOT_FOUND
ESCROW_NOT_FOUND
HTTP 404 - Escrow transaction not found.
License Errors
LICENSE_NOT_FOUND
LICENSE_NOT_FOUND
HTTP 404 - License key not found.
LICENSE_INVALID
LICENSE_INVALID
HTTP 400 - License key is invalid or malformed.
LICENSE_EXPIRED
LICENSE_EXPIRED
HTTP 400 - License key has expired.
LICENSE_HWID_MISMATCH
LICENSE_HWID_MISMATCH
HTTP 400 - Hardware ID does not match the registered device.
Coupon Errors
COUPON_EXPIRED
COUPON_EXPIRED
HTTP 400 - Coupon has expired.
COUPON_MAX_USES_REACHED
COUPON_MAX_USES_REACHED
HTTP 400 - Coupon has reached maximum uses.
Rate Limiting
RATE_LIMITED
RATE_LIMITED
HTTP 429 - Too many requests.Solution: Wait a moment before retrying your request.
Handling Errors in Code
Best Practices
Log Error Codes
Always log the
error.code for debugging. It’s more reliable than parsing messages.Handle 429s Gracefully
Implement exponential backoff for rate limits. Check
X-RateLimit-Reset header.Validate Before Sending
Validate inputs client-side to catch errors early and reduce API calls.
Use Idempotency Keys
For payment creation, use idempotency keys to safely retry failed requests.