dim_payment_instrument


Description

One row per stored payment method, resolving the customer whose account it belongs to. Standard instruments include cards, BACS/ACH/BECS direct debit, TWINT, and PayPal. The separate bank-account-backed direct-debit mechanism is represented as one payment_instrument_type = 'BANK_ACCOUNT_DIRECT_DEBIT' row per bank account, with lifecycle dates from the selected current mandate. This storage layer also underlies non-Swiss SEPA Direct Debit and Swiss LSV+/CH-DD processing; the warehouse label does not distinguish those downstream schemes. There is no flag identifying ‘the’ currently-used instrument when more than one row exists for a customer; consumers must interpret current_status and is_archived themselves. The status-history fact contains only standard payment-instrument events.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
payment_instrument_id int8 19 null
fct_payment_instrument_status_history.payment_instrument_id fct_payment_instrument_status_history_payment_instrument_id_fkey R

The primary key of this table. Positive for standard payment instruments (card, BACS/ACH/BECS, TWINT, PayPal); negative for payment_instrument_type = 'BANK_ACCOUNT_DIRECT_DEBIT' rows, whose synthetic identity is derived from the bank account and kept separate from positive standard instrument ids.

customer_id int8 19 null
dim_customer.customer_id dim_payment_instrument_customer_id_fkey R

The customer whose account this payment instrument belongs to. Null in rare cases where the billing setup could not be linked back to an account. For BANK_ACCOUNT_DIRECT_DEBIT rows, ownership is resolved through the bank account’s payer relationship and the reverse customer-to-payer relationship.

paying_customer_id int8 19 null
dim_customer.customer_id dim_payment_instrument_paying_customer_id_fkey R

The customer who actually pays for this instrument. Equals customer_id for payment_responsibility_type SELF/UNKNOWN; differs from it for CUSTOMER (e.g. a parent paying for a child’s membership); null for EXTERNAL or an unresolved payer. For BANK_ACCOUNT_DIRECT_DEBIT rows, responsibility is SELF, so this equals customer_id when the account-owner path resolves.

payment_responsibility_type varchar 64 null

Who is financially responsible for this instrument. One of:

  • SELF — The account holder pays for themselves. Always this value for BANK_ACCOUNT_DIRECT_DEBIT rows, since the bank-account representation has no alternate-payer concept.
  • CUSTOMER — Another member pays on the account holder’s behalf (see paying_customer_id).
  • UNKNOWN — Migrated/imported account; the specific arrangement is not known.
  • EXTERNAL — A non-member (e.g. a parent or guardian) pays on the account holder’s behalf.
payment_instrument_type varchar 64 null

The type of payment instrument. One of:

  • CREDIT_CARD — Credit/debit card.
  • BACS — UK BACS direct debit mandate.
  • ACH — US ACH direct debit.
  • BECS — Australian BECS direct debit.
  • TWINT — TWINT mobile payment (Switzerland).
  • PAYPAL — PayPal billing agreement.
  • BANK_ACCOUNT_DIRECT_DEBIT — Bank-account-backed direct-debit mechanism represented separately from standard instruments. The same storage layer supports non-Swiss SEPA Direct Debit and Swiss LSV+/CH-DD processing; this warehouse label does not distinguish the operational scheme. mandate_given_date/mandate_withdrawn_date are populated for these rows.
current_status varchar 64 null

The current confirmation/validity state of this instrument. One of:

  • WAITING_FOR_CONFIRMATION — Created and awaiting confirmation from the customer/PSP. For BANK_ACCOUNT_DIRECT_DEBIT rows, also covers a mandate awaiting member signature/approval.
  • IMPORTED_WAITING_FOR_PROCESSING — Imported/migrated and awaiting PSP registration/tokenization following the import. Not applicable to BANK_ACCOUNT_DIRECT_DEBIT rows.
  • CONFIRMED — Confirmed and usable for charges. For BANK_ACCOUNT_DIRECT_DEBIT rows, also covers a mandate that has been physically signed.
  • INVALID — Can no longer be used (bank-rejected, disabled, charged back). For BANK_ACCOUNT_DIRECT_DEBIT rows, set when the bank account is inactive/archived or the selected mandate’s withdrawal date is effective.
payment_provider varchar 64 null

The payment service provider (PSP) that issues and processes this instrument (e.g. Adyen, Stripe, Worldpay). Null for BANK_ACCOUNT_DIRECT_DEBIT rows, which represent the bank-account-backed mechanism rather than a PSP token.

is_archived bool 1 null

Whether this payment instrument is archived (no longer in active use). For BANK_ACCOUNT_DIRECT_DEBIT rows, this is the archive state of the bank account; a withdrawn mandate does not archive an otherwise reusable account.

mandate_given_date date 13 null

Only populated for payment_instrument_type = 'BANK_ACCOUNT_DIRECT_DEBIT' rows: the date the selected current mandate was granted. It is not an exhaustive history of mandates and is null for other payment instrument types.

mandate_withdrawn_date date 13 null

Only populated for payment_instrument_type = 'BANK_ACCOUNT_DIRECT_DEBIT' rows: the withdrawal/cancellation date of the selected current mandate, if present. The withdrawal affects current_status once effective; the field is null while that mandate is active and for other payment instrument types.

last_updated timestamptz 35 null

System column. UTC Timestamp at which entry was calculated (lags shortly behind source system).

data_landing_time timestamptz 35 getdate()

System column. UTC timestamp assigned when a table batch is applied on Redshift. It represents warehouse landing order at table-batch granularity, not source event order. Usable to filter for incremental extractions.

Relationships