Payment
The Payment table is designed to store payment information. It includes columns for the brand ID, payment method ID, price ID, coupon ID, user ID, payment type, payment date, completed date, invoice number, description, currency code, amount, fee amount, status, merchant reference number, merchant account buyer, merchant account seller, IP address, notes, referral user ID, commission, shared amount, risk mark, and flags to indicate the user who created or last modified the payment, along with the corresponding date and time.
Table Structure
[ID](bigint,auto-incrementing,primary key): Represents the unique identifier for each payment record.[Brand_ID](bigint,not null): Foreign key referencing the[ID]column of theBrandtable.[Payment_Method_ID](bigint,not null): Foreign key referencing the[ID]column of thePaymentMethodtable.[Price_ID](bigint,nullable): Foreign key referencing the[ID]column of thePricetable.[Coupon_ID](bigint,nullable): Foreign key referencing the[ID]column of theCoupontable.[User_ID](bigint,nullable): Foreign key referencing the[ID]column of theUsertable.[Payment_Type](varchar(50),nullable): Represents the type of payment.[Payment_Date](datetime,nullable): Represents the date and time of the payment.[Completed_Date](datetime,nullable): Represents the date and time when the payment was completed.[Invoice_No](varchar(50),nullable): Represents the invoice number of the payment.[Description](nvarchar(max),nullable): Represents the description of the payment.[Currency_Code](varchar(5),nullable): Represents the currency code of the payment.[Amount](float,nullable): Represents the amount of the payment.[Amount_Fee](float,nullable): Represents the fee amount of the payment.[Status](smallint,not null): Represents the status of the payment.[Merchant_Ref_No](varchar(100),nullable): Represents the merchant reference number of the payment.[Merchant_Account_Buyer](varchar(150),nullable): Represents the merchant account buyer of the payment.[Merchant_Account_Seller](varchar(150),nullable): Represents the merchant account seller of the payment.[IP_Address](varchar(50),nullable): Represents the IP address of the payment.[Notes](nvarchar(1000),nullable): Represents additional notes for the payment.[Referral_User_ID](bigint,nullable): Represents the referral user ID associated with the payment.[Commision](float,nullable): Represents the commission amount of the payment.[Shared_Amount](float,nullable): Represents the shared amount of the payment.[Risk_Mark](tinyint,nullable): Represents the risk mark of the payment.[Modified_By](bigint,nullable): Represents the user who last modified the payment.[Modified_Date](datetime,not null): Represents the date and time when the payment was last modified.[Created_By](bigint,nullable): Represents the user who created the payment.[Created_Date](datetime,not null): Represents the date and time when the payment was created.
Constraints
[PK_Payment]: primary key constraint on the[ID]column.[DF_Payment_ModifiedDate]: default constraint on the[Modified_Date]column with a default value of getutcdate()[DF_Payment_CreatedDate]: default constraint on the[Created_Date]column with a default value of getutcdate()[FK__Payment__Currenc__5303482E]: foreign key constraint on the[Currency_Code]column referencing the[JFW].[Currency] ([Code])
Example Data
1
1
1
NULL
1
card
2021-07-13 13:53:18.000
2021-07-13 13:53:18.000
JFW210713104011205
This is a payment from Stripe - plink_1Mk00OLQsl86R7ov5lJxoB7b
USD
100.00
0.00
1
1234567890
acct_1KKkT3XQsl86R7ov
acct_1KKkT3XQsl86R7ov
115.160.143.60
REF:pi_3Mk02BLQsl86R7ov1FrgxGHF
NULL
0.00
0.00
60
Last updated