Merge pull request #108 from breez/webhooks

Webhooks documentation.
This commit is contained in:
Roei Erez
2023-12-17 14:42:44 +02:00
committed by GitHub
12 changed files with 394 additions and 2 deletions

21
snippets/go/webhook.go Normal file
View File

@@ -0,0 +1,21 @@
package example
import (
"log"
)
func Webhook() {
// ANCHOR: register-webook
if err := sdk.RegisterWebhook("https://yourapplication.com"); err != nil {
log.Printf("Webhook registration failed: %v", err)
}
// ANCHOR_END: register-webook
}
func PaymentWebhook() {
// ANCHOR: register-payment-webook
if err := sdk.RegisterWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>"); err != nil {
log.Printf("Webhook registration failed: %v", err)
}
// ANCHOR_END: register-payment-webook
}