PATCH
/
v0
/
static-charges
/
{id}
Update Static Charge
curl --request PATCH \
  --url https://api.zebedee.io/v0/static-charges/{id} \
  --header 'Content-Type: application/json' \
  --header 'apikey: <apikey>' \
  --data '{
  "minAmount": "<string>",
  "maxAmount": "<string>",
  "description": "<string>",
  "successMessage": "<string>",
  "allowedSlots": 123,
  "internalId": "<string>",
  "callbackUrl": "<string>"
}'
{
  "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"
    }
  }
}

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

Configuration

Path Parameters

id
string
required
Static Charge ID

Header Parameters

apikey
string
required
ZBD Project API Key
Content-Type
string
Content Type

Body

minAmount
string
Minimum allowed amount for the Static Charge -> in millisatoshis
maxAmount
string
Maximum allowed amount for the Static Charge -> in millisatoshis
description
string
Note or comment for this Static Charge (visible to payer)
successMessage
string
Message displayed to the payer AFTER payment settles
allowedSlots
number
Number of payments this Static Charge can accept
internalId
string
Open metadata string property
callbackUrl
string
The endpoint ZBD will POST Charge updates to
{
  "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"
    }
  }
}