Skip to main content

Documentation Index

Fetch the complete documentation index at: https://direkt.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Error format

All errors follow this shape:
{
  "error": "ValidationError",
  "message": "amount must be a positive number"
}

Common errors

HTTP CodeerrorFix
400ValidationErrorCheck your request body params
401UnauthorizedCheck your API key
404NotFoundPayment ID doesn’t exist
422UnsupportedChainUse a chain from /api/chains
429RateLimitedBack off and retry after 1 minute
500InternalErrorRetry with exponential backoff

Retry strategy

async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const res = await fetch(url, options);
    if (res.status !== 429 && res.status < 500) return res;
    await new Promise(r => setTimeout(r, 1000 * 2 ** i));
  }
  throw new Error('Max retries exceeded');
}