Skip to main content

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:

FieldRole
paymentScreenshotURL of uploaded proof (optional)
paymentDoneLaterCustomer will pay later / no proof yet

Initial payment_status from resolve_initial_payment_status:

Conditionpayment_status
paymentDoneLater and empty screenshotpay_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 → stamps payment_verified_at / payment_verified_by, system comment
  • rejected → requires reason
  • Moving order status to Processing requires payment_status in verified or not_required (PAYMENT_STATUSES_ALLOW_PROCESSING on POSOrder (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.

Public step APIs under /api/checkout/<pos_slug>/<link_code>/ (customerlink/views.py (backend-main/customerlink/views.py)):

  1. Step 1 — assets / addons
  2. Step 2 — shipping
  3. Step 3 — payment_screenshot (required URL) → CustomerLinkStep3Serializer sets step3_completed, status Submitted, 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.

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.