payment_methods table
The payment_methods table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 1 foreign key to customers. 1 column in payments references it.
Display fragments and a processor token only. Raw card data never touches this database.
Columns (8)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| customer_id | uuid | not null, references customers.id | |
| brand | varchar(40) | ||
| last4 | char(4) | ||
| exp_month | smallint | ||
| exp_year | smallint | ||
| processor_token | varchar(255) | not null | |
| is_default | boolean | not null |
Relationships
payment_methods.customer_idreferencescustomers.idpayments.payment_method_idreferencespayment_methods