Skip to content

Latest commit

 

History

History
53 lines (49 loc) · 51.2 KB

checkout.md

File metadata and controls

53 lines (49 loc) · 51.2 KB

Checkout

Checkout session data retrieved using an access token.

Fields

Field Type Required Description
CreatedAt time.Time ✔️ Creation timestamp of the object.
ModifiedAt time.Time ✔️ Last modification timestamp of the object.
ID string ✔️ The ID of the object.
CustomFieldData map[string]components.CheckoutCustomFieldData Key-value object storing custom field values.
PaymentProcessor components.PaymentProcessor ✔️ N/A
Status components.CheckoutStatus ✔️ N/A
ClientSecret string ✔️ Client secret used to update and complete the checkout session from the client.
URL string ✔️ URL where the customer can access the checkout session.
ExpiresAt time.Time ✔️ Expiration date and time of the checkout session.
SuccessURL string ✔️ URL where the customer will be redirected after a successful payment.
EmbedOrigin 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 int64 ✔️ Amount in cents, before discounts and taxes.
DiscountAmount int64 ✔️ Discount amount in cents.
NetAmount int64 ✔️ Amount in cents, after discounts but before taxes.
TaxAmount int64 ✔️ Sales tax amount in cents. If null, it means there is no enough information yet to calculate it.
TotalAmount int64 ✔️ Amount in cents, after discounts and taxes.
Currency string ✔️ Currency code of the checkout session.
ProductID string ✔️ ID of the product to checkout.
ProductPriceID string ✔️ ID of the product price to checkout.
DiscountID string ✔️ ID of the discount applied to the checkout.
AllowDiscountCodes bool ✔️ 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.
RequireBillingAddress bool ✔️ 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.
IsDiscountApplicable bool ✔️ Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.
IsFreeProductPrice bool ✔️ Whether the product price is free, regardless of discounts.
IsPaymentRequired bool ✔️ Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.
IsPaymentSetupRequired bool ✔️ Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.
IsPaymentFormRequired bool ✔️ Whether the checkout requires a payment form, whether because of a payment or payment method setup.
CustomerID string ✔️ N/A
CustomerName string ✔️ Name of the customer.
CustomerEmail string ✔️ Email address of the customer.
CustomerIPAddress string ✔️ N/A
CustomerBillingAddress components.Address ✔️ N/A
CustomerTaxID string ✔️ N/A
PaymentProcessorMetadata map[string]string ✔️ N/A
Metadata map[string]components.CheckoutMetadata ✔️ N/A
CustomerExternalID 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.
Products []components.CheckoutProduct ✔️ List of products available to select.
Product components.CheckoutProduct ✔️ Product data for a checkout session.
ProductPrice components.CheckoutProductPrice ✔️ Price of the selected product.
Discount components.CheckoutDiscount ✔️ N/A
SubscriptionID string ✔️ N/A
AttachedCustomFields []components.AttachedCustomField ✔️ N/A
CustomerMetadata map[string]components.CustomerMetadata ✔️ N/A
CustomerBillingAddressFields components.CheckoutCustomerBillingAddressFields ✔️ N/A