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

url = "https://xquik.com/api/v1/credits/topup"

payload = {
"dollars": 123,
"locale": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({dollars: 123, locale: '<string>'})
};

fetch('https://xquik.com/api/v1/credits/topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://xquik.com/api/v1/credits/topup"

payload := strings.NewReader("{\n \"dollars\": 123,\n \"locale\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
Free - does not consume credits
curl -X POST https://xquik.com/api/v1/credits/topup \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"dollars": 10}' | jq
const response = await fetch("https://xquik.com/api/v1/credits/topup", {
  method: "POST",
  headers: {
    "x-api-key": "xq_YOUR_KEY_HERE",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ dollars: 10 }),
});
const data = await response.json();
process.stdout.write(`${JSON.stringify(data, null, 2)}\n`);
import requests

response = requests.post(
    "https://xquik.com/api/v1/credits/topup",
    headers={"x-api-key": "xq_YOUR_KEY_HERE"},
    json={"dollars": 10},
)
data = response.json()
print(data)
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    body, _ := json.Marshal(map[string]interface{}{
        "dollars": 10,
    })

    req, err := http.NewRequest("POST", "https://xquik.com/api/v1/credits/topup", bytes.NewReader(body))
    if err != nil {
        panic(err)
    }
    req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    var data map[string]interface{}
    if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
        panic(err)
    }
    fmt.Println(data)
}

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 top up. Minimum $10.
locale
string
Optional checkout locale. Defaults to en.

Response

url
string
Checkout URL. Redirect the user to complete payment.
{
  "url": "https://xquik.com/billing/checkout/session"
}
Last modified on May 5, 2026