POS and customer-link payments
POS counter sales and customer/catalog link checkouts use UPI (or bank) payment screenshots, not Razorpay. Razorpay is ecommerce-only (Ecommerce payments, docs/RAZORPAY_SETUP.md).
POS order create
POSOrderCreateSerializer.create (backend-main/pos/serializers.py) accepts:
| Field | Role |
|---|---|
paymentScreenshot | URL of uploaded proof (optional) |
paymentDoneLater | Customer will pay later / no proof yet |
Initial payment_status from resolve_initial_payment_status:
| Condition | payment_status |
|---|---|
paymentDoneLater and empty screenshot | pay_later |
| Otherwise (incl. screenshot present) | pending |
Ecommerce-sourced rows use a separate path (not_required / Razorpay verified) and are not created through this serializer’s default resolver for COD/Razorpay fulfillment.
Orders start as pending until an admin verifies or rejects the screenshot (POSOrderUpdateSerializer (backend-main/pos/serializers.py)):
verified→ stampspayment_verified_at/payment_verified_by, system commentrejected→ requires reason- Moving order
statusto Processing requirespayment_statusinverifiedornot_required(PAYMENT_STATUSES_ALLOW_PROCESSINGonPOSOrder(backend-main/pos/models.py))
payment_method on POS models is mainly the ecommerce COD/Razorpay enum; POS/link flows rely on screenshot + payment_status / payment_done_later rather than Razorpay ids.
Customer link checkout (printbazar-checkout)
Public step APIs under /api/checkout/<pos_slug>/<link_code>/ (customerlink/views.py (backend-main/customerlink/views.py)):
- Step 1 — assets / addons
- Step 2 — shipping
- Step 3 —
payment_screenshot(required URL) →CustomerLinkStep3Serializersetsstep3_completed, statusSubmitted, notifies SSE (notify_link_submission)
Step 3 does not create a POSOrder. The store converts later via POS create with customerLinkId, copying link data; payment screenshot on the order comes from the create payload / link fields as implemented in the POS flow. See Customer link lifecycle.
Checkout UI uploads the image (folder payment-screenshots) then posts the URL — printbazar-checkout/components/PaymentStep.tsx, printbazar-checkout/App.tsx.
Catalog link submit
POST …/catalog/<link_code>/submit/ (CatalogLinkSubmitView (backend-main/customerlink/catalog_views.py)) requires payment_screenshot in the body. Creates a CustomerLink already Submitted with steps marked complete and the screenshot stored. Same conversion path as classic links (POS places order → Order Placed).
Admin verification
Staff updates order paymentStatus in the admin/POS order APIs. Screenshot URL is visible on order detail serializers (paymentScreenshot). There is no automatic OCR or Razorpay capture for these channels.
Related
- Checkout internals — wizard steps / localStorage
- Order lifecycle — payment gate into Processing
- Stock rules — POS/link do not decrement warehouse stock on create
- User: Checkout step 3 — UPI payment
- User: POS UPI QR settings