mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Add snippets
This commit is contained in:
19
snippets/python/src/webhook.py
Normal file
19
snippets/python/src/webhook.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import breez_sdk
|
||||
|
||||
def webhook(sdk_services):
|
||||
try:
|
||||
# ANCHOR: register-webook
|
||||
sdk_services.registerWebhook("https://yourapplication.com")
|
||||
# ANCHOR_END: register-webook
|
||||
except Exception as error:
|
||||
print(error)
|
||||
raise
|
||||
|
||||
def paymentWebhook(sdk_services):
|
||||
try:
|
||||
# ANCHOR: register-payment-webook
|
||||
sdk_services.registerWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>")
|
||||
# ANCHOR_END: register-payment-webook
|
||||
except Exception as error:
|
||||
print(error)
|
||||
raise
|
||||
Reference in New Issue
Block a user