Skip to Content

Errors

All API errors follow a consistent format:

{ "error": { "type": "invalid_request", "message": "Amount must be greater than 0", "param": "amount", "code": "amount_invalid" } }

Error types

HTTP StatusTypeDescription
400invalid_requestBad or missing parameters
401authentication_errorInvalid or missing API key
404not_foundResource not found (or belongs to different merchant)
429rate_limitToo many requests. See Rate Limits.
500internal_errorServer-side failure. Contact support if persistent.

Error fields

FieldTypeDescription
typestringError category (always present)
messagestringHuman-readable description (always present)
paramstringThe parameter that caused the error (when applicable)
codestringMachine-readable error code (when applicable)

Common errors

Authentication

// Missing or invalid API key { "error": { "type": "authentication_error", "message": "Invalid API key provided" } }

Validation

// Invalid amount { "error": { "type": "invalid_request", "message": "Amount must be greater than 0", "param": "amount", "code": "amount_invalid" } } // Metadata too large { "error": { "type": "invalid_request", "message": "Metadata must be less than 4KB", "param": "metadata", "code": "metadata_too_large" } }

Rate limiting

{ "error": { "type": "rate_limit", "message": "Rate limit exceeded. Retry after 42 seconds." } }

See the X-RateLimit-* response headers for current limits. Details in Rate Limits.


Handling errors

const res = await fetch('https://api.inzilink.com/api/v1/checkouts', { ... }) if (!res.ok) { const { error } = await res.json() switch (error.type) { case 'authentication_error': // Check your API key break case 'invalid_request': // Fix the request parameters console.error(`Invalid param: ${error.param} — ${error.message}`) break case 'rate_limit': // Back off and retry break case 'internal_error': // Retry with exponential backoff break } }