Skip to main content
POST
Buy X API credits for tweets, followers & writes

When to use hosted checkout

Use this route when the buyer needs a hosted checkout. Use quick top-up for a saved payment method. Use top-up status only to poll an existing checkout session. Store the session_id from the returned URL before redirecting the user. The status route needs it.
Free. This endpoint does not consume credits.
Ask the user to confirm the dollar amount before calling this endpoint. The response returns a hosted checkout URL. The call does not complete payment or add credits.

Headers

string
required
Your API key. Session cookie authentication is also supported.
string
required
Must be application/json.

Body

number
required
Amount in US dollars to top up. Minimum $10.
string
Optional checkout locale. Defaults to en.

Response

200 OK

string
Stable Xquik redirect URL for the active hosted checkout session.
string
Same stable redirect URL in snake_case.

400 Invalid input

The top-up amount is below the $10 minimum.

401 Unauthenticated

Missing or invalid API key.

429 Rate limited

Too many requests. Wait for the Retry-After header before retrying.