Skip to main content
POST https://xquik.com/api/v1/credits/topup

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

Body

Response

200 OK

400 Invalid input

{ "error": "invalid_input", "message": "Minimum top-up is $10" } Xquik opens no checkout. The message names the field to fix.
  • dollars is missing, below USD 10 or not a whole number.
  • currency is not 1 of the 10 codes.
  • returnPath is not an Xquik tool page.

401 Unauthenticated

Missing or invalid API key.

429 Rate limited

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

Response examples

  • 400 { "error": "invalid_input", "message": "Invalid input. Check the request body." }
  • 401 { "error": "unauthenticated", "message": "Authentication required. Provide a valid API key or bearer token." }
  • 403 { "error": "api_key_paused", "message": "This API key is paused. Resume it at dashboard.xquik.com/api-keys to use it again." }
  • 429 { "error": "rate_limit_exceeded", "message": "Too many requests. Try again later.", "retryAfter": 60 }