struct

Polar::Models::CheckoutProductCreate

Inherits JSON::Serializable < Struct < Value < Object

Model representing a CheckoutProductCreate

This struct is auto-generated from the Polar.sh OpenAPI specification. It uses JSON::Serializable for automatic JSON parsing and serialization.

Constructors

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

Instance methods

allow_discount_codes

Whether to allow the customer to apply discount codes. If you apply a discount through discount_id, it'll still be applied, but the customer won't be able to change it.

Source
amount
Source
custom_field_data

Key-value object storing custom field values.

Source
customer_billing_address
Source
customer_billing_name
Source
customer_email
Source
customer_id

ID of an existing customer in the organization. The customer data will be pre-filled in the checkout form. The resulting order will be linked to this customer.

Source
customer_ip_address
Source
customer_metadata

Key-value object allowing you to store additional information that'll be copied to the created customer.

The key must be a string with a maximum length of 40 characters. The value must be either:

A string with a maximum length of 500 characters An integer A floating-point number A boolean

You can store up to 50 key-value pairs.

Source
customer_name
Source
customer_tax_id
Source
discount_id

ID of the discount to apply to the checkout.

Source
embed_origin

If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Polar iframe to communicate with the parent page.

Source
external_customer_id

ID of the customer in your system. If a matching customer exists on Polar, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.

Source
is_business_customer

Whether the customer is a business or an individual. If true, the customer will be required to fill their full billing address and billing name.

Source
metadata

Key-value object allowing you to store additional information.

The key must be a string with a maximum length of 40 characters. The value must be either:

A string with a maximum length of 500 characters An integer A floating-point number A boolean

You can store up to 50 key-value pairs.

Source
product_id

ID of the product to checkout. First available price will be selected.

Source
require_billing_address

Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to true.

Source
return_url

When set, a back button will be shown in the checkout to return to this URL.

Source
seats

Number of seats for seat-based pricing. Required for seat-based products.

Source
subscription_id

ID of a subscription to upgrade. It must be on a free pricing. If checkout is successful, metadata set on this checkout will be copied to the subscription, and existing keys will be overwritten.

Source
success_url

URL where the customer will be redirected after a successful payment.You can add the checkout_id={CHECKOUT_ID} query parameter to retrieve the checkout session id.

Source
trial_interval

The interval unit for the trial period.

Source
trial_interval_count

The number of interval units for the trial period.

Source