mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-26 07:31:22 +01:00
Splitting extension into 2, SatsPay Server, a BTCPay Server type extension, and WatchOnly
141 lines
5 KiB
HTML
141 lines
5 KiB
HTML
<q-card>
|
|
<q-card-section>
|
|
<p>SatsPay: Create Onchain/LN charges. Includes webhooks!<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="List pay links">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code><span class="text-blue">GET</span> /pay/api/v1/links</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <invoice_key>}</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>[<pay_link_object>, ...]</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.url_root }}pay/api/v1/links -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 a pay link">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/pay/api/v1/links/<pay_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <invoice_key>}</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 201 CREATED (application/json)
|
|
</h5>
|
|
<code>{"lnurl": <string>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.url_root }}pay/api/v1/links/<pay_id> -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="Create a pay link"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code><span class="text-green">POST</span> /pay/api/v1/links</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</code><br />
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
|
<code>{"description": <string> "amount": <integer>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 201 CREATED (application/json)
|
|
</h5>
|
|
<code>{"lnurl": <string>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X POST {{ request.url_root }}pay/api/v1/links -d
|
|
'{"description": <string>, "amount": <integer>}' -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 a pay link"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-green">PUT</span>
|
|
/pay/api/v1/links/<pay_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</code><br />
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
|
|
<code>{"description": <string>, "amount": <integer>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">
|
|
Returns 200 OK (application/json)
|
|
</h5>
|
|
<code>{"lnurl": <string>}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X PUT {{ request.url_root }}pay/api/v1/links/<pay_id> -d
|
|
'{"description": <string>, "amount": <integer>}' -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="Delete a pay link"
|
|
class="q-pb-md"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-pink">DELETE</span>
|
|
/pay/api/v1/links/<pay_id></code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<code>{"X-Api-Key": <admin_key>}</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 }}pay/api/v1/links/<pay_id>
|
|
-H "X-Api-Key: {{ g.user.wallets[0].adminkey }}"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
</q-expansion-item>
|