Gyvar docs

Pay over Lightning

Pays a bolt11 invoice or a Lightning address. Send one or the other, never both - two destinations on a money request is not something we will resolve for you. An invoice carries its own amount, so `amount_sat` is REFUSED alongside one. A Lightning address carries none, so it is required there.

POST
/lightning/pay

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.

invoice?string

A bolt11. Mutually exclusive with lightning_address.

lightning_address?string
amount_sat?integer

Required with lightning_address, refused with invoice.

memo?string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/lightning/pay" \  -H "Content-Type: application/json" \  -d '{    "invoice": "lnbc250u1p4fsmyc..."  }'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "reference": "string",    "status": "successful",    "currency": "string",    "decimals": 0,    "amount": "string",    "amount_minor": "string",    "fee": "string",    "fee_minor": "string",    "net": "string",    "net_minor": "string",    "created_at": "2019-08-24T14:15:22Z"  }}