Gyvar docs

Create an invoice

Creates an invoice for a fixed amount. Every call creates a new one, so a retried request gives you a second invoice - only one can be paid, and unpaid invoices expire. Needs the `receive` capability.

POST
/lightning/invoices

Authorization

KeyID Timestamp Nonce Signature
X-Gyvar-Key<token>

Your key id, gyv_k_live_... or gyv_k_sandbox_....

In: header

X-Gyvar-Timestamp<token>

Unix seconds. Must be within 5 minutes of our clock.

In: header

X-Gyvar-Nonce<token>

A unique value per request. Replays are rejected.

In: header

X-Gyvar-Signature<token>

Ed25519 signature over the canonical string. See the Signing guide.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

amount_sat*integer

Amount in sats.

Range1 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/lightning/invoices" \  -H "Content-Type: application/json" \  -d '{    "amount_sat": 25000  }'
{  "data": {    "invoice": "string",    "amount_sat": 0,    "expires_at": "2019-08-24T14:15:22Z"  }}