# guest_payments

<!-- Generated from apps/irrigation/dbt_redshift/models/client_data/sources.yml. Do not edit by hand — run `make generate-client-data-dictionary`. -->

Payment records with status, payment method, and booking linkage.

| Column | Description |
| --- | --- |
| `id` | Unique identifier for the payment |
| `status` | Canceled, failed, success, due |
| `paid_at` | DEPRECATED |
| `should_be_paid_at` | DEPRECATED |
| `amount` | The amount paid by the guest |
| `guest_id` | DEPRECATED |
| `currency` | The currency paid by the user |
| `external_payment_id` | The external ID for the payment, not always populated |
| `booking_id` | The ID of the booking |
| `created_at` | The UTC date, including time, when this was created |
| `updated_at` | The UTC date, including time, when this row was updated |
| `source` | Empty if no source. 'unknown' if unknown. 'channel_booking' if from a channel. 'scheduled_collection', 'myvr_dashboard' |
| `mode` | Null/empty when unknown. 'processed', 'recorded', or 'third-party' |
| `payment_method` | cash, card, bank_transfer, other... |
| `card_type` | The type of card, only populated if payment_method is card |
| `card_last_four` | Last 4 digits of the card if payment_method is card |
| `card_first_six` | DEPRECATED |
| `exp_month` | Expiry month for card when payment_method is card |
| `exp_year` | Expiry year for card when payment_method is card |
| `name_on_card` | The name on the card, not always populated |
| `payment_gateway_id` | The ID of the payment gateway (numeric or UUID) |
| `payment_gateway_token` | The token or the gateway |
| `current_balance` | DEPRECATED |
| `exp_day` | DEPRECATED |
| `effective_date` | The effective date for this payment, in YYYY-MM-DD. Can also be empty |
| `payment_reference` | The reference for the payment |
| `created_by_id` | The user ID that created this payment |
| `label` | invoice_payment, downpayment, reservation, cancellation, other_charge, or refund |
| `processed_at` | The UTC, including time, when this payment was processed |
| `process_error` | If there is an error this is populated |
| `refunded_payment_id` | DEPRECATED |
| `payout_method` | Empty, other, bank_transfer, vcc, card |
| `payout_source` | Empty, 'expedia', 'booking.com', or 'guest' |
| `hidden` | DEPRECATED |
| `tokenized_card_number` | The tokenized card number, used very infrequently |
| `payment_request_id` | The ID of the payment request |
| `invoice_uuid` | A unique UUID for the invoice related to this payment |
| `payer_token` | A unique token for the payer, or empty |
| `booking_context_id` | The ID of the booking context |
| `timestamp` | Date when the table was last synchronized |
