Card or bank payments
Why a guest who has paid always has a booking
A booking is made only by the payment provider’s signed confirmation, never by the guest’s browser. Here one payment meets six things that go wrong, and you can see what catches each one.
The guest paid, so the booking exists, whatever their phone did.
One way to pay takes money today: cards through Stripe, on roziunamas.lt. Card payments on teatro.lt and bank links through Paysera are built but switched off.
- The payment, on its way
- A fault
- The same payment, sent again
- Flagged for the owner
What catches each failure
The page never makes the booking
The confirmation page only reads. A paid booking is written by one function, and that function is reached only from the signed confirmation that Stripe itself sends to the site, or from layers 2 to 4 below. A guest who closes the tab or loses signal after paying changes nothing.
- teatro.ltThe confirmation page only reads; it writes no booking.
- roziunamas.ltThe confirmation page only reads. Opening the payment form writes an unpaid draft; only the confirmation marks it paid.
A failed signature is checked at the source
If the confirmation’s signature does not verify, the site asks Stripe directly whether the payment is real and finalises it anyway. Only its own payments qualify (the two sites share one Stripe account and are told apart by booking reference), not refunded, at most four days old, and at most 10 lookups an hour per address. Every value written comes from Stripe’s own reply, never from the unsigned message. The owner is mailed, at most once every six hours.
- teatro.ltOn a failed signature, the payment is checked directly with Stripe.
- roziunamas.ltOn a failed signature, the payment is checked directly with Stripe.
A failed recording is parked, not lost
If recording the booking fails, for example because the database is down, the payment’s confirmation is parked in a file the web cannot reach, with owner-only permissions. The owner is mailed and the admin shows a warning until it is recorded, and Stripe keeps retrying.
- teatro.ltThe owner can replay it from the admin, through the same function.
- roziunamas.ltNo replay button: it is recorded by Stripe’s retry or the daily check.
A missing confirmation is fetched
Once a day the site asks Stripe what it charged in the last seven days (with a 30-minute grace) and finalises anything it has no booking for, through the same function.
- teatro.ltRuns at 00:05.
- roziunamas.ltRuns at 03:00.
One payment, one booking
The same confirmation can arrive more than once. Only one booking can be made for a payment, and a stay the owner has cancelled is not booked again by the daily check or by a direct check with Stripe.
- teatro.ltThe database refuses a second booking with the same payment number, so a payment is never counted twice.
- roziunamas.ltThe payment number is written down as soon as the first confirmation arrives, so a repeat cannot book it again; every cancelled payment is written down too, so a cancelled stay does not come back.
A different amount is flagged, not refused
If the charge differs from the price, the booking is still recorded, because the guest has paid, and it is flagged for the owner in the admin.
- teatro.ltFlagged in the admin.
- roziunamas.ltFlagged in the admin and mailed to the owner.
Which ways to pay are on today
Cards through Stripe
Live
Taking money on roziunamas.lt. Built on teatro.lt and switched off: bookings there are taken by phone or request for now. All six layers above are written for this method.
Bank links through Paysera
Built, switched off
Built on teatro.lt and switched off until the owner adds Paysera keys. No site takes money through Paysera yet. A payment is recorded through the same function and covered by the same daily check.
The six layers describe card payments through Stripe, the only method taking money today (on roziunamas.lt). teatro.lt’s rows describe code that is ready but takes no money for now. The picture shows one payment meeting all six in a row; in life most payments meet none. The times in the picture are for the drawing, not measurements.
How will your guests pay?
Tell me whether you already have a Stripe or Paysera account. I will tell you what to connect and what it costs.
You will hear back within one working day.
