Pre-check-in form
/forms/pre-checkin?b={bookingId} — multi-section single-page form
the guest completes before arrival. Replaced ChargeAutomation entirely
(Phase 5).
Form sections
- Stay summary — booking dates, property, your guest info
- T&Cs viewer + signature — full rental terms, canvas signature pad. Required to proceed.
- Contact info — full name, phone, email (override BA’s stored values if guest wants a different best-contact)
- Guests — adult + child counts
- Cleaning notice preference — how to be notified of cleaning schedule (text / email / booking-msg / none)
- Arrival info — how they’re arriving (flying / driving) + estimated arrival time
- Identity verification — selfie photo upload (compressed
client-side to 1920px JPEG q=0.75, uploaded to Dropbox
/PMS/...) - Optional add-ons — early check-in + late check-out (each shows per-property price). If selected, Stripe Elements card form appears.
Submit flow
Submit-intercept JavaScript:
- Compress selfie if changed
- Stripe
createPaymentMethodif add-ons selected - Multipart POST to
/forms/pre-checkin - Server: validate, write to D1, authorize Stripe (if add-ons), set
CA_PRE_CHECKIN_COMPL=Yinfo code on Beds24 booking - Call form-bridge action (
runFormBridgewithkind="pre_checkin") — thanks email + flag +CHECKINCOMinfo code - Render thanks page
Persisted state
All in the pre_checkin_submissions D1 table (one row per booking).
Key columns:
terms_acknowledged_at,signature_data_url,signature_signed_atguest_full_name,guest_phone,guest_emailnum_adults,num_childrencleaning_notice_pref,arriving_by,estimated_arrival_timeselfie_dropbox_path,selfie_uploaded_ataddon_early_checkin,addon_late_checkout,addon_total_usdstripe_payment_intent_id,payment_status,payment_authorized_at,payment_captured_atearly_checkin_decision,late_checkout_decision,late_checkout_chosen_time(set by M4c / M4d flows)last_pre_arrival_msg_at(used by 24h gate)submitted_at,created_at,updated_at
Validation
Server-side enforced:
- Signature required (must be
data:image/...) - Full name, phone, email required
- Selfie required (server checks
selfie_dropbox_path IS NOT NULLOR upload in request) - Card details required IF any add-on selected
Editable later
The form is re-fillable. Guest can revisit and update any field. If they re-submit after the first submission:
- D1 row updated (not replaced)
- Bridge actions re-run (but BA bridge stays idempotent via flags set on first submit)
Source
- Route:
src/routes/forms-pre-checkin.ts - Migration:
migrations/0017_pre_checkin_submissions.sql+ 0018–0021 for signature, selfie, add-ons, payments - CRUD lib:
src/lib/pre-checkin.ts