Skip to content
All work

A US platform that sells hotel rooms for live events

Payments and revenue reports for event hotel bookings

I worked on payments, from Square and PayPal to Apple Pay and monthly installments, and on the revenue reports for a platform that sells hotel rooms for live events.

Industry
Event travel
My role
Full-stack engineer: payments and revenue analytics
Years
2022 to 2023
Status
My work on it ended in 2023 Checked 15 Nov 2026
payment services: Square, PayPal, Apple Pay and Authorize.Net
4
revenue and inventory reports
4

The problem

The platform sells hotel rooms for live events: festivals, conferences and sports. An event holds a block of rooms at agreed rates, and attendees book out of that block on the event’s own booking site.

Each hotel stops taking bookings on a cutoff date, and the money from every room is split between the hotel, the event and the platform. So working out what an event earned takes a real calculation, and the admin console needed reports that got it right.

Guests also wanted to pay with PayPal or the wallet on their phone, and some paid for their room in monthly installments. Each new way to pay had to settle and refund like a card payment, or the operations team would need a separate process for each one.

I started work on payments and revenue reporting in late 2022, when the booking flow was already in place.

What I worked on

Payments were my main area. I worked on the server side of Square card payments, and on monthly installments: a scheduled job that takes each installment, and a hold on the guest’s card that covers a failed installment or a cancelled order.

I also worked on PayPal checkout: the shared data types, the server code that talks to PayPal through Braintree, the checkout screens, and the page that picks the guest up when they return from PayPal.

For PayPal Express Checkout, I sent the payment through Authorize.Net, the gateway the platform already used for cards. Those orders settle and refund through the same code as card orders, so there is no second path to maintain.

Apple Pay needed more setup than the others. Before Apple shows its payment sheet, the platform’s server has to prove who it is to Apple using a merchant certificate.

I built that check and the domain verification Apple asks for. I also added one shared payment type that the booking site and the server use to record how a guest paid.

The server loads the certificate from storage when the request comes in, and picks the production or test merchant ID from the environment. Replacing the certificate means uploading a file, with no code change.

On the reporting side, I worked on the revenue analytics behind the console’s insights pages. One endpoint checks that the person asking can see that event, then hands off to a separate service for each report.

The partnership revenue report is the number the business uses to see what an event earned. It joins orders, payments, hotels and the event’s settings and totals the revenue for each day, with a running total and the event’s partnership adjustment on top.

I also built the nightly job that closes a hotel when its cutoff date passes, and the console logic that sends each staff role to the sections it is allowed to use and only shows people the events they can see.

How it works

  • Card, PayPal and Apple Pay payments all go through one payment service, tagged by how the guest paid.
  • Installments: a monthly job takes each payment, and a card hold covers a failed installment or a cancelled order.
  • PayPal Express Checkout: the server gets a secure PayPal link, the guest pays on PayPal, and on return the server fetches their details by transaction.
  • Apple Pay: the server checks in with Apple using a certificate loaded at request time.
  • Four insights reports: partnership revenue over time, rooms booked against rooms left, summary figures, and a per-hotel table with locations.
  • Reports that need payment data read it all in one batch, instead of one request per order.
  • The cutoff job marks hotels sold out, emails the reservations team, and skips any hotel an operator has set by hand.
  • Admins, client success, customer service, accounting and partners are each sent to the console sections their role allows.

Where it is now

I worked on the platform from late 2022 into 2023.

By then PayPal checkout, the insights reports and the cutoff job were on the production branch. Apple Pay, with the full merchant check, was on the development and QA branches.

The client’s review on Upwork read: “Aali is the best! Great working with him and a valuable member of any team.”

Under the hood

  • Serverless payments. The server side runs on AWS Lambda behind API Gateway, defined with SST, with DynamoDB for storage and scheduled jobs in their own stack. The payment code I worked on lives in one payments service.
  • Card holds as a safety net. When a guest pays in installments, a hold on their card covers a failed installment or a cancelled order.
  • One gateway for PayPal Express. PayPal Express orders open an Authorize.Net payment session, the same gateway used for cards, so settlement and refunds don’t need a second path.
  • Apple Pay merchant validation at request time. The server loads the merchant certificate from storage on each validation request and picks the merchant ID from the environment, so a certificate swap is a file upload.
  • Access by role and by event. Console access is checked twice: by staff role for each section, and per user for each event, so people only see the events they are allowed to see. I also fixed endless loading on events with large orders.

What I’d tell a founder in the same spot

When you add a new way to pay, make it settle and refund through the same path as your existing payments, even if a direct integration looks quicker. Otherwise every refund and every report needs a special case for it.

If your revenue depends on splits and adjustments, decide once which orders count toward it and use that one rule in every report.

How it fits together

  1. 1. A person A guest books a room from the event's block and picks how to pay
  2. 2. Code The server opens a card, PayPal or Apple Pay payment
  3. 3. Code One payment service records it, tagged by how the guest paid
  4. 4. Code A monthly job takes each installment, with a card hold as backup
  5. 5. Code Insights reports total what each event earned, day by day
How a guest's room payment moves through the platform, from checkout to the event's revenue report.

Built with

  • TypeScript
  • Node.js on AWS Lambda
  • SST and AWS CDK
  • DynamoDB
  • Next.js
  • React and Redux Toolkit
  • Square
  • Braintree (PayPal)
  • Authorize.Net

Have someone technical who should look at this first? Send this to your technical person, or point them to the five-minute version for technical readers.

Next case study AI voice practice interviews and a scoring engine that explains every score A US interview practice platform for job seekers

Contact

Something like this in your business?

Book 15 minutes and tell me what your team does by hand. I'll tell you what I'd build first, and what I'd skip.

Scaylar's services are on scaylar.com.