Order lifecycle
A typical RestaurantPOS order moves through these stages:- Draft – items added to a cart but not yet submitted.
- Pending payment – order created, waiting for payment confirmation.
- Preparing – kitchen or staff are working on the order.
- Ready – order is ready for pickup or delivery.
- Completed / Cancelled – final state.
API object in AG | RestaurantPOS.
Creating orders from Roblox
Use theAPI object provided by AG | RestaurantPOS to create orders from your UI.
Example pattern:
Handling payment
Payment handling depends on your monetization model:- In-game currency – deduct balances in your own economy system, then mark the order paid.
- Robux (passes/products) – initiate the purchase flow, then update the order on success.
- Once an order reaches Preparing or Ready, your game should:
- Grant items (tools, cosmetics, buffs).
- Update UI (order status boards, notifications).
- Optionally log analytics or audit events.
- You can poll order status, or subscribe to webhooks in your backend and bridge changes into the game.
-
Operational best practices
-
- Use sandbox for all flows until you have covered edge cases like failed payments and disconnects.
-
- Always validate userId and placeId when creating or updating orders.
-
- Log key events around orders to help you debug issues in live experiences.
- For API details on the underlying endpoints, see the RestaurantPOS-related routes in your API reference. Once an order reaches Preparing or Ready, your game should:
- Grant items (tools, cosmetics, buffs).
- Update UI (order status boards, notifications).
- Optionally log analytics or audit events.
OrderStatusChanged from the API object so you can react:
Operational best practices
- Use sandbox-style places for testing until you have covered edge cases like failed payments and disconnects.
- Always validate userId and placeId when creating or updating orders.
- Log key events around orders to help you debug issues in live experiences.
Fulfilling orders
Once an order reaches Preparing or Ready, your game should:- Grant items (tools, cosmetics, buffs).
- Update UI (order status boards, notifications).
- Optionally log analytics or audit events.
Operational best practices
- Use sandbox for all flows until you have covered edge cases like failed payments and disconnects.
- Always validate userId and placeId when creating or updating orders.
- Log key events around orders to help you debug issues in live experiences.