# Get Payment History

Retrieve your credit payment history for different products.

## HTTP Request

`GET` `{API_URL}/users/credits/history?limit={limit}&offset={offset}`

* `limit`: Specifies the number of records to display per page.
* `offset`: Specifies the starting point for record retrieval (i.e., how many records to skip before starting to display).

## Response Attributes

#### data `dict`

* **credit\_balance**: User available credit amount.
* **credit\_history**: List of credits hourly transaction history.
* **total\_credit\_histories**: Total history count.

#### status `string`

Indicates the result of the request. **success** signifies success, while **failed** indicates an error.

#### message `string`

A description of the status of the request.

## Example

#### Request

```bash
curl -X GET '{API_URL}/users/credits/history?limit=2&offset=0'
-H 'Authorization: Bearer {TOKEN/KEY}'
```

#### Response

```json
{
    "data": {
        "credit_balance": 9.8682,
        "credit_history": [
            {
                "user_id": 266,
                "computing_amount": 2.004,
                "serverless_amount": 0.0,
                "create_time": "EST 2024-10-10 06:54:58",
                "update_time": "EST 2024-10-10 07:54:58",
                "total": 2.004
            },
            {
                "user_id": 266,
                "computing_amount": 2.004,
                "serverless_amount": 0.0,
                "create_time": "EST 2024-10-10 05:54:58",
                "update_time": "EST 2024-10-10 06:54:58",
                "total": 2.004
            }
        ],
        "total_credit_histories": 2
    },
    "message": "User credit history successfully retrieved",
    "status": "success"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nebulablock.com/overview/platform_api/get_credit_balance/get_payment_history.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
