> 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/payments/response-and-failure-code.md).

# Response & Failure Code

## Generic API Error

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

## Response Code

<table data-full-width="false"><thead><tr><th>Response Code</th><th>Response Message</th><th width="330.4248046875">Error Object</th></tr></thead><tbody><tr><td>00</td><td>Success</td><td>-</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "paymentType 'MULTIPLE' is only allowed when mode is set to 'API'"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "paymentType 'MULTIPLE' is not allowed for this payment method type"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "The requested Virtual Account number is not within your assigned static VA range. Please check your configuration."
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "The Virtual Account number you requested has already been assigned. Please choose a different number."
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "The number of static QRIS you’ve created has reached the allowed limit. Cannot create a new QRIS."
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "QRIS with paymentType = MULTIPLE must not include an amount. Remove the amount value from the request."
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "No available VA number to assign. All dynamic VA numbers in the configured range are in use. Please try again later or adjust your range."
    }
  ],
  "traceId": ""
}
</code></pre></td></tr><tr><td>card_decryption_failed</td><td>Failed to decrypt card information. Please try again later or contact support if the issue persists</td><td><pre class="language-json"><code class="lang-json">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "failed to decrypt card payment"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "invalid threeDsInfo format"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "not allowed to confirm payment session"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "threeDsInfo is required for external 3DS flow"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "3DS authentication was not successful"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "invalid 3DS authentication result"
    }
  ],
  "traceId": ""
}
</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">{
  "type": "API_ERROR",
  "details": [
    {
      "field": "",
      "message": "bankMerchantId is required for external 3DS flow"
    }
  ],
  "traceId": ""
}
</code></pre></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

## Charge Failure

