ConfigurationException(const std::string &message)
Creates a configuration exception.
~ConfigurationException() override
Destroys the exception instance.
~SignatureVerificationException() override
Destroys the exception instance.
SignatureVerificationException(const std::string &message)
Creates a signature verification exception.
const StripeErrorPayload & payload() const noexcept
Returns the details Stripe gave for the failure.
StripeApiException(StripeErrorPayload payload)
Creates an API exception from Stripe's error details.
bool retryable() const noexcept
Returns whether trying the same request again may succeed.
StripeKitException(const std::string &message)
Creates an exception carrying a descriptive message.
~StripeKitException() override
Destroys the exception instance.
StripeErrorType
What kind of thing went wrong, as categorised by Stripe.
@ Idempotency
An idempotency key was reused with different parameters.
@ Card
The card was declined.
@ RateLimit
Too many requests too quickly.
@ Api
Something went wrong on Stripe's side.
@ Unknown
The error could not be categorised.
@ Authentication
The API key is missing, wrong, or revoked.
@ InvalidRequest
The request was malformed, or referred to something that does not exist.
@ ApiConnection
Stripe could not be reached.
@ Permission
The key is valid but not allowed to do this.
The details Stripe returned about a failure.
std::string message
Stripe's human-readable description of the failure.
std::string code
Stripe's specific error code, for example "card_declined".
bool retryable
True when the same request may succeed if tried again later.
int http_status
HTTP status Stripe returned, or 0 if Stripe was never reached.
StripeErrorType type
What kind of thing went wrong.
std::string request_id
Id of the failed request in Stripe's logs, of the form "req_...".