Struct stripe::PaymentLink

source ·
pub struct PaymentLink {
Show 32 fields pub id: PaymentLinkId, 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 inactive_message: Option<String>, pub invoice_creation: Option<PaymentLinksResourceInvoiceCreation>, pub line_items: Option<List<CheckoutSessionItem>>, pub livemode: bool, pub metadata: Metadata, pub on_behalf_of: Option<Expandable<Account>>, 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

The resource representing a Stripe “PaymentLink”.

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

Fields§

§id: PaymentLinkId

Unique identifier for the object.

§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.

§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.

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

§on_behalf_of: Option<Expandable<Account>>

The account on behalf of which to charge.

See the Connect documentation for details.

§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.

§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.

Implementations§

source

pub fn list( client: &Client, params: &ListPaymentLinks<'_> ) -> Response<List<PaymentLink>>

Returns a list of your payment links.

source

pub fn create( client: &Client, params: CreatePaymentLink<'_> ) -> Response<PaymentLink>

Creates a payment link.

source

pub fn retrieve( client: &Client, id: &PaymentLinkId, expand: &[&str] ) -> Response<PaymentLink>

Retrieve a payment link.

source

pub fn update( client: &Client, id: &PaymentLinkId, params: UpdatePaymentLink<'_> ) -> Response<PaymentLink>

Updates a payment link.

Trait Implementations§

source§

fn clone(&self) -> PaymentLink

Returns a copy 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 default() -> PaymentLink

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

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

type Id = PaymentLinkId

The canonical id type for this object.
source§

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

The id of the object.
source§

fn object(&self) -> &'static str

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

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,