refund and delayed charge

This commit is contained in:
jackiettran
2025-09-04 16:44:47 -04:00
parent b59fc07fc3
commit b22e4fa910
19 changed files with 1255 additions and 594 deletions

View File

@@ -106,12 +106,19 @@ export interface Rental {
endDateTime: string;
totalAmount: number;
// Fee tracking fields
baseRentalAmount?: number;
platformFee?: number;
processingFee?: number;
payoutAmount?: number;
status: "pending" | "confirmed" | "active" | "completed" | "cancelled";
paymentStatus: "pending" | "paid" | "refunded";
// Refund tracking fields
refundAmount?: number;
refundProcessedAt?: string;
refundReason?: string;
stripeRefundId?: string;
cancelledBy?: "renter" | "owner";
cancelledAt?: string;
stripePaymentIntentId?: string;
stripePaymentMethodId?: string;
// Payout status tracking
payoutStatus?: "pending" | "processing" | "completed" | "failed";
payoutProcessedAt?: string;
@@ -185,3 +192,12 @@ export interface ItemRequestResponse {
createdAt: string;
updatedAt: string;
}
export interface RefundPreview {
canCancel: boolean;
cancelledBy: "renter" | "owner";
refundAmount: number;
refundPercentage: number;
reason: string;
totalAmount: number;
}