class Stripe::Webhook

Defined in:

stripe/methods/core/webhook/webhook.cr

Constant Summary

DEFAULT_TOLERANCE = 300

Class Method Summary

Class Method Detail

def self.construct_event(payload : String, sig_header : String, secret : String, tolerance : Int32 | Nil = DEFAULT_TOLERANCE) #

Initializes an Event object from a JSON payload.

This may raise JSON::SerializableError if the payload is not valid JSON, or SignatureVerificationError if the signature verification fails.