pub struct CreatePayout { /* private fields */ }
Expand description
To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error.
If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode.
If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The balance object details available and pending amounts by source type.
Implementations§
Source§impl CreatePayout
impl CreatePayout
Sourcepub fn new(amount: impl Into<i64>, currency: impl Into<Currency>) -> Self
pub fn new(amount: impl Into<i64>, currency: impl Into<Currency>) -> Self
Construct a new CreatePayout
.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
An arbitrary string attached to the object. Often useful for displaying to users.
Sourcepub fn destination(self, destination: impl Into<String>) -> Self
pub fn destination(self, destination: impl Into<String>) -> Self
The ID of a bank account or a card to send the payout to. If you don’t provide a destination, we use the default external account for the specified currency.
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 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 method(self, method: impl Into<CreatePayoutMethod>) -> Self
pub fn method(self, method: impl Into<CreatePayoutMethod>) -> Self
The method used to send this payout, which is standard
or instant
.
We support instant
for payouts to debit cards and bank accounts in certain countries.
Learn more about bank support for Instant Payouts.
Sourcepub fn source_type(self, source_type: impl Into<CreatePayoutSourceType>) -> Self
pub fn source_type(self, source_type: impl Into<CreatePayoutSourceType>) -> Self
The balance type of your Stripe balance to draw this payout from.
Balances for different payment sources are kept separately.
You can find the amounts with the Balances API.
One of bank_account
, card
, or fpx
.
Sourcepub fn statement_descriptor(
self,
statement_descriptor: impl Into<String>,
) -> Self
pub fn statement_descriptor( self, statement_descriptor: impl Into<String>, ) -> Self
A string that displays on the recipient’s bank or card statement (up to 22 characters).
A statement_descriptor
that’s longer than 22 characters return an error.
Most banks truncate this information and display it inconsistently.
Some banks might not display it at all.
Source§impl CreatePayout
impl CreatePayout
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 CreatePayout
impl Clone for CreatePayout
Source§fn clone(&self) -> CreatePayout
fn clone(&self) -> CreatePayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more