Skip to main content
POST
/
credits
/
quick-topup
Quick top-up credits
curl --request POST \
  --url https://xquik.com/api/v1/credits/quick-topup \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "dollars": 123
}'

Documentation Index

Fetch the complete documentation index at: https://docs.xquik.com/llms.txt

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

Free - does not consume credits
response=$(curl -sS -X POST https://xquik.com/api/v1/credits/quick-topup \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"dollars": 25}')
outcome=$(jq -r '.outcome' <<<"$response")

if [ "$outcome" = "requires_action" ]; then
  client_secret=$(jq -r '.clientSecret' <<<"$response")
  # Pass $client_secret to the billing confirmation flow; do not print it.
elif [ "$outcome" = "charged" ]; then
  jq '{outcome, credits, balance}' <<<"$response"
else
  jq '{outcome}' <<<"$response"
fi

Headers

x-api-key
string
required
Your API key. Session cookie authentication is also supported.
Content-Type
string
required
Must be application/json.

Body

dollars
number
required
Amount in US dollars to charge. Minimum 10,maximum10, maximum 500.
At USD 0.00015 per credit, a USD 25 quick top-up adds 166,666 credits, rounded down to whole credits. Only the charged outcome grants credits and updates balance. If the endpoint returns requires_action, complete payment authentication with clientSecret before retrying the metered API call. Pass clientSecret to the billing confirmation flow only; do not print it in logs. If it returns no_payment_method, create a checkout top-up instead.

Response

Payment succeeded immediately. Credits added to your balance.
outcome
string
Always "charged".
balance
string
Updated credit balance after top-up (Bigint string).
credits
string
Number of credits added (Bigint string).
{
  "outcome": "charged",
  "balance": "466666",
  "credits": "166666"
}
Last modified on May 14, 2026