StripeKit 0.1.1
Stripe integration toolkit for C++
Loading...
Searching...
No Matches
stripekit::drogon::WebhookEndpoint Class Referencefinal

A Drogon route that receives Stripe webhook deliveries. More...

#include <Drogon.h>

Public Member Functions

 WebhookEndpoint (WebhookProcessor &processor, std::string endpoint_secret)
 Creates an endpoint.
void register_handler (std::string path) const
 Adds the route to the Drogon application.

Detailed Description

A Drogon route that receives Stripe webhook deliveries.

Construct this directly only when webhook handling is driven by a stripekit::EventDispatcher; otherwise register_webhook_handler() is simpler.

The processor is referenced, not owned, so it must outlive the registered Drogon route.

Definition at line 200 of file Drogon.h.

Constructor & Destructor Documentation

◆ WebhookEndpoint()

stripekit::drogon::WebhookEndpoint::WebhookEndpoint ( WebhookProcessor & processor,
std::string endpoint_secret )

Creates an endpoint.

Parameters
processorVerifies, de-duplicates, and dispatches deliveries. Must outlive the endpoint.
endpoint_secretSigning secret for this endpoint.

Member Function Documentation

◆ register_handler()

void stripekit::drogon::WebhookEndpoint::register_handler ( std::string path) const

Adds the route to the Drogon application.

Call this before Drogon starts running.

Parameters
pathRoute to register, for example "/stripe/webhook".

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