payments table

The payments table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to orders and payment_methods. 1 column in refunds references it.

Columns (8)

Columns of the payments table
ColumnTypeConstraintsDescription
iduuidprimary key
order_iduuidnot null, references orders.id
payment_method_iduuidreferences payment_methods.id
statuspayment_statusnot null
amount_centsintegernot null
currencychar(3)not null
processor_referencevarchar(120)unique
captured_attimestamptz

Indexes (1)

  • (order_id, status)

Relationships