webhook

package
v1.0.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler handles Nomod webhook events

func NewHandler

func NewHandler(
	client nomod.NomodClient,
	paymentSvc *nomod.PaymentService,
	invoiceSyncSvc *nomod.InvoiceSyncService,
	entityIntegrationMappingRepo entityintegrationmapping.Repository,
	logger *logger.Logger,
) *Handler

NewHandler creates a new Nomod webhook handler

func (*Handler) HandleWebhookEvent

func (h *Handler) HandleWebhookEvent(ctx context.Context, payload *NomodWebhookPayload, services *ServiceDependencies) error

HandleWebhookEvent processes a Nomod webhook event This function never returns errors to ensure webhooks always return 200 OK All errors are logged internally to prevent Nomod from retrying

type NomodWebhookPayload

type NomodWebhookPayload struct {
	ID            string  `json:"id"`                        // Charge ID (required)
	InvoiceID     *string `json:"invoice_id,omitempty"`      // Present if invoice payment
	PaymentLinkID *string `json:"payment_link_id,omitempty"` // Present if payment link payment
}

NomodWebhookPayload represents incoming webhook from Nomod

type ServiceDependencies

type ServiceDependencies = interfaces.ServiceDependencies

ServiceDependencies contains all service dependencies needed by webhook handlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL