pub struct CheckoutSession {Show 46 fields
pub created_at: DateTime<Utc>,
pub modified_at: Option<DateTime<Utc>>,
pub id: Uuid,
pub payment_processor: PaymentProcessor,
pub status: CheckoutSessionStatus,
pub client_secret: String,
pub url: Url,
pub expires_at: DateTime<Utc>,
pub success_url: Url,
pub embed_origin: Option<String>,
pub amount: u32,
pub discount_amount: u32,
pub net_amount: u32,
pub tax_amount: Option<u32>,
pub total_amount: u32,
pub currency: String,
pub product_id: Uuid,
pub product_price_id: Uuid,
pub discount_id: Option<Uuid>,
pub allow_discount_codes: bool,
pub require_billing_address: bool,
pub is_discount_applicable: bool,
pub is_free_product_price: bool,
pub is_payment_required: bool,
pub is_payment_setup_required: bool,
pub is_payment_form_required: bool,
pub customer_id: Option<Uuid>,
pub is_business_customer: bool,
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<CustomerBillingAddress>,
pub customer_tax_id: Option<String>,
pub payment_processor_metadata: HashMap<String, String>,
pub billing_address_fields: BillingAddressFields,
pub metadata: HashMap<String, String>,
pub external_customer_id: Option<String>,
pub products: Vec<CheckoutProduct>,
pub product: CheckoutProduct,
pub product_price: Price,
pub discount: Option<Discount>,
pub subscription_id: Option<Uuid>,
pub attached_custom_fields: Vec<AttachedCustomField>,
pub customer_metadata: HashMap<String, String>,
pub custom_field_data: HashMap<String, Option<String>>,
}Fields§
§created_at: DateTime<Utc>Creation timestamp of the object.
modified_at: Option<DateTime<Utc>>Last modification timestamp of the object.
id: UuidThe ID of the object.
payment_processor: PaymentProcessorPayment processor used.
status: CheckoutSessionStatusStatus of the checkout session.
client_secret: StringClient secret used to update and complete the checkout session from the client.
url: UrlURL where the customer can access the checkout session.
expires_at: DateTime<Utc>Expiration date and time of the checkout session.
success_url: Url§embed_origin: Option<String>When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.
amount: u32Amount in cents, before discounts and taxes.
discount_amount: u32Discount amount in cents.
net_amount: u32Amount in cents, after discounts but before taxes.
tax_amount: Option<u32>Sales tax amount in cents. If null, it means there is no enough information yet to calculate it.
total_amount: u32Amount in cents, after discounts and taxes.
currency: StringCurrency code of the checkout session.
product_id: UuidID of the product to checkout.
product_price_id: UuidID of the product price to checkout.
discount_id: Option<Uuid>ID of the discount applied 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.
is_discount_applicable: boolWhether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.
is_free_product_price: boolWhether the product price is free, regardless of discounts.
is_payment_required: boolWhether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.
is_payment_setup_required: boolWhether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.
is_payment_form_required: boolWhether the checkout requires a payment form, whether because of a payment or payment method setup.
customer_id: Option<Uuid>§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.
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<CustomerBillingAddress>Billing address of the customer.
customer_tax_id: Option<String>§payment_processor_metadata: HashMap<String, String>§billing_address_fields: BillingAddressFieldsDetermine which billing address fields should be disabled, optional or required in the checkout form.
metadata: HashMap<String, String>§external_customer_id: Option<String>§products: Vec<CheckoutProduct>List of products available to select.
product: CheckoutProductProduct selected to checkout.
product_price: PricePrice of the selected product.
discount: Option<Discount>Schema for a percentage discount that is applied on every invoice for a certain number of months.
subscription_id: Option<Uuid>§attached_custom_fields: Vec<AttachedCustomField>§customer_metadata: HashMap<String, String>§custom_field_data: HashMap<String, Option<String>>