Skip to main content

Module webhook

Module webhook 

Source
Expand description

Loop Agent SDK - Webhook Handler

Unified handler for Fidel, Square, and Stripe webhooks.

§Security

  • Signature verification BEFORE any processing
  • Privacy layer hashing BEFORE any logging
  • Reject spoofed webhooks at the door

§Flow

Webhook arrives
    ↓
Verify signature (reject if invalid)
    ↓
Extract card_id
    ↓
IMMEDIATELY hash to loop_fp_* (purge raw card_id)
    ↓
Lookup user by fingerprint
    ↓
Execute capture

Structs§

FidelSecrets
FidelTransaction
FidelWebhookPayload
Fidel webhook payload (transaction.clearing event)
NormalizedTransaction
Normalized transaction data from any webhook source
SquareCard
SquareCardDetails
SquareEventData
SquareMoney
SquarePayment
SquarePaymentObject
SquareWebhookPayload
Square webhook payload (payment.completed event)
WebhookContext
Additional context for webhook processing
WebhookHandler
Unified webhook handler
WebhookSecrets
Webhook secrets for signature verification

Enums§

TransactionType
WebhookError
WebhookSource
Detected webhook source

Functions§

parse_fidel_webhook
Parse Fidel webhook and normalize
parse_square_webhook
Parse Square webhook and normalize
verify_fidel_signature
Verify Fidel webhook signature
verify_square_signature
Verify Square webhook signature
verify_stripe_signature
Verify Stripe webhook signature