# get\_\_credits\_packs

`GET /credits/packs`

*List Credit Packs*

Returns the list of available credit packs (one-time purchases). Each pack has an ID, name, code, number of credits, and price. No authentication is required; this is reference data for display and for initiating a pack purchase via `POST /credits/packs/buy`.

#### TypeScript Client Library

```typescript
public getCreditsPacks = async (): Promise<GetCreditsPacksResponse> => {
  return this.makeRequest<GetCreditsPacksResponse>('credits/packs', 'GET', null);
};
```

#### Code Samples

{% tabs %}
{% tab title="Shell" %}

```shell
curl -X GET https://backend.flashback.tech/credits/packs \
  -H 'Accept: application/json'
```

{% endtab %}

{% tab title="HTTP" %}

```http
GET https://backend.flashback.tech/credits/packs HTTP/1.1
Host: backend.flashback.tech
Accept: application/json
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch('https://backend.flashback.tech/credits/packs', {
  method: 'GET',
  headers: { 'Accept': 'application/json' }
})
  .then(res => res.json())
  .then(body => console.log(body));
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

r = requests.get('https://backend.flashback.tech/credits/packs', headers={'Accept': 'application/json'})
print(r.json())
```

{% endtab %}
{% endtabs %}

> Example responses

> 200 Response

```json
{
  "success": true,
  "data": [
    {
      "id": "pack-1",
      "name": "Pack 1",
      "code": "PACK_1",
      "credits": 100,
      "price": 19.99
    },
    {
      "id": "pack-2",
      "name": "Pack 2",
      "code": "PACK_2",
      "credits": 500,
      "price": 49.99
    },
    {
      "id": "pack-3",
      "name": "Pack 3",
      "code": "PACK_3",
      "credits": 1100,
      "price": 99.99
    }
  ]
}
```

> 500 Response

```json
{
  "success": false,
  "error_code": "INTERNAL_ERROR",
  "message": "Failed to retrieve credit packs"
}
```

#### Responses

| Status | Meaning               | Description          | Schema |
| ------ | --------------------- | -------------------- | ------ |
| 200    | OK                    | List of credit packs | Inline |
| 500    | Internal Server Error | Server error         | Inline |

#### Response Schema (200)

| Name          | Type    | Required | Description                              |
| ------------- | ------- | -------- | ---------------------------------------- |
| » success     | boolean | false    | Whether the request succeeded            |
| » data        | array   | false    | List of packs                            |
| »» id         | string  | false    | Pack ID (use in POST /credits/packs/buy) |
| »» name       | string  | false    | Display name                             |
| »» code       | string  | false    | Code (e.g. PACK\_1)                      |
| »» credits    | integer | false    | Credits included in pack                 |
| »» price      | number  | false    | Price in USD                             |
| » error\_code | string  | false    | Set on error                             |
| » message     | string  | false    | Error or status message                  |

#### Security

* **None**: This endpoint does not require authentication.

#### Notes

* Use the returned `id` as `packId` in `POST /credits/packs/buy` to start checkout for that pack.
* Only active, non-deleted packs are returned.


---

# 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.flashback.tech/support-reference/platform-api-reference/credits/get__credits_packs.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.
