pub struct CreatePaymentMethod<'a> {
Show 35 fields pub acss_debit: Option<CreatePaymentMethodAcssDebit>, pub affirm: Option<CreatePaymentMethodAffirm>, pub afterpay_clearpay: Option<CreatePaymentMethodAfterpayClearpay>, pub alipay: Option<CreatePaymentMethodAlipay>, pub au_becs_debit: Option<CreatePaymentMethodAuBecsDebit>, pub bacs_debit: Option<CreatePaymentMethodBacsDebit>, pub bancontact: Option<CreatePaymentMethodBancontact>, pub billing_details: Option<BillingDetails>, pub blik: Option<CreatePaymentMethodBlik>, pub boleto: Option<CreatePaymentMethodBoleto>, pub card: Option<CreatePaymentMethodCardUnion>, pub customer: Option<CustomerId>, pub customer_balance: Option<CreatePaymentMethodCustomerBalance>, pub eps: Option<CreatePaymentMethodEps>, pub expand: &'a [&'a str], pub fpx: Option<CreatePaymentMethodFpx>, pub giropay: Option<CreatePaymentMethodGiropay>, pub grabpay: Option<CreatePaymentMethodGrabpay>, pub ideal: Option<CreatePaymentMethodIdeal>, pub interac_present: Option<CreatePaymentMethodInteracPresent>, pub klarna: Option<CreatePaymentMethodKlarna>, pub konbini: Option<CreatePaymentMethodKonbini>, pub link: Option<CreatePaymentMethodLink>, pub metadata: Option<Metadata>, pub oxxo: Option<CreatePaymentMethodOxxo>, pub p24: Option<CreatePaymentMethodP24>, pub payment_method: Option<PaymentMethodId>, pub paynow: Option<CreatePaymentMethodPaynow>, pub promptpay: Option<CreatePaymentMethodPromptpay>, pub radar_options: Option<CreatePaymentMethodRadarOptions>, pub sepa_debit: Option<CreatePaymentMethodSepaDebit>, pub sofort: Option<CreatePaymentMethodSofort>, pub type_: Option<PaymentMethodTypeFilter>, pub us_bank_account: Option<CreatePaymentMethodUsBankAccount>, pub wechat_pay: Option<CreatePaymentMethodWechatPay>,
}
Expand description

The parameters for PaymentMethod::create.

Fields

acss_debit: Option<CreatePaymentMethodAcssDebit>

If this is an acss_debit PaymentMethod, this hash contains details about the ACSS Debit payment method.

affirm: Option<CreatePaymentMethodAffirm>

If this is an affirm PaymentMethod, this hash contains details about the Affirm payment method.

afterpay_clearpay: Option<CreatePaymentMethodAfterpayClearpay>

If this is an AfterpayClearpay PaymentMethod, this hash contains details about the AfterpayClearpay payment method.

alipay: Option<CreatePaymentMethodAlipay>

If this is an Alipay PaymentMethod, this hash contains details about the Alipay payment method.

au_becs_debit: Option<CreatePaymentMethodAuBecsDebit>

If this is an au_becs_debit PaymentMethod, this hash contains details about the bank account.

bacs_debit: Option<CreatePaymentMethodBacsDebit>

If this is a bacs_debit PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.

bancontact: Option<CreatePaymentMethodBancontact>

If this is a bancontact PaymentMethod, this hash contains details about the Bancontact payment method.

billing_details: Option<BillingDetails>

Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

blik: Option<CreatePaymentMethodBlik>

If this is a blik PaymentMethod, this hash contains details about the BLIK payment method.

boleto: Option<CreatePaymentMethodBoleto>

If this is a boleto PaymentMethod, this hash contains details about the Boleto payment method.

card: Option<CreatePaymentMethodCardUnion>

If this is a card PaymentMethod, this hash contains the user’s card details.

For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. When providing a card number, you must meet the requirements for PCI compliance. We strongly recommend using Stripe.js instead of interacting with this API directly.

customer: Option<CustomerId>

The Customer to whom the original PaymentMethod is attached.

customer_balance: Option<CreatePaymentMethodCustomerBalance>

If this is a customer_balance PaymentMethod, this hash contains details about the CustomerBalance payment method.

eps: Option<CreatePaymentMethodEps>

If this is an eps PaymentMethod, this hash contains details about the EPS payment method.

expand: &'a [&'a str]

Specifies which fields in the response should be expanded.

fpx: Option<CreatePaymentMethodFpx>

If this is an fpx PaymentMethod, this hash contains details about the FPX payment method.

giropay: Option<CreatePaymentMethodGiropay>

If this is a giropay PaymentMethod, this hash contains details about the Giropay payment method.

grabpay: Option<CreatePaymentMethodGrabpay>

If this is a grabpay PaymentMethod, this hash contains details about the GrabPay payment method.

ideal: Option<CreatePaymentMethodIdeal>

If this is an ideal PaymentMethod, this hash contains details about the iDEAL payment method.

interac_present: Option<CreatePaymentMethodInteracPresent>

If this is an interac_present PaymentMethod, this hash contains details about the Interac Present payment method.

klarna: Option<CreatePaymentMethodKlarna>

If this is a klarna PaymentMethod, this hash contains details about the Klarna payment method.

konbini: Option<CreatePaymentMethodKonbini>

If this is a konbini PaymentMethod, this hash contains details about the Konbini payment method.

link: Option<CreatePaymentMethodLink>

If this is an Link PaymentMethod, this hash contains details about the Link payment method.

metadata: Option<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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

oxxo: Option<CreatePaymentMethodOxxo>

If this is an oxxo PaymentMethod, this hash contains details about the OXXO payment method.

p24: Option<CreatePaymentMethodP24>

If this is a p24 PaymentMethod, this hash contains details about the P24 payment method.

payment_method: Option<PaymentMethodId>

The PaymentMethod to share.

paynow: Option<CreatePaymentMethodPaynow>

If this is a paynow PaymentMethod, this hash contains details about the PayNow payment method.

promptpay: Option<CreatePaymentMethodPromptpay>

If this is a promptpay PaymentMethod, this hash contains details about the PromptPay payment method.

radar_options: Option<CreatePaymentMethodRadarOptions>

Options to configure Radar.

See Radar Session for more information.

sepa_debit: Option<CreatePaymentMethodSepaDebit>

If this is a sepa_debit PaymentMethod, this hash contains details about the SEPA debit bank account.

sofort: Option<CreatePaymentMethodSofort>

If this is a sofort PaymentMethod, this hash contains details about the SOFORT payment method.

type_: Option<PaymentMethodTypeFilter>

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.

us_bank_account: Option<CreatePaymentMethodUsBankAccount>

If this is an us_bank_account PaymentMethod, this hash contains details about the US bank account payment method.

wechat_pay: Option<CreatePaymentMethodWechatPay>

If this is an wechat_pay PaymentMethod, this hash contains details about the wechat_pay payment method.

Implementations

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

Returns the “default value” for a type. Read more

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

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

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

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