Merge pull request #28270 from overleaf/kh-add-stripe-payment-context

[web] add stripe payment context

GitOrigin-RevId: 79dfbb1da0dd6b1d36c68c86debffc1edb169961
This commit is contained in:
Kristina
2025-09-16 08:05:45 +00:00
committed by Copybot
parent 7b3c2b838d
commit c79cc52fcf
7 changed files with 68 additions and 16 deletions
@@ -20,10 +20,12 @@ export type PurchasingAddOnCode = {
code: string
}
type PaymentProviderCoupon = {
export type PaymentProviderCoupon = {
code: string
name: string
description: string
description?: string
isSingleUse?: boolean
discountMonths?: number | null
}
type PaymentProviderRecord = {
@@ -1,3 +1,18 @@
export type ImmediateCharge = {
subtotal: number
tax: number
total: number
discount: number
lineItems: {
planCode: string | null | undefined
description: string
subtotal: number
discount: number
tax: number
isAiAssist: boolean
}[]
}
export type SubscriptionChangePreview = {
change: SubscriptionChangeDescription
currency: string
@@ -6,20 +21,7 @@ export type SubscriptionChangePreview = {
nextPlan: {
annual: boolean
}
immediateCharge: {
subtotal: number
tax: number
total: number
discount: number
lineItems: {
planCode: string | null | undefined
description: string
subtotal: number
discount: number
tax: number
isAiAssist: boolean
}[]
}
immediateCharge: ImmediateCharge
nextInvoice: {
date: string
plan: {
@@ -0,0 +1,12 @@
import { ImmediateCharge } from './subscription-change-preview'
import { PaymentProviderCoupon } from './dashboard/subscription'
import { Plan } from './plan'
export type SubscriptionCreationPreview = {
immediateCharge: ImmediateCharge
taxRate: number
billingCycleInterval: 'month' | 'year'
coupon: PaymentProviderCoupon
trialLength: number | null
plan: Plan
}