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"
}
}
Account API
Purchase Credits
Purchase credits to top up your account balance
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"
}
}
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
string
required
User session token. Format:
Bearer <user_session_token>.string
required
Must be set to
application/jsonRequest body
number
required
Credit amount to purchase, in account currency. Must be greater than
0.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.
Was this page helpful?