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: BillingDetailsboleto: 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.

Retrieves a PaymentMethod object.

Updates a PaymentMethod object.

A PaymentMethod must be attached a customer to be updated.

Attach a payment method to a customer

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

Detach a PaymentMethod from a Customer

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

The canonical id type for this object.

The id of the object.

The object’s type, typically represented in wire format as the object property.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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