# user\_bank\_accounts

## Model

<table><thead><tr><th>Field</th><th>Type</th><th data-type="checkbox">Nullable</th><th>Constraint</th></tr></thead><tbody><tr><td>id</td><td>int4</td><td>false</td><td></td></tr><tr><td>user_id</td><td>int4</td><td>false</td><td>Foreign Key<br>(person table)</td></tr><tr><td>user_account_name</td><td>varchar</td><td>false</td><td></td></tr><tr><td>bank_account_number</td><td>varchar</td><td>false</td><td></td></tr><tr><td>bank_ifsc_code</td><td>varchar</td><td>false</td><td></td></tr><tr><td>is_active</td><td>bool</td><td>true</td><td></td></tr><tr><td>razorpay_fund_account_id</td><td>varchar</td><td>false</td><td></td></tr><tr><td>reference_id</td><td>varchar</td><td>false</td><td></td></tr><tr><td>contact_id</td><td>varchar</td><td>false</td><td></td></tr><tr><td>created_at</td><td>timestamp</td><td>false</td><td></td></tr><tr><td>updated_at</td><td>timestamp</td><td>false</td><td></td></tr></tbody></table>

### Description of fields

#### id

The primary key of the table.

#### user\_id

ID of the user who initiated the payment.

#### user\_account\_name

The name of the user on their bank account.

#### bank\_account\_number

The account number of the user's bank account.

#### bank\_ifsc\_code

The IFSC code for the bank's branch.

#### is\_active

A user can have multiple bank accounts for their user id. This field represents which bank account is currently active for the user. The code ensures that the user has only one bank account active at a time.

#### razorpay\_fund\_account\_id

The fund account id for the corresponding user and bank account as registered on RazorPayX dashboard.

#### reference\_id

This field is required by RazorPayX to register a user's bank account as fund account. This is randomly generated and stored in the system for each bank account entry.

#### contact\_id

The contact id is returned from the RazorPayX API. This represents the contact ID stored on RazorPay side for a user.

#### created\_at

Timestamp at which payment transaction entry was created.

#### updated\_at

Timestamp at which payment transaction entry was last updated.

### RazorpayX Payout API

RazorPayX stores both user details as well as their bank account details at it's send to manage payouts. The user entity is termed as contact, which we store as contact\_id in our table. The bank account is termed as fund account, which we store as razorpay\_fund\_account\_id in our table.
