Updated on July 18th, 2023 in #dev-business
Placing an order and capturing a payment are really different actions. I also learned a lot in a few days.
Quick Jump: Placing an Order for Pickup | Placing Orders in Multiple Ways | Multiple Payments Per Order | Extra Charges, Tips and Discounts | Voids and Refunds | Customers | Stripe, Shopify and Square | Video
Prefer video? I’ve put up a YouTube video going over this post with a bit more color and detail.
Up until recently I’ve never worked at a register or collected payments at a physical location. I’ve only ever sold online video courses where you typically start the checkout process and digitally purchase an item within a few seconds or minutes.
I was helping a friend out recently and worked the counter at a pizza place for a couple of weeks after my normal job. It’s a much different world than doing remote programming and making YouTube videos. I’ll likely make more posts related to this in a programming context but let’s focus on payments in this one.
Placing an Order for Pickup
Check out this run of the mill workflow that may happen many times a day:
- Customer calls in on the phone to place an order for pickup
- They want to buy a large lightly cooked pie and 6 garlic knots
- You input their order into the POS (point of sale) system
- Each item is listed as a line item with a name, quantity, note and price
- You ask for their name and number and put it into the system
- A total is calculated with sales tax being a separate line item
- The order gets “Created” and the following things happen:
- The order is placed into “In Progress” with a little icon showing it’s not paid for
- Being paid or not is independent of the order being in progress
- A receipt is printed at the register which is marked “INCOMPLETE”
- You hang this receipt up so you and others know an order is pending
- An order to make 1 pie is printed where the pizza maker can see it
- The order is placed into “In Progress” with a little icon showing it’s not paid for
Step 7 is going to be different depending on which POS system you use but the general ideas are the same. There’s the concept of an order being in the system with a status, a human workflow is executed to track that order physically and receipts get printed.
At no point did we even think about capturing a payment here. For this pickup order there’s a few ways a payment can be collected:
- While on the phone with the customer you enter their credit card details into the system on their behalf, with our above workflow that could have been done after step 6 and then step 7 would be different but let’s put that on hold for now
- They pay for it with either cash or credit when they pick it up
For now we’re also ignoring other types of ways for orders to be input such as them ordering it online and paying for it on the spot or a delivery which could either be paid for and done online or have cash collected upon delivery. More on that later!
Ok so now let’s say the customer comes in 20 minutes from now to pick up their order. At this point you may have accepted 10 other orders from different customers. Some might be in progress and others might be completed. Maybe someone popped in to buy 2 slices to go and was in and out in 3 minutes.
You check the receipts that are hanging and notice this order is #137, so you go back to the POS system’s “In Progress” tab and find that order. Yep there it is.
You can see the full total of the order and see if the customer has cash out or a card (or their phone if they’re using Apple / Google Pay). If not, you ask them cash or card and the POS system will let you choose which one.
If they pick cash, you input the amount they give you and it auto-calculates their change. If they pick card or another digital payment method, they can use the terminal to tap or insert their card / device. It will get authorized and then hopefully be successful unless their card has issues.
In any case, if the payment is successful then the following happens:
- The order is marked as “Completed” in the system
- Another receipt is printed except with payment information filled in
- You save the receipt if the business owner wants physical receipts saved
- You remove and throw away the hung “INCOMPLETE” receipt so you know it’s done
The pizza maker threw away their print out for that pie independently of the order being completed. From their POV, they are finished when the pie is first placed IN the oven or OUT depending on if the counter workers know how to gauge when a pie is ready to be taken out.
At this point you have a clean slate. The order is complete and it’s been moved through the workflow. Depending on how busy the place is, this might be executed 50 or even 300 times a day with surges coming in around popular lunch and dinner times.
If you need to go back to an order that’s already been completed you can. You can also print receipts on demand and if there’s been a payment captured you can issue a full or partial refund.
There’s so much more to go into around payment details but let’s go over a few technical takeaways from the above.
Technical Takeaways
Here’s a couple of things I got out of the above and remember thinking about while taking orders and observing the system. If you were building this system out think about the database terms and relationships you might have.
I’ve quoted the words that could be tables or models.
An “Order”, “Product” and “Payment” are different things
An order really pulls together multiple products into something that can be associated as a thing but in my opinion it’s not a join-table between products and payments.
Order #137 has N products. It also has X payments where X can even be 0 if the order happens to be free, such as if they have a coupon to get 1 free pie after buying 10.
You would still want that free pie to be put through the workflow and tracked. The only difference is you wouldn’t collect a payment.
An order has a status to clearly show the stage an order is at. You can almost think of it as a Kanban board that moves from created to completed.
A “Product” has “Variants” and “Notes”
At this place a pie can be personal (12”), medium (16”) or large (18”). A customer may want full pepperonis or meatballs. Maybe they want 1/2 and 1/2, or maybe they want 2 full toppings.
The