Admin payment management is central to the manual confirmation workflow used by Avanzar In Time Shop. Because the store accepts manual payment methods — Zelle transfers, local bank transfers, and cash on delivery — staff must verify that a payment was received and confirm it with a reference number before the order moves to fulfillment. The confirm endpoint handles both the payment update and the order status promotion atomically, preventing duplicate confirmations even under concurrent admin activity.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ItsJhonAlex/Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
All endpoints in this section require the
admin or staff role. Requests without a valid session return 401; requests with insufficient role return 403.Endpoints
List Payments
createdAt descending. Supports an optional status filter to focus on pending items awaiting confirmation.
Query Parameters
Filter by payment status. One of:
pending, confirmed, rejected. Omit to return all statuses.200
Get Payment by ID
order relation, giving full context without a separate order request.
Response 200
404 if the payment ID does not exist.
Confirm Payment
- Updates the payment
statustoconfirmed, records theconfirmedByadmin ID,confirmedAttimestamp, and the providedreference. - Promotes the linked order from
pending_payment→paid(conditional on the order still being inpending_paymentstatus). - Appends a
paidentry to the order’sstatusHistory.
The transfer reference or confirmation number provided by the customer (e.g. Zelle confirmation code, bank transaction ID). Minimum length: 1 character.
200
The confirmed payment object is returned. All confirmation fields are now populated.
Payment Response Fields
UUID of the payment record.
UUID of the order this payment is associated with.
Payment method used by the customer. One of:
cod (cash on delivery), transfer_local (local bank transfer), zelle.Current payment status. One of:
pending, confirmed, rejected.Payment amount in minor currency units (e.g.
19000 = $190.00 USD).ISO 4217 currency code for the payment amount (e.g.
"USD", "VES").Transfer reference number provided by the confirming admin.
null until confirmed.UUID of the admin user who confirmed the payment.
null until confirmed.ISO 8601 timestamp of when the payment was confirmed.
null until confirmed.Atomic double-confirmation prevention: The confirm endpoint uses a conditional
UPDATE … WHERE status = 'pending'. If two staff members attempt to confirm the same payment simultaneously, only one will match the WHERE clause and succeed. The other will receive a 409 response — "El pago no está pendiente" — without corrupting any data. No idempotency key or locking mechanism is required from the client.