Struct stripe::generated::checkout::payment_link::CreatePaymentLink
source · pub struct CreatePaymentLink<'a> {Show 28 fields
pub after_completion: Option<CreatePaymentLinkAfterCompletion>,
pub allow_promotion_codes: Option<bool>,
pub application_fee_amount: Option<i64>,
pub application_fee_percent: Option<f64>,
pub automatic_tax: Option<CreatePaymentLinkAutomaticTax>,
pub billing_address_collection: Option<PaymentLinkBillingAddressCollection>,
pub consent_collection: Option<CreatePaymentLinkConsentCollection>,
pub currency: Option<Currency>,
pub custom_fields: Option<Vec<CreatePaymentLinkCustomFields>>,
pub custom_text: Option<CreatePaymentLinkCustomText>,
pub customer_creation: Option<PaymentLinkCustomerCreation>,
pub expand: &'a [&'a str],
pub inactive_message: Option<&'a str>,
pub invoice_creation: Option<CreatePaymentLinkInvoiceCreation>,
pub line_items: Vec<CreatePaymentLinkLineItems>,
pub metadata: Option<Metadata>,
pub on_behalf_of: Option<&'a str>,
pub payment_intent_data: Option<CreatePaymentLinkPaymentIntentData>,
pub payment_method_collection: Option<PaymentLinkPaymentMethodCollection>,
pub payment_method_types: Option<Vec<CreatePaymentLinkPaymentMethodTypes>>,
pub phone_number_collection: Option<CreatePaymentLinkPhoneNumberCollection>,
pub restrictions: Option<CreatePaymentLinkRestrictions>,
pub shipping_address_collection: Option<CreatePaymentLinkShippingAddressCollection>,
pub shipping_options: Option<Vec<CreatePaymentLinkShippingOptions>>,
pub submit_type: Option<PaymentLinkSubmitType>,
pub subscription_data: Option<CreatePaymentLinkSubscriptionData>,
pub tax_id_collection: Option<CreatePaymentLinkTaxIdCollection>,
pub transfer_data: Option<CreatePaymentLinkTransferData>,
}
Expand description
The parameters for PaymentLink::create
.
Fields§
§after_completion: Option<CreatePaymentLinkAfterCompletion>
Behavior after the purchase is complete.
allow_promotion_codes: Option<bool>
Enables user redeemable promotion codes.
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.
Can only be applied when there are no line items with recurring prices.
application_fee_percent: Option<f64>
A non-negative decimal between 0 and 100, with at most two decimal places.
This represents the percentage of the subscription invoice total that will be transferred to the application owner’s Stripe account. There must be at least 1 line item with a recurring price to use this field.
automatic_tax: Option<CreatePaymentLinkAutomaticTax>
Configuration for automatic tax collection.
billing_address_collection: Option<PaymentLinkBillingAddressCollection>
Configuration for collecting the customer’s billing address.
consent_collection: Option<CreatePaymentLinkConsentCollection>
Configure fields to gather active consent from customers.
currency: Option<Currency>
Three-letter ISO currency code, in lowercase.
Must be a supported currency and supported by each line item’s price.
custom_fields: Option<Vec<CreatePaymentLinkCustomFields>>
Collect additional information from your customer using custom fields.
Up to 3 fields are supported.
custom_text: Option<CreatePaymentLinkCustomText>
Display additional text for your customers using custom text.
customer_creation: Option<PaymentLinkCustomerCreation>
Configures whether checkout sessions created by this payment link create a Customer.
expand: &'a [&'a str]
Specifies which fields in the response should be expanded.
inactive_message: Option<&'a str>
The custom message to be displayed to a customer when a payment link is no longer active.
invoice_creation: Option<CreatePaymentLinkInvoiceCreation>
Generate a post-purchase Invoice for one-time payments.
line_items: Vec<CreatePaymentLinkLineItems>
The line items representing what is being sold.
Each line item represents an item being sold. Up to 20 line items are supported.
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
.
Metadata associated with this Payment Link will automatically be copied to checkout sessions created by this payment link.
on_behalf_of: Option<&'a str>
The account on behalf of which to charge.
payment_intent_data: Option<CreatePaymentLinkPaymentIntentData>
A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in payment
mode.
payment_method_collection: Option<PaymentLinkPaymentMethodCollection>
Specify whether Checkout should collect a payment method.
When set to if_required
, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. Can only be set in subscription
mode. If you’d like information on how to collect a payment method outside of Checkout, read the guide on configuring subscriptions with a free trial.
payment_method_types: Option<Vec<CreatePaymentLinkPaymentMethodTypes>>
The list of payment method types that customers can use.
If no value is passed, Stripe will dynamically show relevant payment methods from your payment method settings (20+ payment methods supported).
phone_number_collection: Option<CreatePaymentLinkPhoneNumberCollection>
Controls phone number collection settings during checkout.
We recommend that you review your privacy policy and check with your legal contacts.
restrictions: Option<CreatePaymentLinkRestrictions>
Settings that restrict the usage of a payment link.
shipping_address_collection: Option<CreatePaymentLinkShippingAddressCollection>
Configuration for collecting the customer’s shipping address.
shipping_options: Option<Vec<CreatePaymentLinkShippingOptions>>
The shipping rate options to apply to checkout sessions created by this payment link.
submit_type: Option<PaymentLinkSubmitType>
Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button.
Changing this value will also affect the hostname in the url property (example: donate.stripe.com
).
subscription_data: Option<CreatePaymentLinkSubscriptionData>
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: Option<CreatePaymentLinkTaxIdCollection>
Controls tax ID collection during checkout.
transfer_data: Option<CreatePaymentLinkTransferData>
The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
Implementations§
source§impl<'a> CreatePaymentLink<'a>
impl<'a> CreatePaymentLink<'a>
pub fn new(line_items: Vec<CreatePaymentLinkLineItems>) -> Self
Trait Implementations§
source§impl<'a> Clone for CreatePaymentLink<'a>
impl<'a> Clone for CreatePaymentLink<'a>
source§fn clone(&self) -> CreatePaymentLink<'a>
fn clone(&self) -> CreatePaymentLink<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more