Global Feed Post Login
Replying to Avatar Vitor Pamplona

We need to figure out how to make automatic payments while avoiding double-spending when the Zap Event disappears. It does happen (the relay used for the zap event goes off-line, or is cleaned up, etc). Since Zap Events are not spread in as many relays as possible, it is likely that a client might not see it and try to pay again.

Ideally, the subscription payment is made by the NWC service directly for 2 reasons: the service is always online (which means it won't miss a payment just because the user hasn't connected in a while) and the service knows when it already paid for that subscription better than any client would. The only issue is on how to avoid two NWC services paying the same subscription...

Avatar
Kwinten 2y ago

Do you think it would be a good idea to send the zapped event together with the invoice to the NWC service? That way the service can easily show what the payment was for to the user, if it was a subscription zap or a one-off zap, and can easily verify that it did not pay too many times in case of a subscription.

Reply to this note

Please Login to reply.

Discussion

Avatar
Kwinten 2y ago

Avoiding double payments by 2 different NWC services would be hard. But I don’t think it will happen that much tbh

Thread collapsed