<p>AMP static invoices are a little different than normal payments. In typical lightning payments, the receiver generates the preimage which is hashed and sent to the sender via the invoice.</p>
<p>With Atomic Multi-Path Payments, the preimage must be a little more complicated to facilitate multiple payment routes, and therefore must be sender generated. Since the sender is in charge of generating the preimage, every payment to an AMP invoice can be unique.</p>
<p>A visual explanation on just how the base preimage is created and sharded <a href="https://wiki.ion.radar.tech/tech/research/atomic-multi-path-payments" rel="nofollow noreferrer">can be found here</a></p>

CC BY-SA 4.0
2022-02-07T08:27:18.763Z
This answers the question. But now I am wondering: As per spec the invoice should still have a payment hash value in it. How is this value then generated in a AMP invoice, and is it used at all? And does this not technically violate the spec?
PyrolitePancake
CC BY-SA 4.0
2022-02-23T00:10:16.107Z
Bolt11 is a specific kind of invoice. AMP doesn't comply because it's slated for a different Bolt (Bolt4). See https://github.com/lightning/bolts/pull/658
arshbot
CC BY-SA 4.0
2022-02-03T19:38:37.257Z
2022-02-03T19:38:37.257Z
arshbot
<p>I have heard that there are static AMP invoices that can be reused multiple times (at least in LND). But previously I understood that you should never reuse the same paymenthash, because you could loose funds.</p>
<p>So how does these static invoices get around that? I suppose you have to put <em>some</em> hash in the HTCL?</p>

<lightning-network><invoices><atomic-multi-path-payments>
How can AMP invoices be static in Lightning?
PyrolitePancake
# How can AMP invoices be static in Lightning?

(Asked by: username_0 on 2021-12-03)

I have heard that there are static AMP invoices that can be reused multiple times (at least in LND). But previously I understood that you should never reuse the same paymenthash, because you could loose funds.

So how does these static invoices get around that? I suppose you have to put *some* hash in the HTCL?

**Tags:** lightning-network, invoices, atomic-multi-path-payments


---

## 1 answers

### Answer by username_1 on 2022-02-03. Score: 1 | Accepted answer

AMP static invoices are a little different than normal payments. In typical lightning payments, the receiver generates the preimage which is hashed and sent to the sender via the invoice.

With Atomic Multi-Path Payments, the preimage must be a little more complicated to facilitate multiple payment routes, and therefore must be sender generated. Since the sender is in charge of generating the preimage, every payment to an AMP invoice can be unique.

A visual explanation on just how the base preimage is created and sharded [can be found here](https://wiki.ion.radar.tech/tech/research/atomic-multi-path-payments)

> **Comments:**
> **username_0**: This answers the question. But now I am wondering: As per spec the invoice should still have a payment hash value in it. How is this value then generated in a AMP invoice, and is it used at all? And does this not technically violate the spec?  
> **username_1**: Bolt11 is a specific kind of invoice. AMP doesn't comply because it's slated for a different Bolt (Bolt4). See https://github.com/lightning/bolts/pull/658  

---

