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

# Update Static Charge

> Change the configuration of a Static Charge QR code.

## Usage

Use this API endpoint with the specific Static Charge ID to update its properties. Usually you'd use this API for the purposes of `increasing slots` or `changing min/max amount` settings.

<Info>
  Updating a Static Charge **WILL NOT modify its QR code**. The point of a Static Charge is that it **does not change**, while its contents can remain dynamic.
</Info>

## Configuration

### Path Parameters

<ParamField required path="id" type="string">
  Static Charge ID
</ParamField>

### Header Parameters

<ParamField required header="apikey" type="string">
  ZBD Project API Key
</ParamField>

<ParamField initialValue="application/json" header="Content-Type" type="string">
  Content Type
</ParamField>

### Body

<ParamField initialValue="‎" body="minAmount" type="string">
  Minimum allowed amount for the Static Charge -> in millisatoshis
</ParamField>

<ParamField initialValue="‎" body="maxAmount" type="string">
  Maximum allowed amount for the Static Charge -> in millisatoshis
</ParamField>

<ParamField initialValue="‎" body="description" type="string">
  Note or comment for this Static Charge (visible to payer)
</ParamField>

<ParamField initialValue="‎" body="successMessage" type="string">
  Message displayed to the payer AFTER payment settles
</ParamField>

<ParamField body="allowedSlots" type="number">
  Number of payments this Static Charge can accept
</ParamField>

<ParamField initialValue="‎" body="internalId" type="string">
  Open metadata string property
</ParamField>

<ParamField initialValue="‎" body="callbackUrl" type="string">
  The endpoint ZBD will POST Charge updates to
</ParamField>

<ResponseExample>
  ```json Response theme={null}
  {
    "message":"Successfully editted Static Charge.",
    "data":{
      "id":"45c225b1-022b-4a37-98d6-5a5568f78d11",
      "unit":"msats",
      "slots":0,
      "minAmount":"10000",
      "maxAmount":"100000",
      "createdAt":"2023-03-07T20:07:06.910Z",
      "expiresAt":null,
      "internalId":"myInternalId",
      "description":"This is my static charge",
      "callbackUrl":"https://my-website/zbd-callback",
      "allowedSlots":1000,
      "successMessage":"Congratulations your payment was successful!",
      "status":"active",
      "invoice":{
        "request":"lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy",
        "uri":"lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy"
      }
    }
  }
  ```
</ResponseExample>
