diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 892fba3fe..1ef5093f5 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -148,6 +148,10 @@ const tutorialSidebar = [ "/tutorials/building-a-node-with-ldk/opening-a-channel", "Opening a Channel", ], + [ + "/tutorials/building-a-node-with-ldk/sending-payments", + "Sending Payments", + ], ], }, ], diff --git a/docs/tutorials/building-a-node-with-ldk/sending-payments.md b/docs/tutorials/building-a-node-with-ldk/sending-payments.md new file mode 100644 index 000000000..f12d8544a --- /dev/null +++ b/docs/tutorials/building-a-node-with-ldk/sending-payments.md @@ -0,0 +1,169 @@ +# Sending Payments + +Lightning payments are used to pay invoices, which are typically encoded as a +string in accordance with BOLT 11. After parsing the invoice, you'll need to +find a route from your node to the recipient and then make the payment using +`ChannelManager`. + + + + + + + +An event is generated once a payment has completed. Successful payments result +in a `PaymentSent` event with the preimage of the payment hash. Be sure to look +out for a `PaymentFailed` event, if the payment fails for some reason, and act +accordingly. + + + + +