StripeKit 0.1.1
Stripe integration toolkit for C++
Loading...
Searching...
No Matches
stripekit Namespace Reference

Async.h. More...

Namespaces

namespace  webhooks
 Webhooks.h.

Classes

class  Task
 The result of an asynchronous StripeKit operation. More...
class  OnceCallback
 Makes a callback safe to hand to code that might fire it more than once. More...
struct  CreateCustomerRequest
 Describes the customer to create. More...
struct  CreateCheckoutSessionRequest
 Describes the Checkout session to create. More...
struct  CreateBillingPortalSessionRequest
 Describes the billing portal session to create. More...
class  Customers
 Creates and retrieves Stripe customers. More...
class  CheckoutSessions
 Creates Stripe-hosted Checkout sessions. More...
class  Checkout
 Groups the Checkout operations. More...
class  Subscriptions
 Retrieves and cancels Stripe subscriptions. More...
class  BillingPortalSessions
 Creates billing portal sessions. More...
class  BillingPortal
 Groups the billing portal operations. More...
class  StripeClient
 The entry point for talking to Stripe. More...
struct  StripeErrorPayload
 The details Stripe returned about a failure. More...
class  StripeKitException
 Base class for every exception StripeKit throws. More...
class  StripeApiException
 Thrown when Stripe rejects a request, or cannot be reached. More...
class  SignatureVerificationException
 Thrown when a webhook delivery cannot be trusted. More...
class  ConfigurationException
 Thrown when StripeKit is set up in a way it cannot work with. More...
struct  Customer
 A Stripe customer: the account everything else is billed against. More...
struct  CheckoutSession
 A Stripe Checkout session: one attempt by a customer to pay or subscribe. More...
struct  Subscription
 A Stripe subscription: a customer's recurring agreement to pay. More...
struct  Invoice
 A Stripe invoice: the bill for one subscription period. More...
struct  BillingPortalSession
 A Stripe billing portal session: a short-lived link to the self-serve billing page. More...
struct  EventEnvelope
 A Stripe event, as delivered by a webhook. More...
struct  RequestOptions
 Per-call settings accepted by every client operation. More...
struct  VerifiedEventSignal
 A verified event, with the delivery details that came with it. More...
class  EventDispatcher
 Handles verified webhook events, for applications using WebhookProcessor. More...
struct  HttpRequest
 A request StripeKit wants sent to Stripe. More...
struct  HttpResponse
 Stripe's answer to a request. More...
class  HTTPClient
 Sends StripeKit's requests to Stripe. More...
struct  LogContext
 Extra identifiers attached to a log entry. More...
class  Logger
 Receives StripeKit's log entries. More...
class  NullLogger
 A logger that discards everything. More...
class  ConsoleLogger
 A logger that writes to the process's standard error stream. More...
class  SqliteWebhookDedupStore
 A de-duplication store that uses a SQLite database. More...
class  StripeResponseParser
 Turns Stripe's responses into StripeKit models. More...
class  JsonStripeResponseParser
 The response parser StripeKit uses by default. More...
class  StripeApiClient
 The StripeClient implementation, built on any HTTPClient. More...
struct  ClaimRequest
 Asks the store to reserve an event id. More...
struct  ClaimResult
 The store's answer to a ClaimRequest. More...
class  WebhookDedupStore
 Remembers which webhook events have been handled. More...
class  InMemoryWebhookDedupStore
 A de-duplication store that keeps everything in memory. More...
struct  WebhookProcessorOptions
 Tuning for WebhookProcessor. More...
class  WebhookProcessor
 Handles incoming webhook deliveries through an EventDispatcher. More...
struct  WebhookVerificationInput
 Everything needed to check a webhook signature. More...
 What was learned from a signature that checked out. More...
class  WebhookSignatureVerifier
 Checks that a webhook delivery really came from Stripe. More...
class  DefaultWebhookSignatureVerifier
 The signature verifier StripeKit uses by default. More...

Typedefs

template<typename TResult>
using CallbackResult = std::variant<TResult, std::exception_ptr>
 Result passed to a completion callback: either the value, or the failure.

Enumerations

