[−][src]Struct stripe::PaymentIntent
The resource representing a Stripe "PaymentIntent".
For more details see https://stripe.com/docs/api/payment_intents/object.
Fields
id: PaymentIntentId
Unique identifier for the object.
amount: i64
Amount intended to be collected by this PaymentIntent.
amount_capturable: Option<i64>
Amount that can be captured from this PaymentIntent.
amount_received: Option<i64>
Amount that was collected by this PaymentIntent.
application: Option<Expandable<Application>>
ID of the Connect application that created the PaymentIntent.
application_fee_amount: Option<i64>
The amount of the application fee (if any) for the resulting payment.
See the PaymentIntents use case for connected accounts for details.
canceled_at: Option<Timestamp>
Populated when status
is canceled
, this is the time at which the PaymentIntent was canceled.
Measured in seconds since the Unix epoch.
cancellation_reason: Option<PaymentIntentCancellationReason>
Reason for cancellation of this PaymentIntent, either user-provided (duplicate
, fraudulent
, requested_by_customer
, or abandoned
) or generated by Stripe internally (failed_invoice
, void_invoice
, or automatic
).
capture_method: PaymentIntentCaptureMethod
Capture method of this PaymentIntent, one of automatic
or manual
.
charges: List<Charge>
Charges that were created by this PaymentIntent, if any.
client_secret: Option<String>
The client secret of this PaymentIntent.
Used for client-side retrieval using a publishable key.
Please refer to our automatic confirmation quickstart guide to learn about how client_secret
should be handled.
confirmation_method: PaymentIntentConfirmationMethod
Confirmation method of this PaymentIntent, one of manual
or automatic
.
created: Timestamp
Time at which the object was created.
Measured in seconds since the Unix epoch.
currency: Currency
Three-letter ISO currency code, in lowercase.
Must be a supported currency.
customer: Option<Expandable<Customer>>
ID of the Customer this PaymentIntent is for if one exists.
description: Option<String>
An arbitrary string attached to the object.
Often useful for displaying to users.
invoice: Option<Expandable<Invoice>>
ID of the invoice that created this PaymentIntent, if it exists.
last_payment_error: Option<PaymentError>
The payment error encountered in the previous PaymentIntent confirmation.
livemode: bool
Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
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. For more information, see the documentation.
next_action: Option<PaymentIntentNextAction>
If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source.
on_behalf_of: Option<Expandable<Account>>
The account (if any) for which the funds of the PaymentIntent are intended.
See the PaymentIntents use case for connected accounts for details.
payment_method: Option<Expandable<PaymentMethod>>
ID of the payment method used in this PaymentIntent.
payment_method_types: Vec<String>
The list of payment method types (e.g.
card) that this PaymentIntent is allowed to use.
receipt_email: Option<String>
Email address that the receipt for the resulting payment will be sent to.
review: Option<Expandable<Review>>
ID of the review associated with this PaymentIntent, if any.
shipping: Option<Shipping>
Shipping information for this PaymentIntent.
source: Option<Expandable<PaymentSource>>
ID of the source used in this PaymentIntent.
statement_descriptor: Option<String>
Extra information about a PaymentIntent.
This will appear on your customer's statement when this PaymentIntent succeeds in creating a charge.
status: PaymentIntentStatus
Status of this PaymentIntent, one of requires_payment_method
, requires_confirmation
, requires_action
, processing
, requires_capture
, canceled
, or succeeded
.
Read more about each PaymentIntent status.
transfer_data: Option<TransferData>
The data with which to automatically create a Transfer when the payment is finalized.
See the PaymentIntents use case for connected accounts for details.
transfer_group: Option<String>
A string that identifies the resulting payment as part of a group.
See the PaymentIntents use case for connected accounts for details.
Methods
impl PaymentIntent
[src]
pub fn create(
client: &Client,
params: PaymentIntentCreateParams
) -> Response<PaymentIntent>
[src]
client: &Client,
params: PaymentIntentCreateParams
) -> Response<PaymentIntent>
Creates a new payment_intent.
For more details see https://stripe.com/docs/api/payment_intents/create.
pub fn retrieve(
client: &Client,
payment_intent_id: &str
) -> Response<PaymentIntent>
[src]
client: &Client,
payment_intent_id: &str
) -> Response<PaymentIntent>
Retrieves the details of a payment_intent.
For more details see https://stripe.com/docs/api/payment_intents/retrieve.
pub fn update(
client: &Client,
payment_intent_id: &str,
params: PaymentIntentUpdateParams
) -> Response<PaymentIntent>
[src]
client: &Client,
payment_intent_id: &str,
params: PaymentIntentUpdateParams
) -> Response<PaymentIntent>
Updates a payment_intent's properties.
For more details see https://stripe.com/docs/api/payment_intents/update.
pub fn confirm(
client: &Client,
payment_intent_id: &str,
params: PaymentIntentConfirmParams
) -> Response<PaymentIntent>
[src]
client: &Client,
payment_intent_id: &str,
params: PaymentIntentConfirmParams
) -> Response<PaymentIntent>
Confirm that customer intends to pay with current or provided source. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
For more details see https://stripe.com/docs/api/payment_intents/confirm.
pub fn capture(
client: &Client,
payment_intent_id: &str,
params: PaymentIntentCaptureParams
) -> Response<PaymentIntent>
[src]
client: &Client,
payment_intent_id: &str,
params: PaymentIntentCaptureParams
) -> Response<PaymentIntent>
Capture the funds of an existing uncaptured PaymentIntent where required_action="requires_capture".
For more details see https://stripe.com/docs/api/payment_intents/capture.
pub fn cancel(
client: &Client,
payment_intent_id: &str,
params: PaymentIntentCancelParams
) -> Response<PaymentIntent>
[src]
client: &Client,
payment_intent_id: &str,
params: PaymentIntentCancelParams
) -> Response<PaymentIntent>
A PaymentIntent object can be canceled when it is in one of these statuses: requires_source, requires_capture, requires_confirmation, requires_source_action.
For more details see https://stripe.com/docs/api/payment_intents/cancel.
pub fn list(
client: &Client,
params: PaymentIntentListParams
) -> Response<List<PaymentIntent>>
[src]
client: &Client,
params: PaymentIntentListParams
) -> Response<List<PaymentIntent>>
List all payment_intents.
For more details see https://stripe.com/docs/api/payment_intents/list.
Trait Implementations
impl Object for PaymentIntent
[src]
type Id = PaymentIntentId
The canonical id type for this object.
fn id(&self) -> Self::Id
[src]
fn object(&self) -> &'static str
[src]
impl Clone for PaymentIntent
[src]
fn clone(&self) -> PaymentIntent
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PaymentIntent
[src]
impl Serialize for PaymentIntent
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for PaymentIntent
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Unpin for PaymentIntent
impl Sync for PaymentIntent
impl Send for PaymentIntent
impl UnwindSafe for PaymentIntent
impl RefUnwindSafe for PaymentIntent
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self