handling stripe disputes/chargeback where renter disputes the charge through their credit card company or bank
This commit is contained in:
@@ -71,7 +71,7 @@ const Rental = sequelize.define("Rental", {
|
||||
allowNull: false,
|
||||
},
|
||||
payoutStatus: {
|
||||
type: DataTypes.ENUM("pending", "completed", "failed"),
|
||||
type: DataTypes.ENUM("pending", "completed", "failed", "on_hold"),
|
||||
allowNull: true,
|
||||
},
|
||||
payoutProcessedAt: {
|
||||
@@ -94,6 +94,43 @@ const Rental = sequelize.define("Rental", {
|
||||
bankDepositFailureCode: {
|
||||
type: DataTypes.STRING,
|
||||
},
|
||||
// Dispute tracking fields (for tracking Stripe payment disputes/chargebacks)
|
||||
stripeDisputeStatus: {
|
||||
type: DataTypes.ENUM("open", "won", "lost", "warning_closed"),
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeId: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeReason: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeAmount: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeCreatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeEvidenceDueBy: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeClosedAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
},
|
||||
stripeDisputeLost: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: false,
|
||||
},
|
||||
stripeDisputeLostAmount: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
},
|
||||
// Refund tracking fields
|
||||
refundAmount: {
|
||||
type: DataTypes.DECIMAL(10, 2),
|
||||
|
||||
Reference in New Issue
Block a user