Skip to content
CheckoutPreviewResultObject

Side-effect-free preview used by checkout UIs to show line totals as the customer types a discount code or gift-card code, before committing to purchase. Pricing rules apply first, the discount code subtracts, then tax is computed on the post-discount line; the gift card covers the resulting tax-inclusive total up to its balanceRemaining. The customer pays amountDueCents via Stripe.

Fields

subtotalInt!
pricingRuleAppliedPricingRule
discountCodeAppliedDiscountCode
discountCentsInt!
taxCentsInt!

Sales tax computed on the post-discount line. Zero when the business has tax collection disabled or the line is exempt.

totalInt!

Post-discount, tax-inclusive line total — subtotal − discountCents + taxCents. This is the amount the gift card is applied against and that the buyer owes in total (split between gift card and Stripe).

taxCalculationIdString

Stripe Tax calculation reference (taxcalc_…) that callers should pass back into purchaseProduct / registerForActivity so the numbers the buyer saw on the preview are the ones charged. Null when no tax was computed.

giftCardAppliedProductPurchase
giftCardCreditCentsInt!
amountDueCentsInt!
errors[OperationError!]!

Used in

CheckoutPreviewResult