StripeKit 0.1.1
Stripe integration toolkit for C++
Loading...
Searching...
No Matches
stripekit::WebhookVerificationInput Struct Reference

Everything needed to check a webhook signature. More...

#include <WebhookVerifier.h>

Public Attributes

std::string_view payload
 The request body exactly as received.
std::string_view stripe_signature_header
 Value of the "Stripe-Signature" header.
std::string_view endpoint_secret
 Signing secret for this endpoint, of the form "whsec_...".
std::chrono::system_clock::time_point now
 Current time, used to check the signature's timestamp.
std::chrono::seconds tolerance = std::chrono::minutes(5)
 How far the signature's timestamp may be from now.

Detailed Description

Everything needed to check a webhook signature.

Definition at line 27 of file WebhookVerifier.h.

Member Data Documentation

◆ payload

std::string_view stripekit::WebhookVerificationInput::payload

The request body exactly as received.

The signature covers these precise bytes, so any reformatting, parsing, or character-set conversion beforehand will cause the check to fail.

Definition at line 34 of file WebhookVerifier.h.

◆ stripe_signature_header

std::string_view stripekit::WebhookVerificationInput::stripe_signature_header

Value of the "Stripe-Signature" header.

Definition at line 37 of file WebhookVerifier.h.

◆ endpoint_secret

std::string_view stripekit::WebhookVerificationInput::endpoint_secret

Signing secret for this endpoint, of the form "whsec_...".

Definition at line 40 of file WebhookVerifier.h.

◆ now

std::chrono::system_clock::time_point stripekit::WebhookVerificationInput::now

Current time, used to check the signature's timestamp.

Definition at line 43 of file WebhookVerifier.h.

◆ tolerance

std::chrono::seconds stripekit::WebhookVerificationInput::tolerance = std::chrono::minutes(5)

How far the signature's timestamp may be from now.

Definition at line 46 of file WebhookVerifier.h.


The documentation for this struct was generated from the following file: