> ## Documentation Index
> Fetch the complete documentation index at: https://neverminedag-feat-use-cases-section.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API error codes

> Catalogue of every BCK.* error code returned by the Nevermined API

Every error response from the Nevermined API carries a stable `code` (e.g. `BCK.X402.0008`). The table below enumerates every code, its HTTP status, category, canonical message, and remediation hint. Pages on this site are anchored by code — link directly to `#bck-x402-0008` from your error handlers, runbooks, or support tickets.

<Note>Locked response fields are `code`, `message`, and the HTTP status. Optional fields (`hint`, `docsUrl`, `category`, `retryable`, `correlationId`) appear only when supplied. Consumers that branch only on `code` and `message` ignore the rest transparently.</Note>

## Namespaces

* [`BCK.AGENT`](#bck-agent) — 11 codes
* [`BCK.APIKEY`](#bck-apikey) — 12 codes
* [`BCK.AUTH`](#bck-auth) — 9 codes
* [`BCK.BRAINTREE`](#bck-braintree) — 9 codes
* [`BCK.COMMON`](#bck-common) — 29 codes
* [`BCK.CREDITS`](#bck-credits) — 6 codes
* [`BCK.DELEGATION`](#bck-delegation) — 2 codes
* [`BCK.GUEST`](#bck-guest) — 2 codes
* [`BCK.LEGAL_DOCS`](#bck-legal_docs) — 6 codes
* [`BCK.METRIC`](#bck-metric) — 5 codes
* [`BCK.NOTIF`](#bck-notif) — 9 codes
* [`BCK.OAUTH`](#bck-oauth) — 6 codes
* [`BCK.OBSERVABILITY`](#bck-observability) — 5 codes
* [`BCK.ORGANIZATIONS`](#bck-organizations) — 15 codes
* [`BCK.PAYPAL`](#bck-paypal) — 1 code
* [`BCK.PLANS`](#bck-plans) — 1 code
* [`BCK.POINT`](#bck-point) — 19 codes
* [`BCK.PROTOCOL`](#bck-protocol) — 47 codes
* [`BCK.STRIPE`](#bck-stripe) — 32 codes
* [`BCK.STRIPE.CONNECT`](#bck-stripe-connect) — 5 codes
* [`BCK.TRANSCODING`](#bck-transcoding) — 1 code
* [`BCK.TXS`](#bck-txs) — 10 codes
* [`BCK.USER_PROFILE`](#bck-user_profile) — 2 codes
* [`BCK.VISA`](#bck-visa) — 18 codes
* [`BCK.WIDGET`](#bck-widget) — 5 codes
* [`BCK.WIDGET_KEYS`](#bck-widget_keys) — 2 codes
* [`BCK.WIDGET_SESSION`](#bck-widget_session) — 12 codes
* [`BCK.X402`](#bck-x402) — 17 codes

<h2 id="bck-agent">
  `BCK.AGENT`
</h2>

| Code                                      | HTTP | Category | Retryable | Message                                                                      | Hint                                                                                                                                                        |
| ----------------------------------------- | ---- | -------- | --------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-agent-0001" />`BCK.AGENT.0001` | 400  | business | —         | Invalid Agent Execution Status                                               |                                                                                                                                                             |
| <a id="bck-agent-0002" />`BCK.AGENT.0002` | 500  | business | —         | Error updating step agent                                                    |                                                                                                                                                             |
| <a id="bck-agent-0003" />`BCK.AGENT.0003` | 403  | business | —         | Unable to create task for agent                                              |                                                                                                                                                             |
| <a id="bck-agent-0004" />`BCK.AGENT.0004` | 403  | business | —         | Invalid user                                                                 |                                                                                                                                                             |
| <a id="bck-agent-0005" />`BCK.AGENT.0005` | 403  | business | —         | Unable to get task for did, task and user                                    |                                                                                                                                                             |
| <a id="bck-agent-0006" />`BCK.AGENT.0006` | 403  | business | —         | Unable to find tasks by subscriber                                           |                                                                                                                                                             |
| <a id="bck-agent-0007" />`BCK.AGENT.0007` | 404  | business | —         | Connection not found for clientId                                            |                                                                                                                                                             |
| <a id="bck-agent-0008" />`BCK.AGENT.0008` | 500  | business | —         | Error registering websocket connection                                       |                                                                                                                                                             |
| <a id="bck-agent-0009" />`BCK.AGENT.0009` | 403  | business | —         | Error creating steps for agent                                               |                                                                                                                                                             |
| <a id="bck-agent-0010" />`BCK.AGENT.0010` | 403  | business | —         | Task not found or completed                                                  |                                                                                                                                                             |
| <a id="bck-agent-0011" />`BCK.AGENT.0011` | 500  | internal | ❌         | Agent lookup failed: agent with the given entryId not found in service layer | The service-layer findOneById returned null. The original behaviour was a generic 500; consumer code that needs 404 semantics should use BCK.PROTOCOL.0004. |

<h2 id="bck-apikey">
  `BCK.APIKEY`
</h2>

| Code                                        | HTTP | Category | Retryable | Message                                               | Hint |
| ------------------------------------------- | ---- | -------- | --------- | ----------------------------------------------------- | ---- |
| <a id="bck-apikey-0001" />`BCK.APIKEY.0001` | 403  | auth     | —         | API Key not registered, you need to register it first |      |
| <a id="bck-apikey-0002" />`BCK.APIKEY.0002` | 404  | auth     | —         | API Key with given hash not found                     |      |
| <a id="bck-apikey-0003" />`BCK.APIKEY.0003` | 401  | auth     | —         | Unable to revoke API Key                              |      |
| <a id="bck-apikey-0004" />`BCK.APIKEY.0004` | 401  | auth     | —         | Invalid Nevermined API Key                            |      |
| <a id="bck-apikey-0006" />`BCK.APIKEY.0006` | 401  | auth     | —         | Invalid Nevermined Key Metadata                       |      |
| <a id="bck-apikey-0007" />`BCK.APIKEY.0007` | 401  | auth     | —         | API Key issuer does not match user address            |      |
| <a id="bck-apikey-0008" />`BCK.APIKEY.0008` | 403  | auth     | —         | API Key with hash already exists                      |      |
| <a id="bck-apikey-0009" />`BCK.APIKEY.0009` | 500  | auth     | —         | Error search API Key trannsactions                    |      |
| <a id="bck-apikey-0010" />`BCK.APIKEY.0010` | 401  | auth     | —         | Expiration date must be in the future                 |      |
| <a id="bck-apikey-0011" />`BCK.APIKEY.0011` | 500  | auth     | —         | Error searching user API Keys                         |      |
| <a id="bck-apikey-0012" />`BCK.APIKEY.0012` | 401  | auth     | —         | Unable to generate assertion                          |      |
| <a id="bck-apikey-0013" />`BCK.APIKEY.0013` | 401  | auth     | —         | Malformed API Key payload                             |      |

<h2 id="bck-auth">
  `BCK.AUTH`
</h2>

| Code                                    | HTTP | Category | Retryable | Message                                                                     | Hint                                                                                                                                                                       |
| --------------------------------------- | ---- | -------- | --------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-auth-0001" />`BCK.AUTH.0001` | 500  | auth     | —         | Error registering API Key                                                   |                                                                                                                                                                            |
| <a id="bck-auth-0002" />`BCK.AUTH.0002` | 401  | auth     | —         | Authentication required: credentials are missing, expired or invalid        |                                                                                                                                                                            |
| <a id="bck-auth-0003" />`BCK.AUTH.0003` | 403  | auth     | —         | Forbidden: caller is not the owner of this resource and lacks an admin role |                                                                                                                                                                            |
| <a id="bck-auth-0004" />`BCK.AUTH.0004` | 403  | auth     | ❌         | Organisation admin privileges required                                      | The caller is not an active admin of the target organisation. Prefer the more specific siblings (BCK.AUTH.0005-0009) at new throw sites; this code remains as a catch-all. |
| <a id="bck-auth-0005" />`BCK.AUTH.0005` | 403  | auth     | ✅         | Unable to verify organisation membership                                    | The membership lookup itself failed (e.g. transient DB error). Check the cause field on the server log; retry once.                                                        |
| <a id="bck-auth-0006" />`BCK.AUTH.0006` | 403  | auth     | ❌         | Caller does not belong to any organisation                                  | Add the user as a member of the target organisation before calling admin-scoped endpoints.                                                                                 |
| <a id="bck-auth-0007" />`BCK.AUTH.0007` | 403  | auth     | ❌         | Caller does not have administrator privileges                               | The caller is a member but not an admin. Promote the role via the organisation admin UI / API, or call from an admin account.                                              |
| <a id="bck-auth-0008" />`BCK.AUTH.0008` | 403  | auth     | ❌         | Caller account is not active                                                | The user is suspended/disabled. Reactivate via the admin UI before retrying.                                                                                               |
| <a id="bck-auth-0009" />`BCK.AUTH.0009` | 403  | auth     | ❌         | Target organisation is not active                                           | The org has been deactivated (subscription lapsed, manual disable, etc.). Reactivate before performing admin operations.                                                   |

<h2 id="bck-braintree">
  `BCK.BRAINTREE`
</h2>

| Code                                              | HTTP | Category    | Retryable | Message                                                                                                                                                                                          | Hint |
| ------------------------------------------------- | ---- | ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- |
| <a id="bck-braintree-0001" />`BCK.BRAINTREE.0001` | 500  | integration | —         | Braintree platform gateway is not configured                                                                                                                                                     |      |
| <a id="bck-braintree-0002" />`BCK.BRAINTREE.0002` | 400  | integration | —         | Braintree charge failed                                                                                                                                                                          |      |
| <a id="bck-braintree-0003" />`BCK.BRAINTREE.0003` | 502  | integration | —         | Braintree OAuth token refresh failed                                                                                                                                                             |      |
| <a id="bck-braintree-0004" />`BCK.BRAINTREE.0004` | 400  | integration | —         | Plan owner has not connected a Braintree merchant account                                                                                                                                        |      |
| <a id="bck-braintree-0005" />`BCK.BRAINTREE.0005` | 400  | integration | —         | Plan is not a fiat plan — cannot be purchased via Braintree                                                                                                                                      |      |
| <a id="bck-braintree-0006" />`BCK.BRAINTREE.0006` | 409  | integration | —         | Plan owner has no Braintree merchant account connected                                                                                                                                           |      |
| <a id="bck-braintree-0007" />`BCK.BRAINTREE.0007` | 400  | integration | —         | Plan owner's Braintree account does not have a merchant account in the plan's currency                                                                                                           |      |
| <a id="bck-braintree-0008" />`BCK.BRAINTREE.0008` | 400  | integration | —         | Cannot create a Braintree plan in this currency: your Braintree account has no merchant account in that currency. Add one in your Braintree dashboard, then disconnect and reconnect to refresh. |      |
| <a id="bck-braintree-0009" />`BCK.BRAINTREE.0009` | 400  | integration | —         | Plan metadata is missing currency. Plans must specify a currency to be settled via Braintree.                                                                                                    |      |

<h2 id="bck-common">
  `BCK.COMMON`
</h2>

| Code                                        | HTTP | Category    | Retryable | Message                                                                  | Hint                                                                                                                                  |
| ------------------------------------------- | ---- | ----------- | --------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-common-0001" />`BCK.COMMON.0001` | 500  | internal    | —         | Unable to initialize Nevermined instance                                 |                                                                                                                                       |
| <a id="bck-common-0002" />`BCK.COMMON.0002` | 500  | internal    | —         | Unable to generate session key                                           |                                                                                                                                       |
| <a id="bck-common-0003" />`BCK.COMMON.0003` | 500  | internal    | —         | Unable to retrieve fees information from Nevermined                      |                                                                                                                                       |
| <a id="bck-common-0004" />`BCK.COMMON.0004` | 500  | internal    | —         | Unable to calculate Asset Price                                          |                                                                                                                                       |
| <a id="bck-common-0005" />`BCK.COMMON.0005` | 500  | internal    | —         | Unable to load NFT Contract                                              |                                                                                                                                       |
| <a id="bck-common-0006" />`BCK.COMMON.0006` | 500  | internal    | —         | Unable to register Credits Plan on Nevermined                            |                                                                                                                                       |
| <a id="bck-common-0007" />`BCK.COMMON.0007` | 500  | internal    | —         | Unable to register Time Plan on Nevermined                               |                                                                                                                                       |
| <a id="bck-common-0008" />`BCK.COMMON.0008` | 500  | internal    | —         | Unable to register Points event in the database                          |                                                                                                                                       |
| <a id="bck-common-0009" />`BCK.COMMON.0009` | 500  | internal    | —         | Unable to register API Key usage in the database                         |                                                                                                                                       |
| <a id="bck-common-0010" />`BCK.COMMON.0010` | 500  | internal    | —         | Unable to register AI Agent                                              |                                                                                                                                       |
| <a id="bck-common-0011" />`BCK.COMMON.0011` | 500  | internal    | —         | Unable to register File asset                                            |                                                                                                                                       |
| <a id="bck-common-0012" />`BCK.COMMON.0012` | 500  | internal    | —         | Unable to generate access token to AI Agent                              |                                                                                                                                       |
| <a id="bck-common-0013" />`BCK.COMMON.0013` | 404  | internal    | —         | Unable to resolve DDO from DID                                           |                                                                                                                                       |
| <a id="bck-common-0014" />`BCK.COMMON.0014` | 404  | internal    | —         | Plan not found                                                           |                                                                                                                                       |
| <a id="bck-common-0015" />`BCK.COMMON.0015` | 500  | internal    | —         | Unable to get the Plan balance                                           |                                                                                                                                       |
| <a id="bck-common-0016" />`BCK.COMMON.0016` | 500  | internal    | —         | Unable to order the subscription                                         |                                                                                                                                       |
| <a id="bck-common-0017" />`BCK.COMMON.0017` | 500  | internal    | —         | There are no files associated to the file asset                          |                                                                                                                                       |
| <a id="bck-common-0018" />`BCK.COMMON.0018` | 500  | internal    | —         | An error happened while downloading the asset files                      |                                                                                                                                       |
| <a id="bck-common-0019" />`BCK.COMMON.0019` | 500  | internal    | —         | An error happened while trying to mint credits                           |                                                                                                                                       |
| <a id="bck-common-0020" />`BCK.COMMON.0020` | 500  | internal    | —         | An error happened while trying to burn credits                           |                                                                                                                                       |
| <a id="bck-common-0021" />`BCK.COMMON.0021` | 404  | internal    | —         | Unable to resolve widget metadata from DID                               |                                                                                                                                       |
| <a id="bck-common-0022" />`BCK.COMMON.0022` | 403  | internal    | —         | Method not supported                                                     |                                                                                                                                       |
| <a id="bck-common-0023" />`BCK.COMMON.0023` | 403  | internal    | —         | Error parsing input                                                      |                                                                                                                                       |
| <a id="bck-common-0024" />`BCK.COMMON.0024` | 401  | internal    | —         | Could not validate the login claim                                       |                                                                                                                                       |
| <a id="bck-common-0025" />`BCK.COMMON.0025` | 400  | internal    | —         | Invalid UUID format in request                                           |                                                                                                                                       |
| <a id="bck-common-0026" />`BCK.COMMON.0026` | 400  | validation  | —         | Invalid uint256 identifier (must be a decimal string in \[0, 2^256 - 1]) |                                                                                                                                       |
| <a id="bck-common-0027" />`BCK.COMMON.0027` | 409  | business    | ❌         | Resource already exists (database unique constraint violated)            | A record with the same unique key already exists. Either update the existing record or use a different identifier.                    |
| <a id="bck-common-0028" />`BCK.COMMON.0028` | 409  | business    | ❌         | Referenced resource does not exist (foreign key violation)               | The request references an entity (plan, agent, user, organisation) that does not exist or has been deleted. Verify the referenced ID. |
| <a id="bck-common-0029" />`BCK.COMMON.0029` | 503  | integration | ✅         | Database temporarily unavailable                                         | The database is being restarted or is under maintenance. Retry the request after a short backoff.                                     |

<h2 id="bck-credits">
  `BCK.CREDITS`
</h2>

| Code                                          | HTTP | Category | Retryable | Message                                                                        | Hint                                                                                                                                                                                     |
| --------------------------------------------- | ---- | -------- | --------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-credits-0001" />`BCK.CREDITS.0001` | 400  | business | —         | Mint amount must be positive                                                   |                                                                                                                                                                                          |
| <a id="bck-credits-0002" />`BCK.CREDITS.0002` | 400  | business | —         | Burn amount must be positive                                                   |                                                                                                                                                                                          |
| <a id="bck-credits-0003" />`BCK.CREDITS.0003` | 402  | business | —         | Insufficient credits for plan                                                  |                                                                                                                                                                                          |
| <a id="bck-credits-0004" />`BCK.CREDITS.0004` | 400  | business | —         | Refund amount must be positive                                                 |                                                                                                                                                                                          |
| <a id="bck-credits-0005" />`BCK.CREDITS.0005` | 500  | business | —         | Credit lots do not satisfy the burned amount — FIFO invariant violated         |                                                                                                                                                                                          |
| <a id="bck-credits-0006" />`BCK.CREDITS.0006` | 500  | internal | ❌         | Cannot enqueue on-chain order mirror without a corresponding minted credit lot | enqueueFiatOrderMirror must be called after a successful creditsService.mint with the same sourceTx. This usually indicates an out-of-order call by a service, not a runtime data issue. |

<h2 id="bck-delegation">
  `BCK.DELEGATION`
</h2>

| Code                                                | HTTP | Category | Retryable | Message                  | Hint                                                                                      |
| --------------------------------------------------- | ---- | -------- | --------- | ------------------------ | ----------------------------------------------------------------------------------------- |
| <a id="bck-delegation-0001" />`BCK.DELEGATION.0001` | 404  | business | ❌         | Payment method not found | Verify the paymentMethodId. The payment method may have been removed or never existed.    |
| <a id="bck-delegation-0002" />`BCK.DELEGATION.0002` | 404  | business | ❌         | Delegation not found     | Verify the delegationId. The delegation may have been revoked, expired, or never existed. |

<h2 id="bck-guest">
  `BCK.GUEST`
</h2>

| Code                                      | HTTP | Category   | Retryable | Message                           | Hint                                                                                   |
| ----------------------------------------- | ---- | ---------- | --------- | --------------------------------- | -------------------------------------------------------------------------------------- |
| <a id="bck-guest-0001" />`BCK.GUEST.0001` | 400  | validation | ❌         | Invalid guest account request     | Check the request body — guest provisioning requires either fingerprint or externalId. |
| <a id="bck-guest-0002" />`BCK.GUEST.0002` | 500  | business   | —         | Failed to provision guest account |                                                                                        |

<h2 id="bck-legal_docs">
  `BCK.LEGAL_DOCS`
</h2>

| Code                                                | HTTP | Category | Retryable | Message                                                               | Hint |
| --------------------------------------------------- | ---- | -------- | --------- | --------------------------------------------------------------------- | ---- |
| <a id="bck-legal_docs-0001" />`BCK.LEGAL_DOCS.0001` | 404  | business | —         | Unknown legal document                                                |      |
| <a id="bck-legal_docs-0002" />`BCK.LEGAL_DOCS.0002` | 404  | business | —         | Unknown legal document version                                        |      |
| <a id="bck-legal_docs-0003" />`BCK.LEGAL_DOCS.0003` | 422  | business | —         | Submitted legal document version is not the current effective version |      |
| <a id="bck-legal_docs-0004" />`BCK.LEGAL_DOCS.0004` | 412  | business | —         | Legal consent is required for the current document versions           |      |
| <a id="bck-legal_docs-0005" />`BCK.LEGAL_DOCS.0005` | 401  | business | —         | Authenticated request without a resolvable user identity              |      |
| <a id="bck-legal_docs-0006" />`BCK.LEGAL_DOCS.0006` | 400  | business | —         | No wallet linked to the authenticated Privy account                   |      |

<h2 id="bck-metric">
  `BCK.METRIC`
</h2>

| Code                                        | HTTP | Category    | Retryable | Message                                     | Hint |
| ------------------------------------------- | ---- | ----------- | --------- | ------------------------------------------- | ---- |
| <a id="bck-metric-0001" />`BCK.METRIC.0001` | 500  | integration | —         | Error registering asset access              |      |
| <a id="bck-metric-0002" />`BCK.METRIC.0002` | 404  | integration | —         | Error search asset metrics                  |      |
| <a id="bck-metric-0003" />`BCK.METRIC.0003` | 404  | integration | —         | Error getting info from metrics service for |      |
| <a id="bck-metric-0004" />`BCK.METRIC.0004` | 500  | integration | —         | Error getting balance for account           |      |
| <a id="bck-metric-0005" />`BCK.METRIC.0005` | 500  | integration | —         | Error getting total hits for account        |      |

<h2 id="bck-notif">
  `BCK.NOTIF`
</h2>

| Code                                      | HTTP | Category    | Retryable | Message                                                | Hint |
| ----------------------------------------- | ---- | ----------- | --------- | ------------------------------------------------------ | ---- |
| <a id="bck-notif-0001" />`BCK.NOTIF.0001` | 404  | integration | —         | Unable to find notification by id                      |      |
| <a id="bck-notif-0002" />`BCK.NOTIF.0002` | 404  | integration | —         | Error searching for notifications                      |      |
| <a id="bck-notif-0003" />`BCK.NOTIF.0003` | 500  | integration | —         | Error updating notification                            |      |
| <a id="bck-notif-0004" />`BCK.NOTIF.0004` | 500  | integration | —         | Error updating notification read status                |      |
| <a id="bck-notif-0005" />`BCK.NOTIF.0005` | 500  | integration | —         | Error deleting notification                            |      |
| <a id="bck-notif-0006" />`BCK.NOTIF.0006` | 404  | integration | —         | Error searching for notifications filtered by receiver |      |
| <a id="bck-notif-0007" />`BCK.NOTIF.0007` | 500  | integration | —         | Resend API Key or Email Sender not set                 |      |
| <a id="bck-notif-0008" />`BCK.NOTIF.0008` | 500  | integration | —         | Error sending email notification                       |      |
| <a id="bck-notif-0009" />`BCK.NOTIF.0009` | 401  | integration | —         | The user doesnt own this notification                  |      |

<h2 id="bck-oauth">
  `BCK.OAUTH`
</h2>

| Code                                      | HTTP | Category | Retryable | Message                                                        | Hint                                                                                                                                                                                              |
| ----------------------------------------- | ---- | -------- | --------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-oauth-0001" />`BCK.OAUTH.0001` | 404  | auth     | ❌         | OAuth resource not found                                       | Verify the agentId or client identifier in the OAuth request.                                                                                                                                     |
| <a id="bck-oauth-0002" />`BCK.OAUTH.0002` | 400  | auth     | ❌         | Invalid OAuth request                                          | Check the request parameters — typically the redirect\_uri, scope, or grant\_type does not match the registered client. Prefer the more specific BCK.OAUTH.0003-0006 siblings at new throw sites. |
| <a id="bck-oauth-0003" />`BCK.OAUTH.0003` | 400  | business | ❌         | No payment plans available for agent                           | The target agent has no published plans the caller can purchase. Publish a plan first, or pass an explicit plan\_id that the caller already owns.                                                 |
| <a id="bck-oauth-0004" />`BCK.OAUTH.0004` | 400  | auth     | ❌         | Invalid or expired authorization code                          | Authorization codes are single-use and short-lived. Restart the flow from /authorize to obtain a fresh code, and ensure the code\_verifier matches the original PKCE code\_challenge.             |
| <a id="bck-oauth-0005" />`BCK.OAUTH.0005` | 400  | auth     | ❌         | Resource mismatch between token request and authorization code | The `resource` parameter on /token does not match the value bound to the authorization code. Resend with the same `resource` you used on /authorize.                                              |
| <a id="bck-oauth-0006" />`BCK.OAUTH.0006` | 400  | auth     | ❌         | User profile not found for the authorization code              | The user bound to the authorization code no longer exists in our DB (deleted profile, or environment mismatch). Restart the flow with a valid signed-in user.                                     |

<h2 id="bck-observability">
  `BCK.OBSERVABILITY`
</h2>

| Code                                                      | HTTP | Category    | Retryable | Message                                         | Hint |
| --------------------------------------------------------- | ---- | ----------- | --------- | ----------------------------------------------- | ---- |
| <a id="bck-observability-0001" />`BCK.OBSERVABILITY.0001` | 500  | integration | —         | Error fetching observability data from Helicone |      |
| <a id="bck-observability-0002" />`BCK.OBSERVABILITY.0002` | 400  | integration | —         | Invalid response from Helicone API              |      |
| <a id="bck-observability-0003" />`BCK.OBSERVABILITY.0003` | 401  | integration | —         | Unauthorized access to Helicone API             |      |
| <a id="bck-observability-0004" />`BCK.OBSERVABILITY.0004` | 429  | integration | —         | Rate limit exceeded for Helicone API            |      |
| <a id="bck-observability-0005" />`BCK.OBSERVABILITY.0005` | 502  | integration | —         | Helicone API service unavailable                |      |

<h2 id="bck-organizations">
  `BCK.ORGANIZATIONS`
</h2>

| Code                                                      | HTTP | Category    | Retryable | Message                                         | Hint                                                                                                                                                                                                                                                                                      |
| --------------------------------------------------------- | ---- | ----------- | --------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-organizations-0001" />`BCK.ORGANIZATIONS.0001` | 500  | business    | —         | Error creating organization member              |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0002" />`BCK.ORGANIZATIONS.0002` | 500  | business    | —         | Error getting organization members              |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0003" />`BCK.ORGANIZATIONS.0003` | 500  | business    | —         | Error saving organization branding              |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0004" />`BCK.ORGANIZATIONS.0004` | 500  | business    | —         | Error updating organization                     |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0005" />`BCK.ORGANIZATIONS.0005` | 500  | business    | —         | Error creating organization                     |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0006" />`BCK.ORGANIZATIONS.0006` | 500  | business    | —         | Error creating organization with first admin    | The two-step bootstrap (create org + add first admin) failed. Check the underlying error in logs; the org may have been created without the admin link.                                                                                                                                   |
| <a id="bck-organizations-0007" />`BCK.ORGANIZATIONS.0007` | 500  | auth        | —         | Login failed for organization                   |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0008" />`BCK.ORGANIZATIONS.0008` | 403  | business    | ❌         | User is already a member of the organization    | The membership already exists. Read the membership instead of recreating it, or change the role via the update endpoint.                                                                                                                                                                  |
| <a id="bck-organizations-0009" />`BCK.ORGANIZATIONS.0009` | 403  | business    | ❌         | User is not a member of the organization        | Add the user as a member before performing membership-scoped operations.                                                                                                                                                                                                                  |
| <a id="bck-organizations-0010" />`BCK.ORGANIZATIONS.0010` | 500  | business    | —         | Failed to update organization member            |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0011" />`BCK.ORGANIZATIONS.0011` | 404  | business    | ❌         | Organization not found                          | Verify the orgId. Soft-deleted organizations also surface as not-found.                                                                                                                                                                                                                   |
| <a id="bck-organizations-0012" />`BCK.ORGANIZATIONS.0012` | 500  | business    | —         | Failed to deactivate organization               |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0013" />`BCK.ORGANIZATIONS.0013` | 500  | business    | —         | Failed to retrieve updated organization         |                                                                                                                                                                                                                                                                                           |
| <a id="bck-organizations-0014" />`BCK.ORGANIZATIONS.0014` | 403  | business    | ❌         | User already belongs to another organization    | A user can only belong to one organization at a time. Remove the user from the current organization before adding them to a new one.                                                                                                                                                      |
| <a id="bck-organizations-0015" />`BCK.ORGANIZATIONS.0015` | 500  | integration | ✅         | Failed to look up organization (database error) | Repository.findOne returned a driver/connection error rather than null. Inspect the cause field on the server log; if the database is up, this is likely a query timeout or connection-pool exhaustion. Distinct from BCK.ORGANIZATIONS.0011, which signals a confirmed not-found result. |

<h2 id="bck-paypal">
  `BCK.PAYPAL`
</h2>

| Code                                        | HTTP | Category    | Retryable | Message                                           | Hint |
| ------------------------------------------- | ---- | ----------- | --------- | ------------------------------------------------- | ---- |
| <a id="bck-paypal-0001" />`BCK.PAYPAL.0001` | 500  | integration | —         | Unexpected error during PayPal/Braintree checkout |      |

<h2 id="bck-plans">
  `BCK.PLANS`
</h2>

| Code                                      | HTTP | Category | Retryable | Message                                                                    | Hint                                                                                                                                                    |
| ----------------------------------------- | ---- | -------- | --------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-plans-0001" />`BCK.PLANS.0001` | 500  | internal | ❌         | Plan lookup failed: plan with the given entryId not found in service layer | The service-layer findOneById returned null. Original behaviour was a generic 500; consumer code that needs 404 semantics should use BCK.PROTOCOL.0003. |

<h2 id="bck-point">
  `BCK.POINT`
</h2>

| Code                                      | HTTP | Category | Retryable | Message                                                   | Hint                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------------------------------- | ---- | -------- | --------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-point-0001" />`BCK.POINT.0001` | 401  | business | —         | User with address is not allowed to access                |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0002" />`BCK.POINT.0002` | 404  | business | —         | User with id not found                                    |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0003" />`BCK.POINT.0003` | 404  | business | —         | Unable to search user points                              |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0004" />`BCK.POINT.0004` | 404  | business | —         | Unable to search event points                             |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0005" />`BCK.POINT.0005` | 404  | business | —         | Unable to find user points aggregated                     |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0006" />`BCK.POINT.0006` | 404  | business | —         | Points rule not found                                     |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0007" />`BCK.POINT.0007` | 403  | business | ❌         | Points rule recurrency exhausted for user                 | The rule allows only one (or N) accruals per user; the cap has been reached.                                                                                                                                                                                                                                                                                                        |
| <a id="bck-point-0008" />`BCK.POINT.0008` | 500  | internal | —         | Points rule recurrency type not implemented               |                                                                                                                                                                                                                                                                                                                                                                                     |
| <a id="bck-point-0009" />`BCK.POINT.0009` | 500  | internal | ❌         | No points rule matches the supplied price/role            | The price/role tiers in points.rules.ts are exhaustive for non-negative inputs; reaching this code typically means a negative or otherwise unexpected price was supplied. The status is 500 to preserve the original "throw new Error" behaviour from before #1538; a follow-up (tracked in the Wave-B issue) will demote this to 400 and add input validation at the API boundary. |
| <a id="bck-point-0010" />`BCK.POINT.0010` | 403  | business | ❌         | Unsupported points cap recurrency type                    | The rule references a cap recurrency variant that the engine does not recognise. Update the rule to one of capday/capweek/capmonth.                                                                                                                                                                                                                                                 |
| <a id="bck-point-0011" />`BCK.POINT.0011` | 403  | business | ❌         | Points rule (onlyonce) already accrued by this user       | The rule allows exactly one accrual per user and the user already received their share. No retry will succeed.                                                                                                                                                                                                                                                                      |
| <a id="bck-point-0012" />`BCK.POINT.0012` | 403  | business | ❌         | Points rule (timeslimitted) per-user lifetime cap reached | The rule allows at most rule.cap accruals per (user, rule); the user has reached that ceiling and the cap does not reset. Note: the throw-site `details` line may mention an item reference for historical reasons — the check is per-user, not per-item. Per-item semantics live in BCK.POINT.0013 (onceperitem).                                                                  |
| <a id="bck-point-0013" />`BCK.POINT.0013` | 403  | business | ❌         | Points rule (onceperitem) already accrued for this item   | The user already received points for this specific item/reference. Try a different item.                                                                                                                                                                                                                                                                                            |
| <a id="bck-point-0014" />`BCK.POINT.0014` | 403  | business | ❌         | Points rule (capday/week/month) time-window cap exhausted | The user reached the cap for this rule within the current time window (day/week/month). Wait for the window to roll over.                                                                                                                                                                                                                                                           |
| <a id="bck-point-0015" />`BCK.POINT.0015` | 500  | internal | ❌         | No subscription-price points rule for the supplied price  | getRuleIdBySubscriptionPrice() saw a price the tier table does not cover — typically a negative value. Add input validation at the API boundary.                                                                                                                                                                                                                                    |
| <a id="bck-point-0016" />`BCK.POINT.0016` | 500  | internal | ❌         | No crypto-seller points rule for the supplied price       | getRuleIdByCryptoSellerPrice() saw a price the tier table does not cover.                                                                                                                                                                                                                                                                                                           |
| <a id="bck-point-0017" />`BCK.POINT.0017` | 500  | internal | ❌         | No crypto-buyer points rule for the supplied price        | getRuleIdByCryptoBuyerPrice() saw a price the tier table does not cover.                                                                                                                                                                                                                                                                                                            |
| <a id="bck-point-0018" />`BCK.POINT.0018` | 500  | internal | ❌         | No fiat-seller points rule for the supplied price         | getRuleIdByFiatSellerPrice() saw a price the tier table does not cover.                                                                                                                                                                                                                                                                                                             |
| <a id="bck-point-0019" />`BCK.POINT.0019` | 500  | internal | ❌         | No fiat-buyer points rule for the supplied price          | getRuleIdByFiatBuyerPrice() saw a price the tier table does not cover.                                                                                                                                                                                                                                                                                                              |

<h2 id="bck-protocol">
  `BCK.PROTOCOL`
</h2>

| Code                                            | HTTP | Category    | Retryable | Message                                                                                                               | Hint |
| ----------------------------------------------- | ---- | ----------- | --------- | --------------------------------------------------------------------------------------------------------------------- | ---- |
| <a id="bck-protocol-0001" />`BCK.PROTOCOL.0001` | 500  | integration | —         | Unable to register payment plan                                                                                       |      |
| <a id="bck-protocol-0002" />`BCK.PROTOCOL.0002` | 500  | integration | —         | Unable to register agent                                                                                              |      |
| <a id="bck-protocol-0003" />`BCK.PROTOCOL.0003` | 404  | integration | —         | Unable to get payment plan by planId                                                                                  |      |
| <a id="bck-protocol-0004" />`BCK.PROTOCOL.0004` | 404  | integration | —         | Unable to get agent by agentId                                                                                        |      |
| <a id="bck-protocol-0005" />`BCK.PROTOCOL.0005` | 500  | integration | —         | Error ordering plan                                                                                                   |      |
| <a id="bck-protocol-0006" />`BCK.PROTOCOL.0006` | 500  | integration | —         | Error getting balance of plan                                                                                         |      |
| <a id="bck-protocol-0007" />`BCK.PROTOCOL.0007` | 500  | integration | —         | Error minting plan                                                                                                    |      |
| <a id="bck-protocol-0008" />`BCK.PROTOCOL.0008` | 500  | integration | —         | Error deleting plan from agent                                                                                        |      |
| <a id="bck-protocol-0009" />`BCK.PROTOCOL.0009` | 500  | integration | —         | Error adding plan to agent                                                                                            |      |
| <a id="bck-protocol-0010" />`BCK.PROTOCOL.0010` | 403  | integration | —         | Invalid credits type                                                                                                  |      |
| <a id="bck-protocol-0011" />`BCK.PROTOCOL.0011` | 403  | integration | —         | Insufficient balance                                                                                                  |      |
| <a id="bck-protocol-0012" />`BCK.PROTOCOL.0012` | 500  | integration | —         | Error updating agent                                                                                                  |      |
| <a id="bck-protocol-0013" />`BCK.PROTOCOL.0013` | 500  | integration | —         | Error updating plan                                                                                                   |      |
| <a id="bck-protocol-0014" />`BCK.PROTOCOL.0014` | 500  | integration | —         | Error de-activating agent                                                                                             |      |
| <a id="bck-protocol-0015" />`BCK.PROTOCOL.0015` | 500  | integration | —         | Error de-activating plan                                                                                              |      |
| <a id="bck-protocol-0016" />`BCK.PROTOCOL.0016` | 401  | integration | —         | The user doesnt own this agent                                                                                        |      |
| <a id="bck-protocol-0017" />`BCK.PROTOCOL.0017` | 401  | integration | —         | The user doesnt own this plan                                                                                         |      |
| <a id="bck-protocol-0018" />`BCK.PROTOCOL.0018` | 200  | integration | —         | The agent is already in the desired state                                                                             |      |
| <a id="bck-protocol-0019" />`BCK.PROTOCOL.0019` | 200  | integration | —         | The plan is already in the desired state                                                                              |      |
| <a id="bck-protocol-0020" />`BCK.PROTOCOL.0020` | 500  | integration | —         | Error redeming credits                                                                                                |      |
| <a id="bck-protocol-0021" />`BCK.PROTOCOL.0021` | 500  | integration | —         | Error getting user plans                                                                                              |      |
| <a id="bck-protocol-0022" />`BCK.PROTOCOL.0022` | 404  | integration | —         | Error getting user agents                                                                                             |      |
| <a id="bck-protocol-0023" />`BCK.PROTOCOL.0023` | 404  | integration | —         | Error getting plan associated to agent. Agent not found                                                               |      |
| <a id="bck-protocol-0024" />`BCK.PROTOCOL.0024` | 404  | integration | —         | Error getting agent associated to plan. Plan not found                                                                |      |
| <a id="bck-protocol-0025" />`BCK.PROTOCOL.0025` | 500  | integration | —         | Unable to generate agent access token                                                                                 |      |
| <a id="bck-protocol-0026" />`BCK.PROTOCOL.0026` | 403  | integration | —         | The agent doesnt include the plan specified                                                                           |      |
| <a id="bck-protocol-0027" />`BCK.PROTOCOL.0027` | 403  | integration | —         | Unable to validate access token                                                                                       |      |
| <a id="bck-protocol-0028" />`BCK.PROTOCOL.0028` | 403  | integration | —         | Invalid agent ID in access token                                                                                      |      |
| <a id="bck-protocol-0029" />`BCK.PROTOCOL.0029` | 403  | integration | —         | Proof is required for this plan                                                                                       |      |
| <a id="bck-protocol-0030" />`BCK.PROTOCOL.0030` | 403  | integration | —         | Invalid proof                                                                                                         |      |
| <a id="bck-protocol-0031" />`BCK.PROTOCOL.0031` | 403  | integration | —         | Endpoint not included in the agent api                                                                                |      |
| <a id="bck-protocol-0032" />`BCK.PROTOCOL.0032` | 500  | integration | —         | Unable to track access transaction                                                                                    |      |
| <a id="bck-protocol-0033" />`BCK.PROTOCOL.0033` | 403  | integration | —         | You do not have permission to track access transactions for this owner                                                |      |
| <a id="bck-protocol-0034" />`BCK.PROTOCOL.0034` | 500  | integration | —         | Unable to track access processor queue entry                                                                          |      |
| <a id="bck-protocol-0035" />`BCK.PROTOCOL.0035` | 500  | integration | —         | Unable to track agent task                                                                                            |      |
| <a id="bck-protocol-0036" />`BCK.PROTOCOL.0036` | 500  | integration | —         | Unable to track agent processor queue entry                                                                           |      |
| <a id="bck-protocol-0037" />`BCK.PROTOCOL.0037` | 404  | integration | —         | Agent task not found                                                                                                  |      |
| <a id="bck-protocol-0038" />`BCK.PROTOCOL.0038` | 500  | integration | —         | Error updating agent task                                                                                             |      |
| <a id="bck-protocol-0039" />`BCK.PROTOCOL.0039` | 500  | integration | —         | Error redeeming credits and updating agent task                                                                       |      |
| <a id="bck-protocol-0040" />`BCK.PROTOCOL.0040` | 500  | integration | —         | Unable to register agent and plan                                                                                     |      |
| <a id="bck-protocol-0041" />`BCK.PROTOCOL.0041` | 403  | integration | —         | The user doesnt have a valid Stripe account enabled                                                                   |      |
| <a id="bck-protocol-0042" />`BCK.PROTOCOL.0042` | 403  | integration | —         | Either amount or marginPercent must be provided, but not both                                                         |      |
| <a id="bck-protocol-0043" />`BCK.PROTOCOL.0043` | 403  | integration | —         | Plan does not have valid price configuration for margin calculation. Credits type must be DYNAMIC.                    |      |
| <a id="bck-protocol-0044" />`BCK.PROTOCOL.0044` | 404  | integration | —         | No Helicone request found for agent request ID                                                                        |      |
| <a id="bck-protocol-0045" />`BCK.PROTOCOL.0045` | 500  | integration | —         | Error getting all plans                                                                                               |      |
| <a id="bck-protocol-0046" />`BCK.PROTOCOL.0046` | 400  | integration | —         | Fiat plan price exceeds the maximum allowed (\$999,999.99). Stripe does not support payment intents above this limit. |      |
| <a id="bck-protocol-0047" />`BCK.PROTOCOL.0047` | 400  | integration | —         | Fiat plan price is below the minimum allowed (\$1.00). Lower prices do not cover the payment-processor fixed fee.     |      |

<h2 id="bck-stripe">
  `BCK.STRIPE`
</h2>

| Code                                        | HTTP | Category    | Retryable | Message                                                                                                                                                 | Hint                                                                                                                                                                                                  |
| ------------------------------------------- | ---- | ----------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-stripe-0001" />`BCK.STRIPE.0001` | 400  | integration | —         | Error creating Stripe account                                                                                                                           |                                                                                                                                                                                                       |
| <a id="bck-stripe-0002" />`BCK.STRIPE.0002` | 400  | integration | —         | Error creating Stripe checkout session                                                                                                                  |                                                                                                                                                                                                       |
| <a id="bck-stripe-0003" />`BCK.STRIPE.0003` | 400  | integration | —         | Error creating Stripe payment intent                                                                                                                    |                                                                                                                                                                                                       |
| <a id="bck-stripe-0004" />`BCK.STRIPE.0004` | 500  | integration | —         | Error processing Stripe account webhook for updating an account                                                                                         |                                                                                                                                                                                                       |
| <a id="bck-stripe-0005" />`BCK.STRIPE.0005` | 400  | integration | —         | Error processing Stripe connect webhook                                                                                                                 |                                                                                                                                                                                                       |
| <a id="bck-stripe-0006" />`BCK.STRIPE.0006` | 500  | integration | —         | Error processing Stripe checkout event with error                                                                                                       |                                                                                                                                                                                                       |
| <a id="bck-stripe-0007" />`BCK.STRIPE.0007` | 400  | integration | —         | Invalid input params                                                                                                                                    |                                                                                                                                                                                                       |
| <a id="bck-stripe-0008" />`BCK.STRIPE.0008` | 400  | integration | —         | Stripe event not handled                                                                                                                                |                                                                                                                                                                                                       |
| <a id="bck-stripe-0009" />`BCK.STRIPE.0009` | 400  | integration | —         | The plan indicated is not valid for Stripe payment                                                                                                      |                                                                                                                                                                                                       |
| <a id="bck-stripe-0010" />`BCK.STRIPE.0010` | 400  | integration | —         | The plan is not a Fiat plan                                                                                                                             |                                                                                                                                                                                                       |
| <a id="bck-stripe-0011" />`BCK.STRIPE.0011` | 400  | integration | —         | Error calculating plan checkout price                                                                                                                   |                                                                                                                                                                                                       |
| <a id="bck-stripe-0012" />`BCK.STRIPE.0012` | 400  | integration | —         | The account selling the plan is not properly configured to accept Stripe payments                                                                       |                                                                                                                                                                                                       |
| <a id="bck-stripe-0013" />`BCK.STRIPE.0013` | 400  | integration | —         | Payment intent not succeeded                                                                                                                            |                                                                                                                                                                                                       |
| <a id="bck-stripe-0014" />`BCK.STRIPE.0014` | 400  | integration | —         | Invalid payment amount from payment intent                                                                                                              |                                                                                                                                                                                                       |
| <a id="bck-stripe-0015" />`BCK.STRIPE.0015` | 400  | integration | —         | Customer not found                                                                                                                                      |                                                                                                                                                                                                       |
| <a id="bck-stripe-0016" />`BCK.STRIPE.0016` | 400  | integration | —         | Subscription not found                                                                                                                                  |                                                                                                                                                                                                       |
| <a id="bck-stripe-0017" />`BCK.STRIPE.0017` | 400  | integration | —         | Invoices not found                                                                                                                                      |                                                                                                                                                                                                       |
| <a id="bck-stripe-0018" />`BCK.STRIPE.0018` | 400  | integration | —         | Error retrieving Stripe payment metadata                                                                                                                |                                                                                                                                                                                                       |
| <a id="bck-stripe-0019" />`BCK.STRIPE.0019` | 400  | integration | —         | Error retrieving Stripe balance                                                                                                                         |                                                                                                                                                                                                       |
| <a id="bck-stripe-0020" />`BCK.STRIPE.0020` | 500  | integration | —         | Error canceling subscription                                                                                                                            |                                                                                                                                                                                                       |
| <a id="bck-stripe-0021" />`BCK.STRIPE.0021` | 400  | integration | —         | Unable to create Stripe subscription                                                                                                                    |                                                                                                                                                                                                       |
| <a id="bck-stripe-0022" />`BCK.STRIPE.0022` | 424  | integration | —         | The settlement could not be executed because the seller account has not properly configured the payment service provider (Stripe)                       |                                                                                                                                                                                                       |
| <a id="bck-stripe-0023" />`BCK.STRIPE.0023` | 503  | integration | —         | Transient failure while looking up the seller payment service provider configuration                                                                    |                                                                                                                                                                                                       |
| <a id="bck-stripe-0030" />`BCK.STRIPE.0030` | 500  | integration | —         | Application-fee true-up refund failed; row left Settled with the owed amount stored in providerMetadata.trueUpRefundOwedMicro for manual reconciliation |                                                                                                                                                                                                       |
| <a id="bck-stripe-0031" />`BCK.STRIPE.0031` | 500  | internal    | ❌         | Price conversion overflow when converting micro-units to cents                                                                                          | The plan price exceeds Number.MAX\_SAFE\_INTEGER after conversion. Lower the plan price or fix the unit boundary in convertMicroUnitsToCents.                                                         |
| <a id="bck-stripe-0032" />`BCK.STRIPE.0032` | 500  | integration | ❌         | Stripe checkout: user profile not found for account event                                                                                               | The Stripe account event referenced a user that no longer exists in our DB (deleted profile, or environment mismatch between live/sandbox). The webhook is marked permanent so Stripe stops retrying. |
| <a id="bck-stripe-0033" />`BCK.STRIPE.0033` | 500  | integration | ✅         | Stripe account webhook handler failed                                                                                                                   | Generic catch-all for the account webhook handler — inspect the cause field for the underlying error and the params for eventId/stripeAccountId/userId.                                               |
| <a id="bck-stripe-0034" />`BCK.STRIPE.0034` | 500  | integration | ✅         | Stripe payment intent webhook handler failed                                                                                                            | Generic catch-all for the payment intent webhook handler — inspect the cause and params.eventId.                                                                                                      |
| <a id="bck-stripe-0035" />`BCK.STRIPE.0035` | 500  | integration | ✅         | Stripe subscription invoice webhook handler failed                                                                                                      | Generic catch-all for the subscription invoice (recurring) webhook handler — inspect the cause and params.eventId.                                                                                    |
| <a id="bck-stripe-0036" />`BCK.STRIPE.0036` | 400  | business    | ❌         | Stripe subscription creation: plan has no Stripe priceId                                                                                                | The plan DDO is missing metadata.plan.priceId. Re-publish the plan with a Stripe price configured, or use the one-shot payment intent flow.                                                           |
| <a id="bck-stripe-0037" />`BCK.STRIPE.0037` | 400  | integration | ✅         | Stripe subscription creation: no latest invoice on subscription                                                                                         | The newly-created subscription did not return a latest\_invoice. Retry once; if it persists, check Stripe dashboard for the subscription state.                                                       |
| <a id="bck-stripe-0038" />`BCK.STRIPE.0038` | 400  | integration | ✅         | Stripe subscription creation: no payment intent on subscription                                                                                         | The subscription invoice did not yield a payment\_intent. This usually means the customer has no default payment method. Confirm the SetupIntent has succeeded before creating the subscription.      |

<h2 id="bck-stripe-connect">
  `BCK.STRIPE.CONNECT`
</h2>

| Code                                                        | HTTP | Category    | Retryable | Message                                                        | Hint |
| ----------------------------------------------------------- | ---- | ----------- | --------- | -------------------------------------------------------------- | ---- |
| <a id="bck-stripe-connect-0001" />`BCK.STRIPE.CONNECT.0001` | 503  | integration | —         | Stripe Connect is not configured                               |      |
| <a id="bck-stripe-connect-0002" />`BCK.STRIPE.CONNECT.0002` | 400  | integration | —         | Stripe OAuth token exchange failed                             |      |
| <a id="bck-stripe-connect-0003" />`BCK.STRIPE.CONNECT.0003` | 400  | integration | —         | Stripe OAuth response missing stripe\_user\_id                 |      |
| <a id="bck-stripe-connect-0004" />`BCK.STRIPE.CONNECT.0004` | 400  | integration | —         | Stripe account environment does not match platform environment |      |
| <a id="bck-stripe-connect-0005" />`BCK.STRIPE.CONNECT.0005` | 404  | integration | —         | User profile not found for Stripe Connect update               |      |

<h2 id="bck-transcoding">
  `BCK.TRANSCODING`
</h2>

| Code                                                  | HTTP | Category    | Retryable | Message       | Hint |
| ----------------------------------------------------- | ---- | ----------- | --------- | ------------- | ---- |
| <a id="bck-transcoding-0001" />`BCK.TRANSCODING.0001` | 404  | integration | —         | UGC not found |      |

<h2 id="bck-txs">
  `BCK.TXS`
</h2>

| Code                                  | HTTP | Category    | Retryable | Message                                             | Hint |
| ------------------------------------- | ---- | ----------- | --------- | --------------------------------------------------- | ---- |
| <a id="bck-txs-0001" />`BCK.TXS.0001` | 404  | integration | —         | Error searching asset transactions by id            |      |
| <a id="bck-txs-0002" />`BCK.TXS.0002` | 404  | integration | —         | Error searching asset consumer transactions         |      |
| <a id="bck-txs-0003" />`BCK.TXS.0003` | 404  | integration | —         | Error searching distintc asset transactions         |      |
| <a id="bck-txs-0004" />`BCK.TXS.0004` | 404  | integration | —         | Error searching plan transactions                   |      |
| <a id="bck-txs-0005" />`BCK.TXS.0005` | 404  | integration | —         | Error searching asset transactions grouped by owner |      |
| <a id="bck-txs-0006" />`BCK.TXS.0006` | 404  | integration | —         | Error gathering DDO Info                            |      |
| <a id="bck-txs-0007" />`BCK.TXS.0007` | 404  | integration | —         | Error getting active users for owner                |      |
| <a id="bck-txs-0008" />`BCK.TXS.0008` | 404  | integration | —         | Error getting total API calls for owner             |      |
| <a id="bck-txs-0009" />`BCK.TXS.0009` | 404  | integration | —         | Error getting total revenue for owner               |      |
| <a id="bck-txs-0010" />`BCK.TXS.0010` | 404  | integration | —         | Error getting dashboard metrics for owner           |      |

<h2 id="bck-user_profile">
  `BCK.USER_PROFILE`
</h2>

| Code                                                    | HTTP | Category | Retryable | Message                | Hint                                                                                                                                                                                                               |
| ------------------------------------------------------- | ---- | -------- | --------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <a id="bck-user_profile-0001" />`BCK.USER_PROFILE.0001` | 500  | internal | ❌         | User profile not found | Verify the entryId. Note: legacy callers depended on this surfacing as 500; the canonical "user profile not found for caller-supplied identifier" lookup-not-found semantics live in BCK.USER\_PROFILE.0002 (404). |
| <a id="bck-user_profile-0002" />`BCK.USER_PROFILE.0002` | 404  | business | ❌         | User profile not found | Verify the user identifier. The profile may have been disabled or never created.                                                                                                                                   |

<h2 id="bck-visa">
  `BCK.VISA`
</h2>

| Code                                    | HTTP | Category    | Retryable | Message                                                                               | Hint                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------- | ---- | ----------- | --------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <a id="bck-visa-0001" />`BCK.VISA.0001` | 503  | integration | —         | Visa payment provider is not configured                                               |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0002" />`BCK.VISA.0002` | 502  | integration | —         | Visa card enrollment failed                                                           |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0003" />`BCK.VISA.0003` | 502  | integration | —         | VGS mandate provisioning failed                                                       | VGS rejected `POST /intents` while provisioning the Visa mandate — typically because `assuranceData` is stale, replayed, or doesn't match the spending limit / duration / merchant context shown in the approval prompt. Restart the WebAuthn / passkey device-binding ceremony in the Nevermined webapp to mint a fresh `assuranceData` blob, then retry delegation creation. |
| <a id="bck-visa-0004" />`BCK.VISA.0004` | 502  | integration | —         | VGS cryptogram issuance failed                                                        |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0005" />`BCK.VISA.0005` | 400  | integration | —         | Invalid VGS webhook signature                                                         |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0006" />`BCK.VISA.0006` | 502  | integration | —         | VGS OAuth2 client\_credentials request failed                                         |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0007" />`BCK.VISA.0007` | 502  | integration | —         | Stripe settlement of Visa virtual card failed                                         |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0008" />`BCK.VISA.0008` | 400  | integration | —         | User has no email on file (required for Visa enrolment)                               |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0009" />`BCK.VISA.0009` | 422  | integration | —         | Visa mandate (intent) not provisioned for this delegation                             |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0010" />`BCK.VISA.0010` | 404  | integration | —         | VGS webhook references unknown card                                                   |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0011" />`BCK.VISA.0011` | 400  | integration | —         | VGS webhook payload malformed                                                         |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0012" />`BCK.VISA.0012` | 400  | integration | —         | VGS webhook revoke event missing card identifier                                      |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0013" />`BCK.VISA.0013` | 500  | integration | —         | Unable to process VGS webhook                                                         |                                                                                                                                                                                                                                                                                                                                                                                |
| <a id="bck-visa-0014" />`BCK.VISA.0014` | 400  | business    | —         | Visa delegation creation requires consumerPrompt and assuranceData                    | Provide both `consumerPrompt` and `assuranceData` when creating a Visa delegation. These are required by the Visa Trusted Agent Protocol and produced by the in-browser VGS Agentic Auth device-binding flow.                                                                                                                                                                  |
| <a id="bck-visa-0015" />`BCK.VISA.0015` | 400  | business    | —         | Visa delegation requires planId — mandate must bind to a single plan seller           | Provide `planId` when creating a Visa delegation. Visa mandates must bind to a single plan seller for compliance with the Trusted Agent Protocol.                                                                                                                                                                                                                              |
| <a id="bck-visa-0016" />`BCK.VISA.0016` | 400  | business    | —         | Plan seller has not completed Stripe Connect onboarding required for Visa delegations | The plan seller must complete Stripe Connect onboarding before accepting Visa delegations. Ask the seller to finish onboarding.                                                                                                                                                                                                                                                |
| <a id="bck-visa-0017" />`BCK.VISA.0017` | 502  | integration | —         | Stripe Connect account lookup failed while resolving Visa merchant context            | Inspect Stripe dashboard logs for the connected account id in params. Connect account lookup failed transiently — retry; if it persists, check the seller's Connect status.                                                                                                                                                                                                    |
| <a id="bck-visa-0018" />`BCK.VISA.0018` | 409  | business    | —         | This card is already enrolled to a different account                                  | VGS Agentic Tokens are keyed on PAN globally — the same physical card resolves to the same tokenId regardless of which user enrols it. The card you tried to enrol is already on file under another account. Use a different card.                                                                                                                                             |

<h2 id="bck-widget">
  `BCK.WIDGET`
</h2>

| Code                                        | HTTP | Category | Retryable | Message                             | Hint |
| ------------------------------------------- | ---- | -------- | --------- | ----------------------------------- | ---- |
| <a id="bck-widget-0001" />`BCK.WIDGET.0001` | 500  | business | —         | Unable to store widget config       |      |
| <a id="bck-widget-0002" />`BCK.WIDGET.0002` | 404  | business | —         | Unable to get widget config from id |      |
| <a id="bck-widget-0003" />`BCK.WIDGET.0003` | 401  | business | —         | The user doesnt own this widget     |      |
| <a id="bck-widget-0004" />`BCK.WIDGET.0004` | 500  | business | —         | Error updating widget config        |      |
| <a id="bck-widget-0005" />`BCK.WIDGET.0005` | 500  | business | —         | Error deleting widget config        |      |

<h2 id="bck-widget_keys">
  `BCK.WIDGET_KEYS`
</h2>

| Code                                                  | HTTP | Category | Retryable | Message                      | Hint |
| ----------------------------------------------------- | ---- | -------- | --------- | ---------------------------- | ---- |
| <a id="bck-widget_keys-0001" />`BCK.WIDGET_KEYS.0001` | 500  | internal | ❌         | Widget key generation failed |      |
| <a id="bck-widget_keys-0002" />`BCK.WIDGET_KEYS.0002` | 404  | auth     | —         | Widget key not found         |      |

<h2 id="bck-widget_session">
  `BCK.WIDGET_SESSION`
</h2>

| Code                                                        | HTTP | Category | Retryable | Message                                                    | Hint |
| ----------------------------------------------------------- | ---- | -------- | --------- | ---------------------------------------------------------- | ---- |
| <a id="bck-widget_session-0001" />`BCK.WIDGET_SESSION.0001` | 401  | auth     | —         | Invalid or expired widget init token                       |      |
| <a id="bck-widget_session-0002" />`BCK.WIDGET_SESSION.0002` | 401  | auth     | —         | Organization has no active widget key                      |      |
| <a id="bck-widget_session-0003" />`BCK.WIDGET_SESSION.0003` | 500  | auth     | —         | Widget JWT secret not configured                           |      |
| <a id="bck-widget_session-0004" />`BCK.WIDGET_SESSION.0004` | 500  | auth     | —         | Error creating widget session user                         |      |
| <a id="bck-widget_session-0005" />`BCK.WIDGET_SESSION.0005` | 401  | auth     | —         | Invalid or expired widget session token                    |      |
| <a id="bck-widget_session-0006" />`BCK.WIDGET_SESSION.0006` | 500  | auth     | —         | Widget encryption key not configured or invalid            |      |
| <a id="bck-widget_session-0007" />`BCK.WIDGET_SESSION.0007` | 401  | auth     | —         | Widget init token is missing required fields               |      |
| <a id="bck-widget_session-0008" />`BCK.WIDGET_SESSION.0008` | 401  | auth     | —         | Widget session token is missing required wallet claim      |      |
| <a id="bck-widget_session-0009" />`BCK.WIDGET_SESSION.0009` | 401  | auth     | —         | Widget session token is missing required apiKeyHash claim  |      |
| <a id="bck-widget_session-0010" />`BCK.WIDGET_SESSION.0010` | 401  | auth     | —         | Widget session token is missing required widgetKeyId claim |      |
| <a id="bck-widget_session-0011" />`BCK.WIDGET_SESSION.0011` | 401  | auth     | —         | Widget key has been revoked or no longer exists            |      |
| <a id="bck-widget_session-0012" />`BCK.WIDGET_SESSION.0012` | 403  | auth     | —         | Origin not allowed for this widget key                     |      |

<h2 id="bck-x402">
  `BCK.X402`
</h2>

| Code                                    | HTTP | Category | Retryable | Message                                             | Hint                                                                                                                                                                                                                                  |
| --------------------------------------- | ---- | -------- | --------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <a id="bck-x402-0001" />`BCK.X402.0001` | 404  | business | —         | Agent not found                                     |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0002" />`BCK.X402.0002` | 404  | business | —         | Plan not found                                      |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0003" />`BCK.X402.0003` | 400  | business | —         | The plan is not associated to the agent             |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0004" />`BCK.X402.0004` | 500  | business | —         | Error generating X402 access token                  |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0005" />`BCK.X402.0005` | 402  | business | —         | Invalid access token                                |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0006" />`BCK.X402.0006` | 500  | business | —         | Error verifying permissions                         |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0007" />`BCK.X402.0007` | 500  | business | —         | Failed to order Pay-as-you-go plan                  |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0008" />`BCK.X402.0008` | 500  | business | —         | Failed to order crypto plan                         |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0009" />`BCK.X402.0009` | 500  | business | —         | Failed to redeem credits                            |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0010" />`BCK.X402.0010` | 400  | business | —         | Invalid x402 access token                           |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0011" />`BCK.X402.0011` | 404  | business | —         | User profile not found                              |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0012" />`BCK.X402.0012` | 400  | business | —         | resource.url is required when agentId is provided   |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0013" />`BCK.X402.0013` | 400  | business | —         | Accepted payment method does not match requirements |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0014" />`BCK.X402.0014` | 400  | business | —         | Delegation restricted to a different plan           |                                                                                                                                                                                                                                       |
| <a id="bck-x402-0015" />`BCK.X402.0015` | 404  | business | ❌         | Permission not found                                | The permission record either has been revoked or never existed for this combination of (subscriber, plan, agent).                                                                                                                     |
| <a id="bck-x402-0016" />`BCK.X402.0016` | 400  | business | ❌         | Permission is already revoked                       | The permission was already revoked. No further action required.                                                                                                                                                                       |
| <a id="bck-x402-0017" />`BCK.X402.0017` | 500  | internal | ❌         | Failed to issue credits after card charge           | The card was charged successfully but the DB-side mint of credits failed. The charge is auto-refunded when the provider supports it; otherwise a `failed_post_charge_*` delegationTransactions row is left for manual reconciliation. |
