> ## 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.

# Create Static Charge

> Start accepting payments on Lightning with Static QR codes.

## Description

Static Charges are static Payment Requests in the Bitcoin Lightning Network. Whereas [Charges](/payments/api/lightning-charges/create) create fixed-amount and single-use Payment Requests that expire, Static Charges provide you a lot more flexibility & capabilities, including:

* **Variable Amounts** -> Static Charges have both `minAmount` and `maxAmount` properties, allowing for variable amounts set by the payer.

* **Multi-use** -> By default Static Charges have no expiration time, making them usable for any N payers/payments.

* **Success Message** -> When a payer completes the payment flow for this Static Charge, a Success Message is displayed to them.

* **Slots** -> Static Charges can also have the notion of `allowedSlots`. This means only N payments will be accepted at this Static Charge before disabling them.

Static Charges also have the same core properties of Charges such as `internalId` and `callbackUrl`.

## Usage

Use this API endpoint to create advanced Payment Requests on the Bitcoin Lightning Network. Enjoy static QR codes that can accept any number of payments, for various amounts, with additional metadata in the payment flow.

<Tip>
  You can create a `multi-use` Static Charge with a fixed amount too, simply by setting `minAmount` and `maxAmount` to the same amount.
</Tip>

To understand more use cases for Static Charges, [check our in-depth guide](/payments/api/lightning-charges).

## Configuration

### 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 required body="minAmount" type="string">
  Minimum allowed amount for the Static Charge -> in millisatoshis
</ParamField>

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

<ParamField required 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. Maximum of 144 characters.
</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>

<ParamField initialValue="‎" body="identifier" type="string">
  Used for Custom Lightning Addresses (see guide)
</ParamField>

<ResponseExample>
  ```json Response theme={null}
  {
    "message":"Successfully created 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":"Static Charge API Ref",
      "callbackUrl":"https://my-website/zbd-callback",
      "allowedSlots":1000,
      "successMessage":"Congratulations your payment was successful!",
      "status":"active",
      "invoice":{
        "request":"lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy",
        "uri":"lightning:lnurl1dp68gurn8ghj7ctsdyh85etzv4jx2efwd9hj7a3s9aex2ut4v4ehgttnw3shg6tr943ksctjvajhxte5x43nyv34vgcj6vpjxf3z6drpxvmj6wfcvsmz6dtpx56nvwrxxuuxgvf3uzvpfy"
      }
    }
  }
  ```
</ResponseExample>
