Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/interfaces/payment-stripe/entities/price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ interface IPrice extends IEntity {
updatedAt?: Date;
product?: IProduct;
metadata?: Record<string, any> | null;
customUnitAmount?: {
enabled: boolean;
preset?: number;
minimum?: number;
maximum?: number;
};
}

export default IPrice;
2 changes: 0 additions & 2 deletions src/interfaces/payment-stripe/entities/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ interface ITransaction extends IEntity {
entityId?: string;
// Smallest currency unit amount
amount?: number;
// Custom amount paid by user for PWYW transactions (in cents)
customAmount?: number;
// Smallest currency unit tax
tax?: number;
// Smallest currency unit fee
Expand Down
8 changes: 7 additions & 1 deletion src/interfaces/payment-stripe/methods/price/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ interface IPriceCreateInput {
productId: string;
currency: string;
userId: string;
unitAmount: number;
unitAmount?: number; // Optional when customUnitAmount is provided
metadata?: Record<string, any>;
customUnitAmount?: {
enabled: boolean;
preset?: number;
minimum?: number;
maximum?: number;
};
}

interface IPriceCreateOutput {
Expand Down
Loading