<q-card>
  <q-card-section>
    <p>
      SatsPayServer, create Onchain/LN charges.<br />WARNING: If using with the
      WatchOnly extension, we highly reccomend using a fresh extended public Key
      specifically for SatsPayServer!<br />
      <small>
        Created by, <a href="https://github.com/benarc">Ben Arc</a></small
      >
    </p>
  </q-card-section>
  <q-expansion-item
    group="extras"
    icon="swap_vertical_circle"
    label="API info"
    :content-inset-level="0.5"
  >
    <q-expansion-item group="api" dense expand-separator label="Create charge">
      <q-card>
        <q-card-section>
          <code
            ><span class="text-blue">POST</span> /satspay/api/v1/charge</code
          >
          <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
          <code>{"X-Api-Key": &lt;admin_key&gt;}</code><br />
          <h5 class="text-caption q-mt-sm q-mb-none">
            Body (application/json)
          </h5>
          <h5 class="text-caption q-mt-sm q-mb-none">
            Returns 200 OK (application/json)
          </h5>
          <code>[&lt;charge_object&gt;, ...]</code>
          <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
          <code
            >curl -X POST {{ request.url_root }}api/v1/charge -d
            '{"onchainwallet": &lt;string, watchonly_wallet_id&gt;,
            "description": &lt;string&gt;, "webhook":&lt;string&gt;, "time":
            &lt;integer&gt;, "amount": &lt;integer&gt;, "lnbitswallet":
            &lt;string, lnbits_wallet_id&gt;}' -H "Content-type:
            application/json" -H "X-Api-Key: {{g.user.wallets[0].adminkey }}"
          </code>
        </q-card-section>
      </q-card>
    </q-expansion-item>
    <q-expansion-item group="api" dense expand-separator label="Update charge">
      <q-card>
        <q-card-section>
          <code
            ><span class="text-blue">PUT</span>
            /satspay/api/v1/charge/&lt;charge_id&gt;</code
          >
          <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
          <code>{"X-Api-Key": &lt;admin_key&gt;}</code><br />
          <h5 class="text-caption q-mt-sm q-mb-none">
            Body (application/json)
          </h5>
          <h5 class="text-caption q-mt-sm q-mb-none">
            Returns 200 OK (application/json)
          </h5>
          <code>[&lt;charge_object&gt;, ...]</code>
          <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
          <code
            >curl -X POST {{ request.url_root }}api/v1/charge/&lt;charge_id&gt;
            -d '{"onchainwallet": &lt;string, watchonly_wallet_id&gt;,
            "description": &lt;string&gt;, "webhook":&lt;string&gt;, "time":
            &lt;integer&gt;, "amount": &lt;integer&gt;, "lnbitswallet":
            &lt;string, lnbits_wallet_id&gt;}' -H "Content-type:
            application/json" -H "X-Api-Key: {{g.user.wallets[0].adminkey }}"
          </code>
        </q-card-section>
      </q-card>
    </q-expansion-item>

    <q-expansion-item group="api" dense expand-separator label="Get charge">
      <q-card>
        <q-card-section>
          <code
            ><span class="text-blue">GET</span>
            /satspay/api/v1/charge/&lt;charge_id&gt;</code
          >
          <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
          <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
          <h5 class="text-caption q-mt-sm q-mb-none">
            Body (application/json)
          </h5>
          <h5 class="text-caption q-mt-sm q-mb-none">
            Returns 200 OK (application/json)
          </h5>
          <code>[&lt;charge_object&gt;, ...]</code>
          <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
          <code
            >curl -X GET {{ request.url_root }}api/v1/charge/&lt;charge_id&gt;
            -H "X-Api-Key: {{ g.user.wallets[0].inkey }}"
          </code>
        </q-card-section>
      </q-card>
    </q-expansion-item>
    <q-expansion-item group="api" dense expand-separator label="Get charges">
      <q-card>
        <q-card-section>
          <code
            ><span class="text-blue">GET</span> /satspay/api/v1/charges</code
          >
          <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
          <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
          <h5 class="text-caption q-mt-sm q-mb-none">
            Body (application/json)
          </h5>
          <h5 class="text-caption q-mt-sm q-mb-none">
            Returns 200 OK (application/json)
          </h5>
          <code>[&lt;charge_object&gt;, ...]</code>
          <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
          <code
            >curl -X GET {{ request.url_root }}api/v1/charges -H "X-Api-Key: {{
            g.user.wallets[0].inkey }}"
          </code>
        </q-card-section>
      </q-card>
    </q-expansion-item>
    <q-expansion-item
      group="api"
      dense
      expand-separator
      label="Delete a pay link"
      class="q-pb-md"
    >
      <q-card>
        <q-card-section>
          <code
            ><span class="text-pink">DELETE</span>
            /satspay/api/v1/charge/&lt;charge_id&gt;</code
          >
          <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
          <code>{"X-Api-Key": &lt;admin_key&gt;}</code><br />
          <h5 class="text-caption q-mt-sm q-mb-none">Returns 204 NO CONTENT</h5>
          <code></code>
          <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
          <code
            >curl -X DELETE {{ request.url_root
            }}api/v1/charge/&lt;charge_id&gt; -H "X-Api-Key: {{
            g.user.wallets[0].adminkey }}"
          </code>
        </q-card-section>
      </q-card>
    </q-expansion-item>
    <q-expansion-item group="api" dense expand-separator label="Get balances">
      <q-card>
        <q-card-section>
          <code
            ><span class="text-blue">GET</span>
            /satspay/api/v1/charges/balance/&lt;charge_id&gt;</code
          >
          <h5 class="text-caption q-mt-sm q-mb-none">
            Body (application/json)
          </h5>
          <h5 class="text-caption q-mt-sm q-mb-none">
            Returns 200 OK (application/json)
          </h5>
          <code>[&lt;charge_object&gt;, ...]</code>
          <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
          <code
            >curl -X GET {{ request.url_root
            }}api/v1/charges/balance/&lt;charge_id&gt; -H "X-Api-Key: {{
            g.user.wallets[0].inkey }}"
          </code>
        </q-card-section>
      </q-card>
    </q-expansion-item>
  </q-expansion-item>
</q-card>
