mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
22 lines
535 B
C#
22 lines
535 B
C#
using Breez.Sdk;
|
|
|
|
public class SendSpontaneousPaymentSnippets
|
|
{
|
|
public void SendSpontaneousPayment(BlockingBreezServices sdk)
|
|
{
|
|
// ANCHOR: send-spontaneous-payment
|
|
var nodeId = "...";
|
|
ulong amountMsat = 3_000_000;
|
|
try
|
|
{
|
|
var response = sdk.SendSpontaneousPayment(
|
|
new SendSpontaneousPaymentRequest(nodeId, amountMsat));
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// Handle error
|
|
}
|
|
// ANCHOR_END: send-spontaneous-payment
|
|
}
|
|
}
|