Get transaction details

Retrieves detailed information about a specific credit transaction. All users can view transactions for their organization. ## Path parameters - `id` *string* **required**: The unique identifier of the transaction to retrieve (e.g., `ct_1a2b3c4d5e6f7g8h`) ## Response fields Unique transaction identifier Subscription ID for the organization Organization's unique identifier (UUID format) Transaction amount in USD - Positive: Adds credits (purchase, grant, bonus) - Negative: Removes credits (adjustment, refund) Type of transaction: - `purchase` - Customer purchased credits - `grant` - Admin granted free credits - `adjustment` - Admin adjustment (positive or negative) - `refund` - Refund issued - `bonus` - Promotional or bonus credits When transaction was created (ISO 8601 format) Expiration date for time-limited credits (nullable) Human-readable description of the transaction Stripe payment intent ID (for purchases) Additional JSON metadata ## Response ```json 200 OK { "id": "ct_1a2b3c4d5e6f7g8h", "organization_subscription": 42, "unique_organization_id": "8264a3f4-40c7-476a-97d1-96908127ea21", "amount": 100.0, "transaction_type": "grant", "created_at": "2025-12-27T10:30:00.000Z", "expires_at": null, "description": "Welcome bonus for new customer", "stripe_payment_intent_id": "", "metadata": { "contract_id": "ENT-2025-001", "sales_rep": "john@company.com" } } ``` ```json 401 Unauthorized { "detail": "Your API key is invalid or expired" } ``` ```json 404 Not Found { "detail": "Not found." } ``` ```python Python transaction_id = "ct_1a2b3c4d5e6f7g8h" url = f"https://api.respan.ai/api/credit-transactions/{transaction_id}/" headers = { "Authorization": "Bearer YOUR_API_KEY" } response = requests.get(url, headers=headers) print(response.json()) ``` ```typescript TypeScript const transactionId = 'ct_1a2b3c4d5e6f7g8h'; const url = `https://api.respan.ai/api/credit-transactions/${transactionId}/`; const headers = { 'Authorization': 'Bearer YOUR_API_KEY' }; const response = await fetch(url, { method: 'GET', headers: headers }); const data = await response.json(); console.log(data); ``` ```bash cURL curl -X GET "https://api.respan.ai/api/credit-transactions/ct_1a2b3c4d5e6f7g8h/" \ -H "Authorization: Bearer YOUR_API_KEY" ```

Authentication

AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys

Path parameters

idstringRequired

The unique identifier of the transaction to retrieve (e.g., ct_1a2b3c4d5e6f7g8h)

Response

Successful response for Get transaction details

Errors

401
Unauthorized Error