1{
2    "$schema": "http://json-schema.org/draft-07/schema#",
3    "type": "object",
4    "additionalProperties": false,
5    "required": [ "label", "payment_hash", "status", "description", "expires_at" ],
6    "properties": {
7	"label": {
8	    "type": "string",
9	    "description": "the label for the invoice"
10	},
11	"bolt11": {
12	    "type": "string",
13	    "description": "the bolt11 string (always present unless **bolt12** is)"
14	},
15	"bolt12": {
16	    "type": "string",
17	    "description": "the bolt12 string instead of **bolt11** (**experimental-offers** only)"
18	},
19	"payment_hash": {
20	    "type": "hex",
21	    "description": "the hash of the *payment_preimage* which will prove payment",
22	    "maxLength": 64,
23	    "minLength": 64
24	},
25	"amount_msat": {
26	    "type": "msat",
27	    "description": "The amount of the invoice (if it has one)"
28	},
29	"status": {
30	    "type": "string",
31	    "enum": [ "paid", "expired", "unpaid" ],
32	    "description": "Whether it has been paid, or can no longer be paid"
33	},
34	"description": {
35	    "type": "string",
36	    "description": "Description extracted from **bolt11** or **bolt12**"
37	},
38	"expires_at": {
39	    "type": "u64",
40	    "description": "UNIX timestamp of when invoice expires (or expired)"
41	},
42	"pay_index": {
43	    "type": "u64",
44	    "description": "Incrementing id for when this was paid (**status** *paid* only)"
45	},
46	"amount_received_msat": {
47	    "type": "msat",
48	    "description": "Amount actually received (**status** *paid* only)"
49	},
50	"paid_at": {
51	    "type": "u64",
52	    "description": "UNIX timestamp of when invoice was paid (**status** *paid* only)"
53	},
54	"payment_preimage": {
55	    "type": "hex",
56	    "description": "the proof of payment: SHA256 of this **payment_hash**",
57	    "maxLength": 64,
58	    "minLength": 64
59	},
60	"local_offer_id": {
61	    "type": "hex",
62	    "description": "the *id* of our offer which created this invoice (**experimental-offers** only).",
63	    "maxLength": 64,
64	    "minLength": 64
65	},
66	"payer_note": {
67	    "type": "string",
68	    "description": "the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only)."
69	}
70    }
71}
72