> For the complete documentation index, see [llms.txt](https://pivot-payment.gitbook.io/pivot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pivot-payment.gitbook.io/pivot-docs/api-references/api-lists/account-and-balance/response-code.md).

# Response Code

## Generic API Error

<table><thead><tr><th width="98.58984375" valign="middle">HTTP Method</th><th>Error Type</th><th>Error Code</th><th>Message</th><th>Scenario</th></tr></thead><tbody><tr><td valign="middle">400</td><td>API_ERROR</td><td>api_validation_error</td><td>The request was invalid, or an error occurred in downstream provider</td><td>User hit any endpoints with invalid payload</td></tr><tr><td valign="middle">401</td><td>API_ERROR</td><td>credentials_invalid</td><td>Access token is invalid, please verify that the authentication is provided and valid</td><td>User hit any endpoints but can't authenticate its API Access</td></tr><tr><td valign="middle">403</td><td>API_ERROR</td><td>resource_not_complete</td><td>Please verify that the setup is complete</td><td><p>User hit any endpoints but not set mandatory setup like redirect url, etc</p><p><br></p></td></tr><tr><td valign="middle">403</td><td>API_ERROR</td><td>forbidden_access</td><td>Provided API Key does not have the correct permissions to perform the operation</td><td>User is already authenticated but hit endpoints which out of scope of the authorization</td></tr><tr><td valign="middle">404</td><td>GATEWAY_ERROR</td><td>not_found</td><td>The requested URL does not exist</td><td>User is already authenticated but hit wrong endpoints</td></tr><tr><td valign="middle">404</td><td>GATEWAY_ERROR</td><td>resource_missing</td><td>The $resource with ID $id cannot be found</td><td>User is already authenticated but can't found the resources with specific ID</td></tr><tr><td valign="middle">409</td><td>GATEWAY_ERROR</td><td>duplicate_error</td><td>There's already existing record with the provided details</td><td>User is already authenticated and send payload request which conflicted with existing resource</td></tr><tr><td valign="middle">409</td><td>API_ERROR</td><td>idempotency_error</td><td>The same Idempotency-key was provided with a different payload</td><td>User is already authenticated and send same idempotency key with different payload request, can be different data or different endpoint</td></tr><tr><td valign="middle">429</td><td>API_ERROR</td><td>frequency_above_limit</td><td>The frequency limit of $resource is reached for operation $operation</td><td>User hit same endpoints repeatedly many times in short period</td></tr><tr><td valign="middle">500</td><td>GATEWAY_ERROR</td><td>internal_error</td><td>An internal error was encountered. Please Try again later</td><td>User is hit any endpoints but the pivot's server has encountered a problem</td></tr><tr><td valign="middle">502</td><td>GATEWAY_ERROR</td><td>bad_gateway</td><td>An internal error was encountered. Please Try again later</td><td>User is hit any endpoints but the pivot's server has encountered a problem</td></tr><tr><td valign="middle">503</td><td>GATEWAY_ERROR</td><td>service_unavailable</td><td>An internal error was encountered. Please Try again later</td><td>User is hit any endpoints but the pivot's server has encountered a problem</td></tr><tr><td valign="middle">504</td><td>GATEWAY_ERROR</td><td>gateway_timeout</td><td>An internal error was encountered. Please Try again later</td><td>User is hit any endpoints but the pivot's server has encountered a problem</td></tr></tbody></table>

## Response Code

<table><thead><tr><th width="205.8564453125">Response Code</th><th width="210.1181640625">Response Message</th><th width="344.5478515625">Error Object</th></tr></thead><tbody><tr><td>00</td><td>success</td><td>-</td></tr><tr><td>credentials_invalid</td><td>Access token is invalid</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Request new access token"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>api_validation_error</td><td>The request was invalid, or an error occurred in downstream provider</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "recipientID",
        "message": "Make sure recipientID format is correct"
      },
      {
        "field": "referenceID",
        "message": "Make sure referenceID value is fulfilled"
      }
    ],
    "traceId": "7fadd95da98e59cfad5148382095f2c1"
  }
}
</code></pre></td></tr><tr><td>field_required</td><td>Mandatory Field is Missing</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "{field name}",
        "message": "Make sure {field name} value is fulfilled"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>resource_already_exists</td><td>ID is already exists</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "{field name}",
        "message": "Use unique {field name}"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>invalid_recepient</td><td>Receepient ID is invalid</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Make sure the Recipient ID is correct"
      }
    ],
    "trace_id": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>insufficient_fund</td><td>Insufficient balance for Transfer</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Make sure balance is sufficient for Transfer"
      }
    ],
    "trace_id": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>resend_failed</td><td>Resend Invitation Failed: User Is Invalid</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Cannot resend invitation: the user is invalid or no longer eligible for an invitation"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>resend_failed</td><td>Resend Invitation Failed: User Already Active</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Cannot resend invitation: the user is already active"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>topup_va_failed</td><td>Failed to Generate Virtual Account for Topup</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Failed to generate VA for topup"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>assign_user_failed</td><td>Assign Admin User: Email Already Exist</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Cannot assign admin user: the email is already exists"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr><tr><td>general_error</td><td>General Error</td><td><pre class="language-json"><code class="lang-json">{
  "error": {
    "type": "API_ERROR",
    "details": [
      {
        "field": "",
        "message": "Please contact our representative team"
      }
    ],
    "traceId": "{trace id}"
  }
}
</code></pre></td></tr></tbody></table>
