mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Webhooks documentation.
This commit is contained in:
21
snippets/rust/src/webhook.rs
Normal file
21
snippets/rust/src/webhook.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Result;
|
||||
use breez_sdk_core::InputType::LnUrlWithdraw;
|
||||
use breez_sdk_core::*;
|
||||
|
||||
async fn webhook(sdk: Arc<BreezServices>) -> Result<()> {
|
||||
// ANCHOR: register-webook
|
||||
sdk.register_webhook("https://yourapplication.com").await?
|
||||
// ANCHOR_END: register-webook
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn payment_webhook(sdk: Arc<BreezServices>) -> Result<()> {
|
||||
// ANCHOR: register-payment-webook
|
||||
sdk.register_webhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>").await?
|
||||
// ANCHOR_END: register-payment-webook
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user