Overview
Allows store employees to verify UPI payments and update the payment status of an order. This is a critical step in the order lifecycle where the store confirms they received payment before accepting the order. When payment status is updated tosuccess, the order automatically transitions to accepted status and the customer receives a notification.
Authentication
Requires authentication with JWT token. Only available tostore_employee role.
Endpoint
Path parameters
The unique order ID (MongoDB ObjectId)
Request body
The updated payment statusValid values:
pending, success, failedThe UPI transaction ID verified by the store (8-40 alphanumeric characters). Will be converted to uppercase.
Response
Indicates if the payment status was updated successfully
Human-readable status message
Payment verification flow
- Customer completes UPI payment to store’s UPI ID
- Customer submits order with optional transaction ID
- Store checks their UPI payment history
- Store verifies payment amount matches
totalAmount - Store calls this endpoint to mark payment as
success - Order automatically transitions to
acceptedstatus - Customer receives email and push notification
Example request
Example response
Error responses
Commitment requirement
After payment is confirmed, customers with a no-show history must confirm their commitment before the store can accept the order:- Good trust tier: No commitment required, store can immediately accept
- Watch/restricted tier: Customer must call POST /api/orders/:id/confirm-commitment before store can accept
Transaction IDs are automatically converted to uppercase and validated to be 8-40 alphanumeric characters. Duplicate transaction IDs across different orders are not allowed.
Automatic cancellation
Orders withpending payment status are automatically cancelled if:
- Payment not verified within 8 minutes of order creation
- Store marks payment status as
failed