mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-26 15:42:30 +01:00
* initial commit * add docs * black & prettier * mobile styles * add print view * prettier * make format * initial migrations un-messed * make migrations work for sqlite * add invoices table * clean migrations * add migration to conv * fix card size * hopefully fix test migration * add missing status * timestamp * init testing * remove draft invoice by default on create * what should i test * make format * raise if not invoice * new test and renaming * fix issue reported by @talvasconcelos which prevented users from setting status on creation * readme * run black * trying to make tests work * make it work again * send paid amount * partial pay flow * good coding * can't get these test to work * clean up and commenting * make format * validation for 2 decimals Co-authored-by: ben <ben@arc.wales> Co-authored-by: Tiago vasconcelos <talvasconcelos@gmail.com>
153 lines
5.2 KiB
HTML
153 lines
5.2 KiB
HTML
<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 Invoices">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span> /invoices/api/v1/invoices</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>[<invoice_object>, ...]</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url }}invoices/api/v1/invoices -H
|
|
"X-Api-Key: <invoice_key>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
|
|
<q-expansion-item group="api" dense expand-separator label="Fetch Invoice">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/invoices/api/v1/invoice/{invoice_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 200 OK (application/json)
|
|
</h5>
|
|
<code>{invoice_object}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url
|
|
}}invoices/api/v1/invoice/{invoice_id} -H "X-Api-Key:
|
|
<invoice_key>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
|
|
<q-expansion-item group="api" dense expand-separator label="Create Invoice">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">POST</span> /invoices/api/v1/invoice</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>{invoice_object}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X POST {{ request.base_url }}invoices/api/v1/invoice -H
|
|
"X-Api-Key: <invoice_key>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
|
|
<q-expansion-item group="api" dense expand-separator label="Update Invoice">
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">POST</span>
|
|
/invoices/api/v1/invoice/{invoice_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 200 OK (application/json)
|
|
</h5>
|
|
<code>{invoice_object}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X POST {{ request.base_url
|
|
}}invoices/api/v1/invoice/{invoice_id} -H "X-Api-Key:
|
|
<invoice_key>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="Create Invoice Payment"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">POST</span>
|
|
/invoices/api/v1/invoice/{invoice_id}/payments</code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<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>{payment_object}</code>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X POST {{ request.base_url
|
|
}}invoices/api/v1/invoice/{invoice_id}/payments -H "X-Api-Key:
|
|
<invoice_key>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
|
|
<q-expansion-item
|
|
group="api"
|
|
dense
|
|
expand-separator
|
|
label="Check Invoice Payment Status"
|
|
>
|
|
<q-card>
|
|
<q-card-section>
|
|
<code
|
|
><span class="text-blue">GET</span>
|
|
/invoices/api/v1/invoice/{invoice_id}/payments/{payment_hash}</code
|
|
>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
|
|
<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>
|
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
|
<code
|
|
>curl -X GET {{ request.base_url
|
|
}}invoices/api/v1/invoice/{invoice_id}/payments/{payment_hash} -H
|
|
"X-Api-Key: <invoice_key>"
|
|
</code>
|
|
</q-card-section>
|
|
</q-card>
|
|
</q-expansion-item>
|
|
</q-expansion-item>
|