pub struct CapturePaymentIntent { /* private fields */ }
Expand description
Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture
.
Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation.
Learn more about separate authorization and capture.
Implementations§
Source§impl CapturePaymentIntent
impl CapturePaymentIntent
Sourcepub fn new(intent: impl Into<PaymentIntentId>) -> Self
pub fn new(intent: impl Into<PaymentIntentId>) -> Self
Construct a new CapturePaymentIntent
.
Sourcepub fn amount_to_capture(self, amount_to_capture: impl Into<i64>) -> Self
pub fn amount_to_capture(self, amount_to_capture: impl Into<i64>) -> Self
The amount to capture from the PaymentIntent, which must be less than or equal to the original amount.
Defaults to the full amount_capturable
if it’s not provided.
Sourcepub fn application_fee_amount(
self,
application_fee_amount: impl Into<i64>,
) -> Self
pub fn application_fee_amount( self, application_fee_amount: impl Into<i64>, ) -> Self
The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner’s Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents use case for connected accounts.
Sourcepub fn expand(self, expand: impl Into<Vec<String>>) -> Self
pub fn expand(self, expand: impl Into<Vec<String>>) -> Self
Specifies which fields in the response should be expanded.
Sourcepub fn final_capture(self, final_capture: impl Into<bool>) -> Self
pub fn final_capture(self, final_capture: impl Into<bool>) -> Self
Defaults to true
.
When capturing a PaymentIntent, setting final_capture
to false
notifies Stripe to not release the remaining uncaptured funds to make sure that they’re captured in future requests.
You can only use this setting when multicapture is available for PaymentIntents.
Sourcepub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
pub fn metadata(self, metadata: impl Into<HashMap<String, String>>) -> Self
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.
Individual keys can be unset by posting an empty value to them.
All keys can be unset by posting an empty value to metadata
.
Sourcepub fn statement_descriptor(
self,
statement_descriptor: impl Into<String>,
) -> Self
pub fn statement_descriptor( self, statement_descriptor: impl Into<String>, ) -> Self
Text that appears on the customer’s statement as the statement descriptor for a non-card charge. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs.
Setting this value for a card charge returns an error. For card charges, set the statement_descriptor_suffix instead.
Sourcepub fn statement_descriptor_suffix(
self,
statement_descriptor_suffix: impl Into<String>,
) -> Self
pub fn statement_descriptor_suffix( self, statement_descriptor_suffix: impl Into<String>, ) -> Self
Provides information about a card charge. Concatenated to the account’s statement descriptor prefix to form the complete statement descriptor that appears on the customer’s statement.
Sourcepub fn transfer_data(
self,
transfer_data: impl Into<CapturePaymentIntentTransferData>,
) -> Self
pub fn transfer_data( self, transfer_data: impl Into<CapturePaymentIntentTransferData>, ) -> Self
The parameters that you can use to automatically create a transfer after the payment is captured. Learn more about the use case for connected accounts.
Source§impl CapturePaymentIntent
impl CapturePaymentIntent
Sourcepub async fn send<C: StripeClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub async fn send<C: StripeClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response.
Sourcepub fn send_blocking<C: StripeBlockingClient>(
&self,
client: &C,
) -> Result<<Self as StripeRequest>::Output, C::Err>
pub fn send_blocking<C: StripeBlockingClient>( &self, client: &C, ) -> Result<<Self as StripeRequest>::Output, C::Err>
Send the request and return the deserialized response, blocking until completion.
Trait Implementations§
Source§impl Clone for CapturePaymentIntent
impl Clone for CapturePaymentIntent
Source§fn clone(&self) -> CapturePaymentIntent
fn clone(&self) -> CapturePaymentIntent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more