refunds table

The refunds table in the E-commerce Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to payments and returns.

Refunds are their own rows. Never subtract from payments.amount_cents.

Columns (8)

Columns of the refunds table
ColumnTypeConstraintsDescription
iduuidprimary key
payment_iduuidnot null, references payments.id
return_iduuidreferences returns.id
statusrefund_statusnot null
amount_centsintegernot null
reasonvarchar(255)
processor_referencevarchar(120)
created_attimestamptznot null

Relationships