Struct stripe::CheckoutSession [−][src]
The resource representing a Stripe "Session".
Fields
id: CheckoutSessionId
Unique identifier for the object.
Used to pass to redirectToCheckout
in Stripe.js.
allow_promotion_codes: Option<bool>
Enables user redeemable promotion codes.
amount_subtotal: Option<i64>
Total of all items before discounts or taxes are applied.
amount_total: Option<i64>
Total of all items after discounts and taxes are applied.
billing_address_collection: Option<CheckoutSessionBillingAddressCollection>
Describes whether Checkout should collect the customer's billing address.
cancel_url: String
The URL the customer will be directed to if they decide to cancel payment and return to your website.
client_reference_id: Option<String>
A unique string to reference the Checkout Session.
This can be a customer ID, a cart ID, or similar, and can be used to reconcile the Session with your internal systems.
currency: Option<Currency>
Three-letter ISO currency code, in lowercase.
Must be a supported currency.
customer: Option<Expandable<Customer>>
The ID of the customer for this Session.
For Checkout Sessions in payment
or subscription
mode, Checkout
will create a new customer object based on information provided
during the payment flow unless an existing customer was provided when
the Session was created.
customer_details: Option<PaymentPagesCheckoutSessionCustomerDetails>
The customer details including the customer's tax exempt status and the customer's tax IDs.
customer_email: Option<String>
If provided, this value will be used when the Customer object is created. If not provided, customers will be asked to enter their email address. Use this parameter to prefill customer data if you already have an email on file.
To access information about the customer once the payment flow is complete, use the customer
attribute.
line_items: List<CheckoutSessionItem>
The line items purchased by the customer.
livemode: bool
Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
locale: Option<CheckoutSessionLocale>
The IETF language tag of the locale Checkout is displayed in.
If blank or auto
, the browser's locale is used.
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.
mode: CheckoutSessionMode
The mode of the Checkout Session.
payment_intent: Option<Expandable<PaymentIntent>>
The ID of the PaymentIntent for Checkout Sessions in payment
mode.
payment_method_types: Vec<String>
A list of the types of payment methods (e.g.
card) this Checkout Session is allowed to accept.
payment_status: CheckoutSessionPaymentStatus
The payment status of the Checkout Session, one of paid
, unpaid
, or no_payment_required
.
You can use this value to decide when to fulfill your customer's order.
setup_intent: Option<Expandable<SetupIntent>>
The ID of the SetupIntent for Checkout Sessions in setup
mode.
shipping: Option<Shipping>
Shipping information for this Checkout Session.
shipping_address_collection: Option<ShippingAddressCollection>
When set, provides configuration for Checkout to collect a shipping address from a customer.
submit_type: Option<CheckoutSessionSubmitType>
Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button.
submit_type
can only be specified on Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or setup
mode.
subscription: Option<Expandable<Subscription>>
The ID of the subscription for Checkout Sessions in subscription
mode.
success_url: String
The URL the customer will be directed to after the payment or subscription creation is successful.
total_details: Option<PaymentPagesCheckoutSessionTotalDetails>
Tax and discount details for the computed total amount.
Trait Implementations
impl Clone for CheckoutSession
[src]
fn clone(&self) -> CheckoutSession
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CheckoutSession
[src]
impl<'de> Deserialize<'de> for CheckoutSession
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Object for CheckoutSession
[src]
type Id = CheckoutSessionId
The canonical id type for this object.
fn id(&self) -> Self::Id
[src]
fn object(&self) -> &'static str
[src]
impl Serialize for CheckoutSession
[src]
Auto Trait Implementations
impl RefUnwindSafe for CheckoutSession
[src]
impl Send for CheckoutSession
[src]
impl Sync for CheckoutSession
[src]
impl Unpin for CheckoutSession
[src]
impl UnwindSafe for CheckoutSession
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,