AIOZ Stream API
Payments

Payments

Retrieve user's usage

This API will get usage statistics for storage, delivery, and transcoding over a specified time period.

Field description:

  • storage (integer): The total storage used, in bytes.

  • storage_cost (string): The cost associated with the storage used, represented as a string.

  • delivery (integer): The total data delivered, in bytes.

  • delivery_cost (string): The cost associated with the data delivered, represented as a string.

  • transcode (integer): The total transcoding time, measured in seconds.

  • transcode_cost (string): The cost associated with transcoding, represented as a string.

GEThttps://api.aiozstream.network/api/payment/usage

Query

from The starting date time in UNIX timestamp format of the period you want
to The ending date time in UNIX timestamp format of the period you want

Headers

Authorization Bearer your_access_token_here

Response

200: OK
{
    "status": "success",
    "data": {
        "storage": 5663399103,
        "storage_cost": "2173368724836762",
        "delivery": 80194722668,
        "delivery_cost": "459922182307707",
        "transcode": 0,
        "transcode_cost": "0",
    }
}
curl --location 'https://api.aiozstream.network/api/payment/usage?from=1714232234&to=1824232234' \
--header 'accept: application/json' \
--header 'Authorization: Bearer your_access_token_here'

Retrieve user's top ups

This API will get top up information for a specific user.

Field description:

  • transaction_id (string): The on-chain transaction hash of the top-up. Users can look it up on AIOZ Explorer to see full details.

  • from (string): The wallet address that initiated the top-up.

  • credit (string): The amount credited by this top-up. Kept as a string to preserve precision.

  • status (string): Processing state of the top-up, e.g. "pending", "success", or "failed".

  • created_at (string): The timestamp when the top-up was recorded.

GEThttps://api.aiozstream.network/api/payment/top_ups

Query

limit The maximum number of records to return in a query (default: 25, max: 100)
offset The number of records to skip before starting to return the results (default: 0)
orderBy The field or property used to determine how the result set should be sorted. Use "asc" for ascending order and "desc" for descending order.
sortBy The field or property used to determine which field should be used to sort the result set. (allowed: created_at)

Headers

Authorization Bearer your_access_token_here

Response

200: OK
{
    "status": "success",
    "data": {
        "total": 3,
        "top_ups": [
            {
                "transaction_id": "D423DAD098D368EF25221ED603ABD40753566FE3CEB1AD59A7230021B4C128E5",
                "from": "0x2eaD62835bC63BB7169EBDB02f403a3dfD46b1B0",
                "status": "success",
                "created_at": "2025-07-04T04:49:24.583358Z",
                "credit": "19999894195462500"
            },
            {
                "transaction_id": "BC85C63259FE93A7CE63C3004F19A87A61EF1752596641806095AF29B47F450F",
                "from": "0x2eaD62835bC63BB7169EBDB02f403a3dfD46b1B0",
                "status": "success",
                "created_at": "2025-07-03T03:00:37.702336Z",
                "credit": "100000055725587500"
            },
            {
                "transaction_id": "DDF80BF028861C09DAD17699DAB5C7E37376360F13C7C7B85DB63696FC69384B",
                "from": "0x2eaD62835bC63BB7169EBDB02f403a3dfD46b1B0",
                "status": "success",
                "created_at": "2025-06-06T04:07:55.337199Z",
                "credit": "19999975172512500"
            }
        ]
    }
}
curl --location 'https://api.aiozstream.network/api/payment/top_ups?limit=10&offset=0&orderBy=desc' \
--header 'accept: application/json' \
--header 'Authorization: Bearer your_access_token_here'

Retrieve user's billings

This API will get billing information for a specific user.

Field description:

  • storage (integer): The total storage used, in bytes.

  • storage_cost (string): The cost associated with the storage used, represented as a string.

  • delivery (integer): The total data delivered, in bytes.

  • delivery_cost (string): The cost associated with the data delivered, represented as a string.

  • transcode (integer): The total transcoding time, measured in seconds.

  • transcode_cost (string): The cost associated with transcoding, represented as a string.

GEThttps://api.aiozstream.network/api/payment/billings

Query

limit The maximum number of records to return in a query (default: 25, max: 100)
offset The number of records to skip before starting to return the results (default: 0)
orderBy The field or property used to determine how the result set should be sorted. Use "asc" for ascending order and "desc" for descending order.

Headers

Authorization Bearer your_access_token_here

Response

200: OK
{
    "status": "success",
    "data": {
        "total": 1,
        "billings": [
            {
                "storage": 5663399103,
                "transcode": 0,
                "delivery": 36653731937,
                "storage_cost": "375602791436316",
                "transcode_cost": "0",
                "delivery_cost": "356384235623451",
                "created_at": "2024-09-12T23:00:00+07:00"
            }
        ]
    }
}
curl --location 'https://api.aiozstream.network/api/payment/billings?limit=10&offset=0&orderBy=desc' \
--header 'accept: application/json' \
--header 'Authorization: Bearer your_access_token_here'