Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/PloutusLab/krafta-web/llms.txt

Use this file to discover all available pages before exploring further.

Venezuelan banking regulations and the bolivar exchange rate mean Krafta uses a manual payment verification model rather than an automated payment gateway. Customers pay via Pago Móvil or Banesco bank transfer, then submit their payment reference through the storefront. The payments admin at /admin/payments surfaces all orders with status: "REPORTED" or an attached payments array so an admin can cross-check each submission against the actual business bank account before confirming the order.
Confirm a payment only after verifying the credit has appeared in the actual business bank account. Premature confirmation moves the order into production — reversing this requires manual intervention at both the workshop and order level.

Payment submission list

The payments page fetches orders via GET /api/orders and filters for those with status: "REPORTED" or any attached payments array. Only orders with the REPORTED status trigger the approve/reject action buttons — orders in other statuses are shown for reference only. Each card in the queue shows:
FieldSource
Order numberorder.orderNumber
Order status badgeorder.status
Payment methodsubmission.methodPAGO_MOVIL or TRANSFERENCIA
Expected amountorder.total (USD) and order.totalBs (Bolívares)
Reported amountsubmission.amountReported
Bank of originsubmission.originBank
Reference numbersubmission.reference
Payer namesubmission.payerName
Receiptsubmission.receiptUrl — opens in a new tab and displays as an inline thumbnail

Confirm or reject a payment

PUT /api/payments — request body

{
  "orderId": "order-uuid",
  "submissionId": "submission-uuid",
  "status": "CONFIRMED",
  "rejectionReason": null
}
orderId
string
required
UUID of the order being verified.
submissionId
string
UUID of the specific PaymentSubmission record. When provided, only that submission record is updated. If omitted, all submissions on the order are updated.
status
string
required
Verification outcome. Must be "CONFIRMED" or "REJECTED".
rejectionReason
string
Human-readable explanation sent to the customer when status is "REJECTED". For example: "Referencia no aparece en el banco" or "Monto insuficiente".

Status effects

ActionPaymentSubmission statusOrder statusNext step
ConfirmCONFIRMEDCONFIRMEDWorkshop assignment becomes available in /admin/orders
RejectREJECTEDREJECTEDCustomer must resubmit with a corrected proof

Audit log

The PaymentVerificationLog model exists in the schema to record verification events against an order. It stores the following fields:
FieldDescription
orderIdThe order that was verified
action"CONFIRMED", "REJECTED", or "REFUNDED"
adminNotesOptional free-text notes for internal records
createdAtTimestamp of the verification action
The PUT /api/payments route currently updates the PaymentSubmission and Order records directly. PaymentVerificationLog entries must be created manually via Prisma Studio or a custom migration script for audit trail purposes until the route is extended to write them automatically.

Payment accounts

PaymentAccount records define the bank accounts displayed to customers at checkout. These records are managed directly in the database via Prisma Studio — there is no admin UI or API endpoint for PaymentAccount CRUD at this time.
FieldDescription
bankNameBank name, e.g. "Banesco"
accountNumberFull account number
holderNameLegal name of the account holder
holderIdCédula or RIF of the account holder
phonePhone number registered for Pago Móvil
instructionsFormatted instructions shown during checkout
activeWhether the account is currently shown to customers

Refunds

When an order must be reversed after confirmation, a Refund record is created manually. The model tracks:
FieldDescription
amountRefund amount in USD
methodPayment method used for the refund
referenceBank reference for the outgoing transfer
receiptUrlURL of the refund receipt file
status"PENDING" while the transfer is in progress, "COMPLETED" when confirmed

Build docs developers (and LLMs) love