class

Stripe::PaymentLink

Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

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

Constants

ERROR_MESSAGE_FOR_BILLING_ADDRESS_COLLECTION = "invalid value for \"billing_address_collection\", must be one of [auto, required]."
ERROR_MESSAGE_FOR_CUSTOMER_CREATION = "invalid value for \"customer_creation\", must be one of [always, if_required]."
ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [payment_link]."
ERROR_MESSAGE_FOR_PAYMENT_METHOD_COLLECTION = "invalid value for \"payment_method_collection\", must be one of [always, if_required]."
ERROR_MESSAGE_FOR_PAYMENT_METHOD_TYPES = "invalid value for \"payment_method_types\", must be one of [affirm, afterpay_clearpay, alipay, au_becs_debit, bacs_debit, bancontact, blik, boleto, card, cashapp, eps, fpx, giropay, grabpay, ideal, klarna, konbini, link, mobilepay, multibanco, oxxo, p24, paynow, paypal, pix, promptpay, sepa_debit, sofort, swish, twint, us_bank_account, wechat_pay, zip]."
ERROR_MESSAGE_FOR_SUBMIT_TYPE = "invalid value for \"submit_type\", must be one of [auto, book, donate, pay]."
MAX_LENGTH_FOR_ID = 5000
MAX_LENGTH_FOR_INACTIVE_MESSAGE = 5000
MAX_LENGTH_FOR_URL = 5000
VALID_VALUES_FOR_BILLING_ADDRESS_COLLECTION = String.static_array("auto", "required")
VALID_VALUES_FOR_CUSTOMER_CREATION = String.static_array("always", "if_required")
VALID_VALUES_FOR_OBJECT = String.static_array("payment_link")
VALID_VALUES_FOR_PAYMENT_METHOD_COLLECTION = String.static_array("always", "if_required")
VALID_VALUES_FOR_PAYMENT_METHOD_TYPES = String.static_array("affirm", "afterpay_clearpay", "alipay", "au_becs_debit", "bacs_debit", "bancontact", "blik", "boleto", "card", "cashapp", "eps", "fpx", "giropay", "grabpay", "ideal", "klarna", "konbini", "link", "mobilepay", "multibanco", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", "sepa_debit", "sofort", "swish", "twint", "us_bank_account", "wechat_pay", "zip")
VALID_VALUES_FOR_SUBMIT_TYPE = String.static_array("auto", "book", "donate", "pay")

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

active

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.

Source
active=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] active Object to be assigned

Source
after_completion
Source
after_completion=(new_value : Stripe::PaymentLinksResourceAfterCompletion | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] after_completion Object to be assigned

Source
allow_promotion_codes

Whether user redeemable promotion codes are enabled.

Source
allow_promotion_codes=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] allow_promotion_codes Object to be assigned

Source
application
Source
application=(new_value : Stripe::PaymentLinkApplication | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] application Object to be assigned

Source
application_fee_amount

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.

Source
application_fee_amount=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] application_fee_amount Object to be assigned

Source
application_fee_percent

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

Source
application_fee_percent=(new_value : Float64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] application_fee_percent Object to be assigned

Source
automatic_tax
Source
automatic_tax=(new_value : Stripe::PaymentLinksResourceAutomaticTax | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] automatic_tax Object to be assigned

Source
billing_address_collection

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

Source
billing_address_collection=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] billing_address_collection Object to be assigned

Source
currency

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

Source
currency=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned

Source
custom_fields

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

Source
custom_fields=(new_value : Array(Stripe::PaymentLinksResourceCustomFields) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] custom_fields Object to be assigned

Source
custom_text
Source
custom_text=(new_value : Stripe::PaymentLinksResourceCustomText | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] custom_text Object to be assigned

Source
customer_creation

Configuration for Customer creation during checkout.

Source
customer_creation=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] customer_creation Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

id

Unique identifier for the object.

Source
id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned

Source
inactive_message

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

Source
inactive_message=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] inactive_message Object to be assigned

Source
invoice_creation
Source
invoice_creation=(new_value : Stripe::PaymentLinkInvoiceCreation | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] invoice_creation Object to be assigned

Source
line_items
Source
line_items=(new_value : Stripe::PaymentLinksResourceListLineItems | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] line_items Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
livemode

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

Source
livemode=(new_value : Bool | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] livemode Object to be assigned

Source
metadata
Source
metadata=(new_value : Hash(String, String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned

Source
object

String representing the object's type. Objects of the same type share the same value.

Source
object=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned

Source
on_behalf_of
Source
on_behalf_of=(new_value : Stripe::PaymentLinkOnBehalfOf | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] on_behalf_of Object to be assigned

Source
payment_intent_data
Source
payment_intent_data=(new_value : Stripe::PaymentLinkPaymentIntentData | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] payment_intent_data Object to be assigned

Source
payment_method_collection

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

Source
payment_method_collection=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_collection Object to be assigned

Source
payment_method_types

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.

Source
payment_method_types=(new_value : Array(String) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_types Object to be assigned

Source
phone_number_collection
Source
phone_number_collection=(new_value : Stripe::PaymentLinksResourcePhoneNumberCollection | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] phone_number_collection Object to be assigned

Source
restrictions
Source
restrictions=(new_value : Stripe::PaymentLinkRestrictions | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] restrictions Object to be assigned

Source
shipping_address_collection
Source
shipping_address_collection=(new_value : Stripe::PaymentLinkShippingAddressCollection | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] shipping_address_collection Object to be assigned

Source
shipping_options

The shipping rate options applied to the session.

Source
shipping_options=(new_value : Array(Stripe::PaymentLinksResourceShippingOption) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] shipping_options Object to be assigned

Source
submit_type

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

Source
submit_type=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] submit_type Object to be assigned

Source
subscription_data
Source
subscription_data=(new_value : Stripe::PaymentLinkSubscriptionData | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] subscription_data Object to be assigned

Source
tax_id_collection
Source
tax_id_collection=(new_value : Stripe::PaymentLinksResourceTaxIdCollection | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] tax_id_collection Object to be assigned

Source
transfer_data
Source
transfer_data=(new_value : Stripe::PaymentLinkTransferData | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] transfer_data Object to be assigned

Source
url

The public URL that can be shared with customers.

Source
url=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] url Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source