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

Settings for register_webhook_handler(). More...

#include <Drogon.h>

Public Attributes

std::string path
 Route to register, for example "/stripe/webhook".
std::string endpoint_secret
 Signing secret for this endpoint, of the form "whsec_...".
WebhookDedupStore & dedup_store
 Where processed event ids are recorded, so each event runs once.
webhooks::EventHandler handler
 Called for claimed events after verification.
Logger * logger = nullptr
 Where to report failures.
std::chrono::seconds tolerance = std::chrono::minutes(5)
 How far the signature's timestamp may be from the current time.
std::chrono::minutes stale_inflight_timeout = defaultStaleInflightTimeout
 How long before a claim left behind by a crashed process is reclaimed.

Detailed Description

Settings for register_webhook_handler().

Definition at line 101 of file Drogon.h.

Member Data Documentation

◆ path

std::string stripekit::drogon::WebhookHandlerOptions::path

Route to register, for example "/stripe/webhook".

Definition at line 103 of file Drogon.h.

◆ endpoint_secret

std::string stripekit::drogon::WebhookHandlerOptions::endpoint_secret

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

The Stripe CLI prints one for local testing; a registered endpoint has its own, shown in the Stripe dashboard.

Definition at line 111 of file Drogon.h.

◆ dedup_store

WebhookDedupStore& stripekit::drogon::WebhookHandlerOptions::dedup_store

Where processed event ids are recorded, so each event runs once.

Must outlive the handler, so use an application-scoped or static object rather than a local.

Definition at line 119 of file Drogon.h.

◆ handler

webhooks::EventHandler stripekit::drogon::WebhookHandlerOptions::handler

Called for claimed events after verification.

Failed attempts may be retried.

Definition at line 122 of file Drogon.h.

◆ logger

Logger* stripekit::drogon::WebhookHandlerOptions::logger = nullptr

Where to report failures.

No logging when null.

Definition at line 125 of file Drogon.h.

◆ tolerance

std::chrono::seconds stripekit::drogon::WebhookHandlerOptions::tolerance = std::chrono::minutes(5)

How far the signature's timestamp may be from the current time.

Definition at line 128 of file Drogon.h.

◆ stale_inflight_timeout

std::chrono::minutes stripekit::drogon::WebhookHandlerOptions::stale_inflight_timeout = defaultStaleInflightTimeout

How long before a claim left behind by a crashed process is reclaimed.

Definition at line 131 of file Drogon.h.


The documentation for this struct was generated from the following file:
  • src/adapters/drogon/include/StripeKit/Adapters/Drogon.h