payment_transactions

This table is an audit log of all the payment transactions initiated by a user when purchasing a membership plan.

Model

FieldTypeNullableConstraint

id

int4

user_id

int4

Foreign Key (person table)

amount

float8

status

varchar

transaction_id

text

transaction_data

json

data

json

created_at

timestamp

updated_at

timestamp

remarks

text

Description of fields

id

The primary key of the table.

user_id

ID of the user who initiated the payment.

amount

Amount (in INR) involved in the transaction.

status

Status of the transaction.

  1. Initiated - This means that the transaction has been initiated but the user still has to enter their payment details and submit the transaction from their end.

  2. Pending - This means the user has submitted the transaction at their end but Bolbhav's payment provider still hasn't received the amount.

  3. Completed - This means the payment was successful and the amount has been received into Bolbhav's payment provider account.

  4. Failed - This means the payment was unsuccessful for some reasons. The amount wasn't received due to specific reasons.

transaction_id

This is a unique ID of the transaction that Bolbhav uses to mark each transaction.

transaction_data

Data received from payment provider (currently PhonePe). This will include more details about the transaction and the corresponding fields based on the transaction status.

data

This is the Bolbhav data specific to the user's transaction. An example for the format is:

{
  "membership_plan": {
    "id": "unique_days_20",
    "amount": 20,
    "label": "₹20",
    "days": 5,
    "description": "5 दिनों के लिए फशल के नए भाव"
  }
}

created_at

Timestamp at which payment transaction entry was created.

updated_at

Timestamp at which payment transaction entry was last updated.

remarks

Additional remarks for the payment transaction. This value is filled based on the transaction_data returned by the payment provider API. Since reading the whole transaction_data JSON can be difficult for admins, this field is a simplied version of transaction status like reason for failure, backfill entry etc.

Last updated