For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • GETList credit transactions
      • GETRetrieve a credit transaction
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceCredit Transactions

Retrieve a credit transaction

GET
https://api.respan.ai/api/credit-transactions/:id/
GET
/api/credit-transactions/:id/
$curl https://api.respan.ai/api/credit-transactions/id/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json"
1{
2 "id": "ct_1a2b3c4d5e6f7g8h",
3 "organization_subscription": 42,
4 "unique_organization_id": "d9b2d63d-a233-4123-847a-7a3a1f9b8f1c",
5 "amount": 150.75,
6 "transaction_type": "grant",
7 "created_at": "2024-01-15T09:30:00Z",
8 "expires_at": "2024-07-15T09:30:00Z",
9 "description": "Welcome bonus for new customer",
10 "stripe_payment_intent_id": "pi_3JH4kL2eZvKYlo2C0X9a1b2c",
11 "metadata": {
12 "campaign": "new_user_promo",
13 "source": "email_signup"
14 }
15}
Retrieve details of a specific credit transaction.
Was this page helpful?
Previous

List LLM metrics

Next
Built with

Path parameters

idstringRequired

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

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Response

Transaction details.
idstring
Transaction ID.
organization_subscriptioninteger
Organization subscription ID.
unique_organization_idstring
Organization UUID.
amountdouble
Transaction amount in USD. Negative for deductions.
transaction_typeenum
Transaction type.
Allowed values:
created_atdatetime
Transaction timestamp.
expires_atdatetime or null

Expiration date for time-limited credits.

descriptionstring
Transaction description.
stripe_payment_intent_idstring

Stripe payment intent ID (for purchases).

metadataobject
Custom metadata.

Errors

401
Unauthorized Error
404
Not Found Error