Skip to main content
POST
/
api
/
v1
/
credits
/
purchase
curl -X POST "https://app.talkover.ai/api/v1/credits/purchase" \
  -H "Authorization: Bearer your_user_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100.00,
    "payment_method_id": "pm_uuid_1"
  }'
{
  "success": true,
  "data": {
    "amount_charged": 100.00,
    "currency": "USD",
    "new_balance": 250.00,
    "transaction_id": "txn_uuid_1"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt

Use this file to discover all available pages before exploring further.

Purchase Credits

Purchase credits to top up your account balance. The transaction is charged to the saved payment method.
This endpoint is part of the Account API and is authenticated with a user session token.

Endpoint

POST /api/v1/credits/purchase

Request Headers

Authorization
string
required
User session token. Format: Bearer <user_session_token>.
Content-Type
string
required
Must be set to application/json

Request Body

amount
number
required
Credit amount to purchase, in account currency. Must be greater than 0.
payment_method_id
string
Optional payment method ID. If omitted, the default payment method is charged.

Examples

curl -X POST "https://app.talkover.ai/api/v1/credits/purchase" \
  -H "Authorization: Bearer your_user_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 100.00,
    "payment_method_id": "pm_uuid_1"
  }'

Response

{
  "success": true,
  "data": {
    "amount_charged": 100.00,
    "currency": "USD",
    "new_balance": 250.00,
    "transaction_id": "txn_uuid_1"
  }
}

Error Responses

402 — Payment Failed

{
  "success": false,
  "message": "Payment method declined",
  "code": "PAYMENT_FAILED"
}

Notes

  • For automated, recurring top-ups, use Auto Topup with an environment token instead.