Epic: #151
Proposal: proposals/bookings_engine.md (local, git-excluded). Argument: https://github.com/Davidslv/notes/issues/178
Purpose
The balance is due later, sometimes months later. A Checkout link dies within 24 hours. The email points at our page. The session is created when the guest opens it.
Scope
In scope
- After confirm, create the balance instalment for
price_cents minus the deposit. A null deposit_cents is one full instalment and does not create a balance.
RequestDueInstalmentsJob emails a Bookings URL, not a Stripe URL. It skips rejected, cancelled, and expired.
- Opening the page publishes
booking.balance_due.bookings with the same fields as booking.held.bookings, plus the customer id already stored on the booking.
- Billing reuses that customer. It does not create a second one. Session idempotency key is
session- plus the balance payable_ref. Same inline exception as the deposit.
payment.succeeded.billing for a balance instalment marks it paid. It does not use the held check and it does not refund for failing that check.
- The due job does not create the Stripe session.
Out of scope
- Saving the card. Charging off-session.
- A Stripe URL in the email.
How to deliver
Branch <issue-number>-balance-page. PR title [#<issue-number>] Collect the balance when the guest opens the page.
Acceptance Criteria
Epic: #151
Proposal:
proposals/bookings_engine.md(local, git-excluded). Argument: https://github.com/Davidslv/notes/issues/178Purpose
The balance is due later, sometimes months later. A Checkout link dies within 24 hours. The email points at our page. The session is created when the guest opens it.
Scope
In scope
price_centsminus the deposit. A nulldeposit_centsis onefullinstalment and does not create a balance.RequestDueInstalmentsJobemails a Bookings URL, not a Stripe URL. It skipsrejected,cancelled, andexpired.booking.balance_due.bookingswith the same fields asbooking.held.bookings, plus the customer id already stored on the booking.session-plus the balancepayable_ref. Same inline exception as the deposit.payment.succeeded.billingfor a balance instalment marks it paid. It does not use theheldcheck and it does not refund for failing that check.Out of scope
How to deliver
Branch
<issue-number>-balance-page. PR title[#<issue-number>] Collect the balance when the guest opens the page.Acceptance Criteria
checkout.stripe.comURL.payable_refand redirects to it.confirmedbooking back toheldorpending_review.