Struct stripe::SetupIntent[][src]

pub struct SetupIntent {
Show 20 fields pub id: SetupIntentId, pub application: Option<Box<Expandable<Application>>>, pub cancellation_reason: Option<Box<SetupIntentCancellationReason>>, pub client_secret: Option<Box<String>>, pub created: Timestamp, pub customer: Option<Box<Expandable<Customer>>>, pub description: Option<Box<String>>, pub last_setup_error: Option<Box<ApiErrors>>, pub latest_attempt: Option<Box<Expandable<SetupAttempt>>>, pub livemode: bool, pub mandate: Option<Box<Expandable<Mandate>>>, pub metadata: Metadata, pub next_action: Option<Box<SetupIntentNextAction>>, pub on_behalf_of: Option<Box<Expandable<Account>>>, pub payment_method: Option<Box<Expandable<PaymentMethod>>>, pub payment_method_options: Option<Box<SetupIntentPaymentMethodOptions>>, pub payment_method_types: Vec<String>, pub single_use_mandate: Option<Box<Expandable<Mandate>>>, pub status: SetupIntentStatus, pub usage: String,
}
Expand description

The resource representing a Stripe “SetupIntent”.

For more details see https://stripe.com/docs/api/setup_intents/object

Fields

id: SetupIntentId

Unique identifier for the object.

application: Option<Box<Expandable<Application>>>

ID of the Connect application that created the SetupIntent.

cancellation_reason: Option<Box<SetupIntentCancellationReason>>

Reason for cancellation of this SetupIntent, one of abandoned, requested_by_customer, or duplicate.

client_secret: Option<Box<String>>

The client secret of this SetupIntent.

Used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.

created: Timestamp

Time at which the object was created.

Measured in seconds since the Unix epoch.

customer: Option<Box<Expandable<Customer>>>

ID of the Customer this SetupIntent belongs to, if one exists.

If present, the SetupIntent’s payment method will be attached to the Customer on successful setup.

Payment methods attached to other Customers cannot be used with this SetupIntent.

description: Option<Box<String>>

An arbitrary string attached to the object.

Often useful for displaying to users.

last_setup_error: Option<Box<ApiErrors>>

The error encountered in the previous SetupIntent confirmation.

latest_attempt: Option<Box<Expandable<SetupAttempt>>>

The most recent SetupAttempt for this SetupIntent.

livemode: bool

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

mandate: Option<Box<Expandable<Mandate>>>

ID of the multi use Mandate generated by the SetupIntent.

metadata: Metadata

Set of key-value pairs that you can attach to an object.

This can be useful for storing additional information about the object in a structured format.

next_action: Option<Box<SetupIntentNextAction>>

If present, this property tells you what actions you need to take in order for your customer to continue payment setup.

on_behalf_of: Option<Box<Expandable<Account>>>

The account (if any) for which the setup is intended.

payment_method: Option<Box<Expandable<PaymentMethod>>>

ID of the payment method used with this SetupIntent.

payment_method_options: Option<Box<SetupIntentPaymentMethodOptions>>

Payment-method-specific configuration for this SetupIntent.

payment_method_types: Vec<String>

The list of payment method types (e.g.

card) that this SetupIntent is allowed to set up.

single_use_mandate: Option<Box<Expandable<Mandate>>>

ID of the single_use Mandate generated by the SetupIntent.

status: SetupIntentStatus

Status of this SetupIntent, one of requires_payment_method, requires_confirmation, requires_action, processing, canceled, or succeeded.

usage: String

Indicates how the payment method is intended to be used in the future.

Use on_session if you intend to only reuse the payment method when the customer is in your checkout flow.

Use off_session if your customer may or may not be in your checkout flow. If not provided, this value defaults to off_session.

Implementations

Returns a list of SetupIntents.

Creates a SetupIntent object.

After the SetupIntent is created, attach a payment method and confirm to collect any required permissions to charge the payment method later.

Retrieves the details of a SetupIntent that has previously been created.

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string. When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

Updates a SetupIntent object.

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

Deserialize this value from the given Serde deserializer. Read more

The canonical id type for this object.

The id of the object.

The object’s type, typically represented in wire format as the object property.

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

Performs the conversion.

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

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

Performs the conversion.

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

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