pub struct CheckoutSessionParams {Show 20 fields
pub products: Vec<Uuid>,
pub metadata: HashMap<String, String>,
pub custom_field_data: HashMap<String, String>,
pub discount_id: Option<Uuid>,
pub allow_discount_codes: bool,
pub require_billing_address: bool,
pub amount: Option<u32>,
pub customer_id: Option<Uuid>,
pub is_business_customer: bool,
pub external_customer_id: Option<String>,
pub customer_name: Option<String>,
pub customer_email: Option<String>,
pub customer_ip_address: Option<String>,
pub customer_billing_name: Option<String>,
pub customer_billing_address: Option<CustomerBillingAddressParams>,
pub customer_tax_id: Option<String>,
pub customer_metadata: HashMap<String, String>,
pub subscription_id: Option<Uuid>,
pub success_url: Option<Url>,
pub embed_origin: Option<String>,
}Fields§
§products: Vec<Uuid>List of product IDs available to select at that checkout. The first one will be selected by default.
metadata: HashMap<String, String>Key-value object allowing you to store additional information.
custom_field_data: HashMap<String, String>Key-value object storing custom field values.
discount_id: Option<Uuid>ID of the discount to apply to the checkout.
allow_discount_codes: boolWhether 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.
require_billing_address: boolWhether 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.
amount: Option<u32>Amount in cents, before discounts and taxes. Only useful for custom prices, it’ll be ignored for fixed and free prices.
customer_id: Option<Uuid>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.
is_business_customer: boolWhether the customer is a business or an individual. If true, the customer will be required to fill their full billing address and billing name.
external_customer_id: Option<String>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.
customer_name: Option<String>Name of the customer.
customer_email: Option<String>Email address of the customer.
customer_ip_address: Option<String>§customer_billing_name: Option<String>§customer_billing_address: Option<CustomerBillingAddressParams>Billing address of the customer.
customer_tax_id: Option<String>§customer_metadata: HashMap<String, String>Key-value object allowing you to store additional information that’ll be copied to the created customer.
subscription_id: Option<Uuid>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.
success_url: Option<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.
embed_origin: Option<String>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.