> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bleepay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Widget Config

> Get the public configuration for a widget.

`GET /api/v1/widgets/:widgetId/config`

Returns the public configuration of a widget — the currencies it accepts, min/max amounts, and display settings. Used by the embedded widget to render the customer-facing payment form.

This endpoint accepts either a JWT bearer token or the widget's client secret via `X-Client-Secret` header.

## Parameters

### Path

| Name       | Type     | Required | Description   |
| ---------- | -------- | -------- | ------------- |
| `widgetId` | `string` | Yes      | The widget ID |

## Request example

```shell theme={null}
curl --request GET 'https://payments.bleepay.com/api/v1/widgets/wdgt_abc/config' \
  --header 'X-Client-Secret: wdgt_secret_abc123...'
```

## Response

### Response schema

| Field    | Type               | Description                                                                    |
| -------- | ------------------ | ------------------------------------------------------------------------------ |
| `config` | `object` or `null` | Widget configuration, or `null` if the widget is inactive or domain-restricted |
| `reason` | `string`           | Reason why config is `null` (if applicable)                                    |

**Config object:**

| Field                     | Type               | Description                             |
| ------------------------- | ------------------ | --------------------------------------- |
| `name`                    | `string`           | Widget display name                     |
| `mode`                    | `string`           | `FIXED_AMOUNT` or `CUSTOMER_AMOUNT`     |
| `minAmount`               | `string`           | Minimum deposit amount                  |
| `maxAmount`               | `string`           | Maximum deposit amount                  |
| `allowedNetworks`         | `array`            | Accepted blockchain networks            |
| `allowedCurrencies`       | `array`            | Accepted currencies                     |
| `allowedDepositAddresses` | `array`            | Allowed destination addresses           |
| `allowedMethods`          | `array`            | Accepted payment methods                |
| `renderMode`              | `string`           | `IFRAME` or `POPUP`                     |
| `iconUrl`                 | `string` or `null` | Widget icon URL                         |
| `color`                   | `string` or `null` | Widget accent color                     |
| `emoji`                   | `string` or `null` | Widget emoji                            |
| `defaultCurrency`         | `string` or `null` | Default currency                        |
| `defaultCurrencyAddress`  | `string` or `null` | Default currency contract address       |
| `defaultNetwork`          | `string` or `null` | Default blockchain network              |
| `defaultDepositAddress`   | `string` or `null` | Default deposit destination             |
| `metadataSchema`          | `object` or `null` | JSON schema for custom metadata         |
| `allowAllOrigins`         | `boolean`          | Whether all origins are allowed         |
| `allowAllMethods`         | `boolean`          | Whether all payment methods are allowed |

### Example response

```json theme={null}
{
  "config": {
    "name": "Checkout Widget",
    "mode": "CUSTOMER_AMOUNT",
    "minAmount": "1",
    "maxAmount": "1000",
    "allowedNetworks": ["polygon", "ethereum"],
    "allowedCurrencies": ["USDC", "EURC"],
    "allowedMethods": [],
    "renderMode": "IFRAME",
    "iconUrl": null,
    "color": null,
    "emoji": null
  }
}
```

### Error responses

| Status | Code           | Description                       |
| ------ | -------------- | --------------------------------- |
| `401`  | `unauthorized` | Missing or invalid authentication |
| `404`  | `not_found`    | Widget not found                  |