<table><thead><tr><th width="258.53125">Failure Code</th><th width="236.52734375">Failure Message</th><th width="241.51953125">Recommendation</th><th width="220.5390625">Card</th><th>QR</th><th>Virtual Account</th><th>Ewallet</th></tr></thead><tbody><tr><td>DECLINED_BY_CHANNEL</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>The transaction was declined by the channel</p></td><td><p>[[ if CARD ]]</p><p>The cardholder should contact their issuer for clarification. The shopper can try again after resolving the issue with their issuer, or use another payment method.</p><p></p><p>[[ if EWALLET ]]</p><p>The user should contact their EWallet provider for clarification. The shopper can try again after resolving the issue with their issuer, or use another payment method.</p></td><td><p></p><p>IssuerAuthorizationCode</p><ul><li>01</li><li>03</li><li>05</li><li>06</li><li>12</li><li>13</li><li>22</li><li>40</li><li>57</li><li>61</li><li>62</li><li>63</li><li>64</li><li>65</li><li>6P</li><li>70</li><li>82</li><li>92</li><li>93</li><li>100</li><li>109</li><li>110</li><li>115</li></ul></td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>DECLINED_BY_CHANNEL</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The transaction was declined by the issuer due to the card has already expired.</p></td><td><p>[[ if CARD ]]</p><p>The shopper should try again with another valid card or use another payment method.</p></td><td><p></p><p>IssuerAuthorizationCode</p><ul><li>54</li><li>101</li></ul></td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>DECLINED_BY_CHANNEL</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The transaction was declined by the issuer due to the submitted CVV is invalid.</p></td><td><p>[[ if CARD ]]</p><p>The shopper should try again with another valid card or use another payment method.</p></td><td><p></p><p>IssuerAuthorizationCode</p><ul><li>82</li><li>N7</li></ul></td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>INVALID_ACCOUNT</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The transaction was declined by the issuer due to the card being marked as invalid.<br></p><p>[[ if EWALLET ]]</p><p>The transaction was declined by the partner due to the account being marked as invalid.</p></td><td><p>[[ if CARD ]]</p><p>The shopper should try again with another valid card or use another payment method.<br></p><p>[[ if EWALLET ]]</p><p>The shopper should try again with another valid account or use another payment method.</p></td><td><p></p><p>IssuerAuthorizationCode</p><ul><li>14</li><li>15</li><li>21</li><li>46</li><li>52</li><li>53</li><li>78</li><li>79</li><li>111</li></ul></td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>AUTHENTICATION_FAILED</td><td><p>{{paymentSession.paymentMethod.type}} authentication failed. </p><p></p><p>[[ if CARD ]]</p><p>The 3DS attempt was rejected by the issuer.<br></p></td><td><p>[[ if CARD ]]</p><p>The cardholder should contact their issuer for clarification. The shopper can try again after resolving the issue with their issuer, or use another payment method.</p></td><td>authenticationResult.threeDsResult = FAILED</td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>SUSPECTED_FRAUD</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The transaction was declined by the issuer due to the card being marked as stolen or potential fraud.</p></td><td><p>[[ if CARD ]]</p><p>The card was reported as lost, the shopper should be validated for authenticity and be referred to their issuer.</p></td><td><p>IssuerAuthorizationCode</p><ul><li>04</li><li>07</li><li>41</li><li>43</li><li>200</li></ul></td><td>-</td><td>-</td><td>-</td></tr><tr><td>SUSPECTED_FRAUD</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>The transaction was declined by channel due to the account being blocked or suspected as fraud.<br></p></td><td>The channel has declined the transaction due to suspicion of fraud, the shopper should be validated for authenticity and be referred to their issuer.</td><td><p>IssuerAuthorizationCode</p><ul><li>34</li><li>59</li><li>83</li></ul></td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>INSUFFICIENT_FUND</td><td><p>{{paymentSession.paymentMethod.type}} payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The transaction was declined by the issuer due to credit limit or balance is not sufficient.<br></p><p>[[ OTHER ]]</p><p>The transaction was declined due to the balance not sufficient or transaction limit exceeded.</p></td><td><p>[[ if CARD ]]</p><p>Insufficient funds in the cardholder's account. The shopper can try again after adding funds to their bank account, or use another payment method.</p><p></p><p>[[ OTHER ]] </p><p>Insufficient funds in the user’s account. The shopper can try again after adding funds to their account, or use another payment method.</p></td><td><p>IssuerAuthorizationCode</p><ul><li>51</li><li>116</li><li>121</li></ul></td><td>-</td><td>-</td><td>TBD</td></tr><tr><td>CHANNEL_UNAVAILABLE</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The transaction failed due to the issuer being unavailable or having a system malfunction.</p><p></p><p>[[ OTHER ]]</p><p>The transaction failed due to the selected channel being unavailable or having a system malfunction.<br></p></td><td><p>[[ if CARD ]]</p><p>The issuing bank cannot be contacted. The shopper should try again or use another payment method.<br></p><p>[[ OTHER ]]</p><p>The channel cannot be contacted. The shopper should try again or use another payment method.</p></td><td><p>IssuerAuthorizationCode</p><ul><li>19</li><li>80</li><li>90</li><li>91</li><li>91</li><li>96</li><li>911</li></ul></td><td>TBD</td><td>TBD</td><td>TBD</td></tr><tr><td>CANCELLED_BY_USER</td><td><p>{{paymentSession.paymentMethod.type}} <br>payment failed. </p><p></p><p>[[ if CARD ]]</p><p>The 3DS attempt was cancelled by the cardholder.</p><p></p><p>[[ if EWALLET ]]</p><p>Payment cancelled by the user through the apps.</p></td><td>The shopper can try again or use another payment method</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>CHARGE_EXPIRED</td><td><p>{{paymentSession.paymentMethod.type}} </p><p>charge failed due to the transaction time has exceeded the channel expiration time.</p></td><td>The shopper can try again or use another payment method</td><td>3DS authentication expired</td><td>QR expired</td><td>VA number expired</td><td>TBD</td></tr></tbody></table>
