Skip to Content

Get a credit transaction

GEThttps://api.respan.ai/api/credit-transactions/{id}/

Returns one credit transaction, such as a top-up or an adjustment. The monthly usage rows that List credit transactions returns (IDs like usage_2026-09-30) are summaries and can’t be fetched here.

Servers

https://api.respan.ai: Respan API Server

Authentication

RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: bearer; format: Respan API key.

HTTP
Authorization: Bearer $RESPAN_API_KEY

Or:

DashboardJwt

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

HTTP scheme: bearer; format: Dashboard JWT.

HTTP
Authorization: Bearer $RESPAN_DASHBOARD_JWT

Path parameters

Parameter Type Required Description and constraints
id string Required
The unique identifier of the transaction to retrieve (e.g., ct_1a2b3c4d5e6f7g8h)

Responses

200

Transaction details.

application/json

Field Type Requirement Description and constraints
$ object Body
-
id string Required in parent
-
unique_organization_id string Required in parent
-
amount number Required in parent
-
transaction_type string Required in parent
-
billable_type string Required in parent
-
source_id string Required in parent
-
credit_amount number Required in parent
-
debit_amount number Required in parent
-
description string Required in parent
-
created_at string Required in parent
Format: date-time

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "unique_organization_id": {
      "type": "string"
    },
    "amount": {
      "type": "number"
    },
    "transaction_type": {
      "type": "string"
    },
    "billable_type": {
      "type": "string"
    },
    "source_id": {
      "type": "string"
    },
    "credit_amount": {
      "type": "number"
    },
    "debit_amount": {
      "type": "number"
    },
    "description": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "unique_organization_id",
    "amount",
    "transaction_type",
    "billable_type",
    "source_id",
    "credit_amount",
    "debit_amount",
    "description",
    "created_at"
  ]
}

403

The API key is missing, invalid or expired.

application/json

Field Type Requirement Description and constraints
$ object Body
-
detail string Required in parent
-

OpenAPI response schema

{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
Example
JSON
{ "detail": "Your API key is invalid or expired, please check your API key in the platform settings." }

404

Not Found

application/json

Field Type Requirement Description and constraints
$ object Body
-
error string Optional
Example: "Not found"

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "example": "Not found"
    }
  }
}

OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

OpenAPI operation

{
  "summary": "Get a credit transaction",
  "operationId": "retrieveCreditTransaction",
  "tags": [
    "Credit Transactions"
  ],
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "The unique identifier of the transaction to retrieve (e.g., ct_1a2b3c4d5e6f7g8h)"
    }
  ],
  "responses": {
    "200": {
      "description": "Transaction details.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "unique_organization_id": {
                "type": "string"
              },
              "amount": {
                "type": "number"
              },
              "transaction_type": {
                "type": "string"
              },
              "billable_type": {
                "type": "string"
              },
              "source_id": {
                "type": "string"
              },
              "credit_amount": {
                "type": "number"
              },
              "debit_amount": {
                "type": "number"
              },
              "description": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "unique_organization_id",
              "amount",
              "transaction_type",
              "billable_type",
              "source_id",
              "credit_amount",
              "debit_amount",
              "description",
              "created_at"
            ]
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    },
    "404": {
      "description": "Not Found",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "example": "Not found"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "RespanApiKey": []
    },
    {
      "DashboardJwt": []
    }
  ],
  "description": "Returns one credit transaction, such as a top-up or an adjustment. The monthly usage rows that List credit transactions returns (IDs like `usage_2026-09-30`) are summaries and can't be fetched here."
}

OpenAPI path metadata

{}

Referenced OpenAPI components

{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "securitySchemes": {
    "DashboardJwt": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Dashboard JWT",
      "description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
      "x-fern-bearer": {
        "name": "dashboardJwt",
        "env": "RESPAN_DASHBOARD_JWT"
      }
    },
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}