class

KemalcrStarter::Infrastructure::Billing::StripeWebhookVerifier

Inherits Reference < Object

Verifies Stripe Stripe-Signature header (t=...,v1=...). Format: signed_payload = "#{timestamp}.#{raw_body}", HMAC-SHA256 with endpoint secret.

Constructors

new(secret : String, tolerance_seconds : Int32 = 300)
Source

Instance methods

verify(payload : String, signature_header : String | Nil, now : Time = Time.utc) : Bool
Source