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

The details Stripe returned about a failure. More...

#include <Errors.h>

Public Attributes

StripeErrorType type = StripeErrorType::Unknown
 What kind of thing went wrong.
std::string code
 Stripe's specific error code, for example "card_declined".
std::string message
 Stripe's human-readable description of the failure.
int http_status = 0
 HTTP status Stripe returned, or 0 if Stripe was never reached.
std::string request_id
 Id of the failed request in Stripe's logs, of the form "req_...".
bool retryable = false
 True when the same request may succeed if tried again later.

Detailed Description

The details Stripe returned about a failure.

Always log request_id: it identifies the exact call in Stripe's own dashboard logs, which turns most "why did this fail" questions into a quick lookup.

Definition at line 46 of file Errors.h.

Member Data Documentation

◆ type

StripeErrorType stripekit::StripeErrorPayload::type = StripeErrorType::Unknown

What kind of thing went wrong.

Definition at line 48 of file Errors.h.

◆ code

std::string stripekit::StripeErrorPayload::code

Stripe's specific error code, for example "card_declined".

Definition at line 51 of file Errors.h.

◆ message

std::string stripekit::StripeErrorPayload::message

Stripe's human-readable description of the failure.

Definition at line 54 of file Errors.h.

◆ http_status

int stripekit::StripeErrorPayload::http_status = 0

HTTP status Stripe returned, or 0 if Stripe was never reached.

Definition at line 57 of file Errors.h.

◆ request_id

std::string stripekit::StripeErrorPayload::request_id

Id of the failed request in Stripe's logs, of the form "req_...".

Definition at line 60 of file Errors.h.

◆ retryable

bool stripekit::StripeErrorPayload::retryable = false

True when the same request may succeed if tried again later.

Definition at line 63 of file Errors.h.


The documentation for this struct was generated from the following file: