pub struct ApiErrors {
    pub charge: Option<String>,
    pub code: Option<String>,
    pub decline_code: Option<String>,
    pub doc_url: Option<String>,
    pub message: Option<String>,
    pub param: Option<String>,
    pub payment_intent: Option<PaymentIntent>,
    pub payment_method: Option<PaymentMethod>,
    pub payment_method_type: Option<String>,
    pub setup_intent: Option<SetupIntent>,
    pub source: Option<ApiErrorsSourceUnion>,
    pub type_: ApiErrorsType,
}
Expand description

The resource representing a Stripe “APIErrors”.

Fields

charge: Option<String>

For card errors, the ID of the failed charge.

code: Option<String>

For some errors that could be handled programmatically, a short string indicating the error code reported.

decline_code: Option<String>

For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one.

doc_url: Option<String>

A URL to more information about the error code reported.

message: Option<String>

A human-readable message providing more details about the error.

For card errors, these messages can be shown to your users.

param: Option<String>

If the error is parameter-specific, the parameter related to the error.

For example, you can use this to display a message near the correct form field.

payment_intent: Option<PaymentIntent>payment_method: Option<PaymentMethod>payment_method_type: Option<String>

If the error is specific to the type of payment method, the payment method type that had a problem.

This field is only populated for invoice-related errors.

setup_intent: Option<SetupIntent>source: Option<ApiErrorsSourceUnion>

The source object for errors returned on a request involving a source.

type_: ApiErrorsType

The type of error returned.

One of api_error, card_error, idempotency_error, or invalid_request_error.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more