[][src]Struct stripe::PaymentIntent

pub struct PaymentIntent {
    pub id: String,
    pub allowed_source_types: Vec<String>,
    pub amount: u64,
    pub amount_capturable: u64,
    pub amount_received: u64,
    pub application: Option<String>,
    pub application_fee_amount: Option<u64>,
    pub canceled_at: Option<Timestamp>,
    pub cancellation_reason: Option<CancellationReason>,
    pub capture_method: CaptureMethod,
    pub charges: List<Charge>,
    pub client_secret: Option<String>,
    pub confirmation_method: Option<ConfirmationMethod>,
    pub created: Timestamp,
    pub currency: Currency,
    pub customer: Option<String>,
    pub description: Option<String>,
    pub last_payment_error: Option<PaymentError>,
    pub livemode: bool,
    pub metadata: Metadata,
    pub next_source_action: Option<NextSourceAction>,
    pub on_behalf_of: Option<String>,
    pub receipt_email: Option<String>,
    pub review: Option<String>,
    pub shipping: Option<ShippingDetails>,
    pub source: Option<String>,
    pub statement_descriptor: Option<String>,
    pub status: PaymentIntentStatus,
    pub transfer_data: Option<TransferData>,
    pub transfer_group: Option<String>,
}

The resource representing a Stripe PaymentIntent object.

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

Fields

id: Stringallowed_source_types: Vec<String>amount: u64amount_capturable: u64amount_received: u64application: Option<String>application_fee_amount: Option<u64>canceled_at: Option<Timestamp>cancellation_reason: Option<CancellationReason>capture_method: CaptureMethodcharges: List<Charge>client_secret: Option<String>confirmation_method: Option<ConfirmationMethod>created: Timestampcurrency: Currencycustomer: Option<String>description: Option<String>last_payment_error: Option<PaymentError>livemode: boolmetadata: Metadatanext_source_action: Option<NextSourceAction>on_behalf_of: Option<String>receipt_email: Option<String>review: Option<String>shipping: Option<ShippingDetails>source: Option<String>statement_descriptor: Option<String>status: PaymentIntentStatustransfer_data: Option<TransferData>transfer_group: Option<String>

Methods

impl PaymentIntent[src]

pub fn create(
    client: &Client,
    params: PaymentIntentCreateParams
) -> Response<PaymentIntent>
[src]

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]

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]

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]

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]

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]

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]

List all payment_intents.

For more details see https://stripe.com/docs/api/payment_intents/list.

Trait Implementations

impl Clone for PaymentIntent[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PaymentIntent[src]

impl Serialize for PaymentIntent[src]

impl<'de> Deserialize<'de> for PaymentIntent[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self