Struct stripe::PaymentMethod [−][src]
pub struct PaymentMethod {Show 28 fields
pub id: PaymentMethodId,
pub acss_debit: Option<Box<PaymentMethodAcssDebit>>,
pub afterpay_clearpay: Option<Box<PaymentMethodAfterpayClearpay>>,
pub alipay: Option<Box<PaymentFlowsPrivatePaymentMethodsAlipay>>,
pub au_becs_debit: Option<Box<PaymentMethodAuBecsDebit>>,
pub bacs_debit: Option<Box<PaymentMethodBacsDebit>>,
pub bancontact: Option<Box<PaymentMethodBancontact>>,
pub billing_details: BillingDetails,
pub boleto: Option<Box<PaymentMethodBoleto>>,
pub card: Option<Box<CardDetails>>,
pub card_present: Option<Box<CardPresent>>,
pub created: Timestamp,
pub customer: Option<Box<Expandable<Customer>>>,
pub eps: Option<Box<PaymentMethodEps>>,
pub fpx: Option<Box<PaymentMethodFpx>>,
pub giropay: Option<Box<PaymentMethodGiropay>>,
pub grabpay: Option<Box<PaymentMethodGrabpay>>,
pub ideal: Option<Box<PaymentMethodIdeal>>,
pub interac_present: Option<Box<PaymentMethodInteracPresent>>,
pub klarna: Option<Box<PaymentMethodKlarna>>,
pub livemode: bool,
pub metadata: Metadata,
pub oxxo: Option<Box<PaymentMethodOxxo>>,
pub p24: Option<Box<PaymentMethodP24>>,
pub sepa_debit: Option<Box<PaymentMethodSepaDebit>>,
pub sofort: Option<Box<PaymentMethodSofort>>,
pub type_: PaymentMethodType,
pub wechat_pay: Option<Box<PaymentMethodWechatPay>>,
}
Expand description
The resource representing a Stripe “PaymentMethod”.
For more details see https://stripe.com/docs/api/payment_methods/object
Fields
id: PaymentMethodId
Unique identifier for the object.
acss_debit: Option<Box<PaymentMethodAcssDebit>>
afterpay_clearpay: Option<Box<PaymentMethodAfterpayClearpay>>
alipay: Option<Box<PaymentFlowsPrivatePaymentMethodsAlipay>>
au_becs_debit: Option<Box<PaymentMethodAuBecsDebit>>
bacs_debit: Option<Box<PaymentMethodBacsDebit>>
bancontact: Option<Box<PaymentMethodBancontact>>
billing_details: BillingDetails
boleto: Option<Box<PaymentMethodBoleto>>
card: Option<Box<CardDetails>>
card_present: Option<Box<CardPresent>>
created: Timestamp
Time at which the object was created.
Measured in seconds since the Unix epoch.
customer: Option<Box<Expandable<Customer>>>
The ID of the Customer to which this PaymentMethod is saved.
This will not be set when the PaymentMethod has not been saved to a Customer.
eps: Option<Box<PaymentMethodEps>>
fpx: Option<Box<PaymentMethodFpx>>
giropay: Option<Box<PaymentMethodGiropay>>
grabpay: Option<Box<PaymentMethodGrabpay>>
ideal: Option<Box<PaymentMethodIdeal>>
interac_present: Option<Box<PaymentMethodInteracPresent>>
klarna: Option<Box<PaymentMethodKlarna>>
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.
oxxo: Option<Box<PaymentMethodOxxo>>
p24: Option<Box<PaymentMethodP24>>
sepa_debit: Option<Box<PaymentMethodSepaDebit>>
sofort: Option<Box<PaymentMethodSofort>>
type_: PaymentMethodType
The type of the PaymentMethod.
An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
wechat_pay: Option<Box<PaymentMethodWechatPay>>
Implementations
Returns a list of PaymentMethods.
For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods.
Creates a PaymentMethod object.
Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js. Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.
pub fn retrieve(
client: &Client,
id: &PaymentMethodId,
expand: &[&str]
) -> Response<PaymentMethod>
pub fn retrieve(
client: &Client,
id: &PaymentMethodId,
expand: &[&str]
) -> Response<PaymentMethod>
Retrieves a PaymentMethod object.
pub fn update(
client: &Client,
id: &PaymentMethodId,
params: UpdatePaymentMethod<'_>
) -> Response<PaymentMethod>
pub fn update(
client: &Client,
id: &PaymentMethodId,
params: UpdatePaymentMethod<'_>
) -> Response<PaymentMethod>
Updates a PaymentMethod object.
A PaymentMethod must be attached a customer to be updated.
pub fn attach(
client: &Client,
payment_method_id: &PaymentMethodId,
params: AttachPaymentMethod
) -> Response<PaymentMethod>
pub fn attach(
client: &Client,
payment_method_id: &PaymentMethodId,
params: AttachPaymentMethod
) -> Response<PaymentMethod>
Attach a payment method to a customer
For more details see https://stripe.com/docs/api/payment_methods/attach.
pub fn detach(
client: &Client,
payment_method_id: &PaymentMethodId
) -> Response<PaymentMethod>
pub fn detach(
client: &Client,
payment_method_id: &PaymentMethodId
) -> Response<PaymentMethod>
Detach a PaymentMethod from a Customer
For more details see https://stripe.com/docs/api/payment_methods/detach.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for PaymentMethod
impl Send for PaymentMethod
impl Sync for PaymentMethod
impl Unpin for PaymentMethod
impl UnwindSafe for PaymentMethod
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more