Skip to main content
GET
Check X API credit top-up payment status API
Free. This endpoint does not consume credits.
Use this endpoint after creating a standard top-up checkout. Pass the checkout session ID for that top-up to check whether payment is complete.

Hold queued API work until checkout is paid

Store the checkout session ID when creating a standard top-up. Associate it with the intended tweet, follower, reply, monitor, or write workload. Never substitute a session from another account or purchase. Poll this endpoint before you start work that needs the credits. Act on the returned status:
  • processing keeps the workload paused.
  • paid allows a fresh credit-balance check.
  • failed requires a new checkout.
  • expired requires a new checkout.
Do not start work from amount_dollars or credits alone. Only paid confirms that Xquik granted credits. Then call Get Credits. Compare the balance with the planned request cost. Limit polls while the status is processing. Wait between requests and honor Retry-After after rate limiting. Faster polling does not speed up payment. Store the last observed status and check time with the session ID. This lets another worker resume polling without creating a second purchase. failed and expired are final. Stop polling that session. Create a new checkout only after the user or approved billing workflow requests it. When paid appears, start only the workload tied to that checkout. Keep unrelated queues behind their own credit and approval checks. One top-up then cannot start unrelated work.

Headers

string
required
Your API key. Session cookie authentication is also supported.

Query parameters

string
required
Checkout session ID for the top-up checkout.

Response

200 Paid

Payment succeeded. Xquik added credits to the account.
string
Always "paid".
integer
Dollar amount requested for the top-up.
string
Credit amount granted as a Bigint string.

200 Processing

Payment has not reached a final state yet. Poll again later.
string
Always "processing".
integer
Dollar amount requested for the top-up, when available.
string
Pending credit amount as a Bigint string, when available.

200 Failed

Payment failed. Create a new top-up checkout before retrying payment.
string
Always "failed".

200 Expired

The checkout session expired before payment completed.
string
Always "expired".

400 Invalid input

The session_id query parameter is missing.

401 Unauthenticated

Missing or invalid API key.

404 Not found

No top-up checkout exists for that session ID on this account.

429 Rate limited

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