StripeKit is a C++20 toolkit for integrating Stripe subscription billing into an application: creating customers and Checkout sessions, offering a self-serve billing portal, and reacting to the webhooks Stripe sends afterwards.
It keeps the Stripe work separate from the web framework underneath, so the same billing code runs whichever framework the host application uses.
Getting started
- Overview — what StripeKit does and how the pieces fit together.
- Quickstart — a working integration, step by step.
Reference
- Application API — the API applications use to talk to Stripe.
- Stripe Client — customers, Checkout, subscriptions, billing portal.
- Stripe Models — the Stripe objects StripeKit returns.
- Webhooks — verifying deliveries and handling each event once.
- Errors — the exceptions StripeKit throws.
- Async Support — coroutine and callback plumbing.
- Logging — routing diagnostics into the host application's log.
- Adapter API — framework integration.
Examples
Runnable programs live in the examples/ directory of the source tree:
- CheckoutSessionCli — creates a Checkout session from the command line.
- BillingPortalCli — creates a billing portal session.
- WebhookSignature — the smallest possible verified webhook endpoint.
- DrogonCheckoutDemo — the full flow inside a Drogon server.
Project documentation
Build instructions and test setup are in the project README.md.
License
BSD-3-Clause. See LICENSE.