enum class  StripeErrorType {
  StripeErrorType::Api , StripeErrorType::Card , StripeErrorType::Idempotency , StripeErrorType::InvalidRequest ,
  StripeErrorType::Authentication , StripeErrorType::Permission , StripeErrorType::RateLimit , StripeErrorType::ApiConnection ,
  StripeErrorType::Unknown
}
 What kind of thing went wrong, as categorised by Stripe. More...
enum class  EventDispatchResult { EventDispatchResult::Handled , EventDispatchResult::Ignored , EventDispatchResult::RetryableFailure , EventDispatchResult::FatalFailure }
 What a webhook handler reports back about an event. More...
enum class  HttpMethod { HttpMethod::Get , HttpMethod::Post , HttpMethod::Delete }
 HTTP method for a Stripe API request. More...
enum class  LogLevel {
  LogLevel::Trace , LogLevel::Debug , LogLevel::Info , LogLevel::Warn ,
  LogLevel::Error , LogLevel::Off
}
 Severity of a log entry. More...
enum class  ClaimOutcome {
  ClaimOutcome::Claimed , ClaimOutcome::DuplicateProcessed , ClaimOutcome::DuplicateInflight , ClaimOutcome::RetryableStoreError ,
  ClaimOutcome::FatalStoreError
}
 The result of trying to reserve an event for processing. More...
enum class  WebhookResponseAction { WebhookResponseAction::AcknowledgeSuccess , WebhookResponseAction::RetryLater }
 What to tell Stripe about a delivery. More...

Functions

std::string_view version ()
 Returns the StripeKit version as a "major.minor.patch" string.
int version_major ()
 Returns the major version number.
int version_minor ()
 Returns the minor version number.
int version_patch ()
 Returns the patch version number.
std::string_view build_id ()
 Returns the identifier of the source revision this build came from.
std::string_view build_date ()
 Returns the date this build was produced.
bool is_sensitive_field_name (std::string_view field_name)
 Reports whether a field is one whose value should never be logged.
std::string redact_sensitive_value (std::string_view value)
 Replaces a secret value with a placeholder.
std::string redact_sensitive_text (std::string_view text)
 Strips secret-looking tokens out of free-form text.
bool sqlite_dedup_store_is_available ()
 Reports whether this build can use SqliteWebhookDedupStore.
WebhookResponseAction map_claim_outcome_to_response (ClaimOutcome outcome)
 Works out what to tell Stripe, given a claim outcome.

Variables

constexpr std::chrono::minutes defaultStaleInflightTimeout { 15 }
 How long an unfinished claim is honoured before another process may take it.

Detailed Description

Async.h.

WebhookVerifier.h.

WebhookProcessor.h.

WebhookDedupStore.h.

StripeApiClient.h.

Logging.h.

HTTPClient.h.

Events.h.

StripeKit.h.

RequestOptions.h.

Models.h.

Errors.h.

Client.h.

Callback.h.

Coroutine task primitives used by StripeKit async methods.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Callback compatibility helpers for exactly-once completion semantics.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

The Stripe client for creating customers, checkout sessions, subscriptions, and billing portal sessions.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Exception and error payload types for StripeKit public APIs.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Core Stripe object models exposed by StripeKit.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Shared per-request options for outbound Stripe API calls.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

A library for interacting with the Stripe API.

Umbrella header: including this pulls in the whole application API, and is the simplest starting point. Individual headers can be included instead when a translation unit only needs part of it.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Verified webhook signal structures and dispatch interfaces.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Backend API used to communicate with Stripe's REST API.

Author
Hans de Ruiter
License:
See LICENSE for details.

System for StripeKit logging..

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Implementation of the StripeKit client API.

Author
Hans de Ruiter
License:
See LICENSE for details.

Webhook event-id tracking used to prevent processing the same event twice.

Author
Hans de Ruiter
License:
See LICENSE.md for details.

Coordinates verified Stripe webhook event handling and de-duplication.

Author
Hans de Ruiter
License:
See LICENSE for details.

Stripe webhook signature verification interfaces and default verifier.

Author
Hans de Ruiter
License:
See LICENSE.md for details.