Credits
The prepaid wallet: balance, top-ups, and every line that changed it.
- GET
/v1/creditsRead the wallet - GET
/v1/credits/transactionsList balance changes - POST
/v1/credits/checkoutsStart a top-up - GET
/v1/credits/checkoutsList top-ups - GET
/v1/credits/checkouts/{top_id}Get one top-up
GET /v1/credits
Read the wallet
Example
curl -X GET https://api.superveo.io/v1/credits \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | Credits | OK |
| 401 | Error | unauthorized |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/credits/transactions
List balance changes
Top-ups, one usage line per finished job, refunds and disputes.
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | min 1; max 100; default 20 |
after | query | string | Return what comes after this id (last_id of the previous page). |
Example
curl -X GET https://api.superveo.io/v1/credits/transactions \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | TransactionList | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
POST /v1/credits/checkouts
Start a top-up
Returns checkout_url, the payment page. The wallet is credited when the payment provider confirms the payment; read the checkout to see when.
Request body
| Field | Type | Description |
|---|---|---|
amount_usd required | any | Amount to add, a number or a string like "25.00", two decimals at most. See GET /v1/credits for the smallest and largest amount. |
Example
curl -X POST https://api.superveo.io/v1/credits/checkouts \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount_usd": 25
}'import os, uuid, requests
r = requests.request(
"POST", "https://api.superveo.io/v1/credits/checkouts",
headers={
"Authorization": f"Bearer {os.environ['SUPERVIDEO_API_KEY']}",
},
json={
"amount_usd": 25
},
)
print(r.status_code, r.json())const r = await fetch("https://api.superveo.io/v1/credits/checkouts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SUPERVIDEO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"amount_usd": 25
}),
});
console.log(r.status, await r.json());Responses
| Status | Body | When |
|---|---|---|
| 201 | Checkout | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 429 | Error | rate_limited |
| 502 | Error | upstream_error |
| 503 | Error | capacity_unavailable, not_configured |
| 504 | Error | upstream_timeout |
GET /v1/credits/checkouts
List top-ups
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | min 1; max 100; default 20 |
after | query | string | Return what comes after this id (last_id of the previous page). |
Example
curl -X GET https://api.superveo.io/v1/credits/checkouts \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | CheckoutList | OK |
| 400 | Error | invalid_request |
| 401 | Error | unauthorized |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |
GET /v1/credits/checkouts/{top_id}
Get one top-up
Parameters
| Parameter | In | Type | Description |
|---|---|---|---|
top_id required | path | string | top_... |
Example
curl -X GET https://api.superveo.io/v1/credits/checkouts/top_id \
-H "Authorization: Bearer $SUPERVIDEO_API_KEY"
Responses
| Status | Body | When |
|---|---|---|
| 200 | Checkout | OK |
| 401 | Error | unauthorized |
| 404 | Error | not_found |
| 429 | Error | rate_limited |
| 503 | Error | capacity_unavailable |