Struct PaymentLink

Source
pub struct PaymentLink {
Show 33 fields pub active: bool, pub after_completion: PaymentLinksResourceAfterCompletion, pub allow_promotion_codes: bool, pub application: Option<Expandable<Application>>, pub application_fee_amount: Option<i64>, pub application_fee_percent: Option<f64>, pub automatic_tax: PaymentLinksResourceAutomaticTax, pub billing_address_collection: PaymentLinkBillingAddressCollection, pub consent_collection: Option<PaymentLinksResourceConsentCollection>, pub currency: Currency, pub custom_fields: Vec<PaymentLinksResourceCustomFields>, pub custom_text: PaymentLinksResourceCustomText, pub customer_creation: PaymentLinkCustomerCreation, pub id: PaymentLinkId, pub inactive_message: Option<String>, pub invoice_creation: Option<PaymentLinksResourceInvoiceCreation>, pub line_items: Option<List<CheckoutSessionItem>>, pub livemode: bool, pub metadata: HashMap<String, String>, pub on_behalf_of: Option<Expandable<Account>>, pub optional_items: Option<Vec<PaymentLinksResourceOptionalItem>>, pub payment_intent_data: Option<PaymentLinksResourcePaymentIntentData>, pub payment_method_collection: PaymentLinkPaymentMethodCollection, pub payment_method_types: Option<Vec<PaymentLinkPaymentMethodTypes>>, pub phone_number_collection: PaymentLinksResourcePhoneNumberCollection, pub restrictions: Option<PaymentLinksResourceRestrictions>, pub shipping_address_collection: Option<PaymentLinksResourceShippingAddressCollection>, pub shipping_options: Vec<PaymentLinksResourceShippingOption>, pub submit_type: PaymentLinkSubmitType, pub subscription_data: Option<PaymentLinksResourceSubscriptionData>, pub tax_id_collection: PaymentLinksResourceTaxIdCollection, pub transfer_data: Option<PaymentLinksResourceTransferData>, pub url: String,
}
Expand description

A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times.

When a customer opens a payment link it will open a new checkout session to render the payment page. You can use checkout session events to track payments through payment links.

Related guide: Payment Links API

For more details see <https://stripe.com/docs/api/payment_links/payment_links/object>.

Fields§

§active: bool

Whether the payment link’s url is active. If false, customers visiting the URL will be shown a page saying that the link has been deactivated.

§after_completion: PaymentLinksResourceAfterCompletion§allow_promotion_codes: bool

Whether user redeemable promotion codes are enabled.

§application: Option<Expandable<Application>>

The ID of the Connect application that created the Payment Link.

§application_fee_amount: Option<i64>

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.

§application_fee_percent: Option<f64>

This represents the percentage of the subscription invoice total that will be transferred to the application owner’s Stripe account.

§automatic_tax: PaymentLinksResourceAutomaticTax§billing_address_collection: PaymentLinkBillingAddressCollection

Configuration for collecting the customer’s billing address. Defaults to auto.

§consent_collection: Option<PaymentLinksResourceConsentCollection>

When set, provides configuration to gather active consent from customers.

§currency: Currency

Three-letter ISO currency code, in lowercase. Must be a supported currency.

§custom_fields: Vec<PaymentLinksResourceCustomFields>

Collect additional information from your customer using custom fields. Up to 3 fields are supported.

§custom_text: PaymentLinksResourceCustomText§customer_creation: PaymentLinkCustomerCreation

Configuration for Customer creation during checkout.

§id: PaymentLinkId

Unique identifier for the object.

§inactive_message: Option<String>

The custom message to be displayed to a customer when a payment link is no longer active.

§invoice_creation: Option<PaymentLinksResourceInvoiceCreation>

Configuration for creating invoice for payment mode payment links.

§line_items: Option<List<CheckoutSessionItem>>

The line items representing what is being sold.

§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: HashMap<String, String>

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.

§on_behalf_of: Option<Expandable<Account>>

The account on behalf of which to charge. See the Connect documentation for details.

§optional_items: Option<Vec<PaymentLinksResourceOptionalItem>>

The optional items presented to the customer at checkout.

§payment_intent_data: Option<PaymentLinksResourcePaymentIntentData>

Indicates the parameters to be passed to PaymentIntent creation during checkout.

§payment_method_collection: PaymentLinkPaymentMethodCollection

Configuration for collecting a payment method during checkout. Defaults to always.

§payment_method_types: Option<Vec<PaymentLinkPaymentMethodTypes>>

The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you’ve enabled in your payment method settings.

§phone_number_collection: PaymentLinksResourcePhoneNumberCollection§restrictions: Option<PaymentLinksResourceRestrictions>

Settings that restrict the usage of a payment link.

§shipping_address_collection: Option<PaymentLinksResourceShippingAddressCollection>

Configuration for collecting the customer’s shipping address.

§shipping_options: Vec<PaymentLinksResourceShippingOption>

The shipping rate options applied to the session.

§submit_type: PaymentLinkSubmitType

Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.

§subscription_data: Option<PaymentLinksResourceSubscriptionData>

When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use subscription_data.

§tax_id_collection: PaymentLinksResourceTaxIdCollection§transfer_data: Option<PaymentLinksResourceTransferData>

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.

§url: String

The public URL that can be shared with customers.

Trait Implementations§

Source§

fn clone(&self) -> PaymentLink

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

fn begin(out: &mut Option<Self>) -> &mut dyn Visitor

The only correct implementation of this method is: Read more
Source§

type Id = PaymentLinkId

The canonical id type for this object.
Source§

fn id(&self) -> &Self::Id

The id of the object.
Source§

fn into_id(self) -> Self::Id

The owned id of the object.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.