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.

Every order in Krafta is governed by two independent status enums that advance in parallel: PaymentStatus tracks the financial verification of the customer’s bank transfer or mobile payment, while AssignmentStatus tracks the production lifecycle once a workshop has been assigned. An order number in the format KRFT-XXXXXX (a 6-digit random alphanumeric suffix) is generated at checkout and shown to the customer at every stage.

Status enums

PaymentStatus

enum PaymentStatus {
  NOT_REQUIRED
  PENDING
  REPORTED
  UNDER_REVIEW
  CONFIRMED
  REJECTED
  REFUND_PENDING
  REFUNDED
}

AssignmentStatus

enum AssignmentStatus {
  PENDING_ASSIGNMENT
  NOTIFIED
  ACCEPTED
  IN_PRODUCTION
  READY
  HANDED_TO_DELIVERY
  COMPLETED
  REJECTED
  CANCELLED
}

Human-readable labels and descriptions

The following labels and descriptions come directly from src/lib/order-status.js and are used throughout the customer-facing UI and notification emails.
Status keyLabelCustomer-facing description
PENDINGEsperando pagoTu pedido está creado y espera el registro del pago manual.
REPORTEDPago en revisiónRecibimos tu comprobante. El pedido quedará en revisión hasta confirmar el ingreso real en la cuenta indicada.
UNDER_REVIEWPago en revisiónEstamos verificando el pago reportado antes de iniciar producción.
CONFIRMEDPago confirmadoPago verificado. El equipo coordinará la asignación con un taller aliado apto.
NOTIFIEDTaller notificadoEl taller aliado fue notificado y debe aceptar o rechazar la asignación.
ACCEPTEDEn preparaciónEl taller aceptó el pedido y lo preparará para producción.
IN_PRODUCTIONEn producciónTu producto está actualmente en producción con el taller asignado.
READYListo para entregaTu pedido está listo para retiro, delivery local o envío según la modalidad seleccionada.
HANDED_TO_DELIVERYEnviadoTu pedido fue entregado al operador de despacho.
COMPLETEDEntregadoTu pedido fue completado. Gracias por confiar en Krafta.
REJECTEDPago rechazadoEl pago fue rechazado. Revisa la referencia o contacta soporte para corregirlo.
CANCELLEDCanceladoEl pedido fue cancelado.
REFUND_PENDINGReembolso pendienteHay un reembolso pendiente asociado a este pedido.
REFUNDEDReembolsadoEl reembolso fue registrado.

Step-by-step lifecycle

Orders in REPORTED status are not yet confirmed. Receiving a payment proof does not start production. The admin team must manually verify that the transfer or mobile payment appears in the platform’s bank account before the order advances to CONFIRMED and is assigned to a workshop.
1

Customer places the order — PENDING

The customer completes checkout. An Order record is created with status: PENDING and an order number in the format KRFT-XXXXXX. No production activity starts at this stage. The customer is shown their order number and the payment account details for their chosen DeliveryMethod.
2

Customer submits payment proof — REPORTED

The customer uploads their bank transfer receipt or mobile payment screenshot via the order detail page. A PaymentSubmission record is created and the order status advances to REPORTED. The admin team is notified to review.
3

Admin reviews the submission — UNDER_REVIEW → CONFIRMED or REJECTED

An admin opens the payment submission in the back office. While the review is active the status is UNDER_REVIEW. If the payment is found in the bank account the admin sets the order to CONFIRMED and a PaymentVerificationLog entry is written. If the payment cannot be matched the order moves to REJECTED and the customer receives a notification with the reason.
4

Workshop assigned — PENDING_ASSIGNMENT → NOTIFIED

Once payment is confirmed, the platform’s fulfillment logic selects an allied workshop based on coverage zone, WorkshopOffer availability, and daily capacity. A ProductionAssignment record is created with status: PENDING_ASSIGNMENT. The workshop is then notified (status advances to NOTIFIED) via their dashboard alert.
5

Workshop accepts — ACCEPTED

The workshop operator logs in to /workshop/dashboard, reviews the assignment details, and accepts the job. The AssignmentStatus moves to ACCEPTED. The agreed production cost (agreedCost) is frozen on the assignment record at this point.
6

Production begins — IN_PRODUCTION

The workshop marks the assignment as in production. The customer’s status tracker shows En producción. No further input is required from the customer during this phase.
7

Item ready — READY

Production is complete. The workshop marks the assignment READY. The fulfillment system evaluates the order’s DeliveryMethod to determine the next step: PICKUP, LOCAL_DELIVERY, or NATIONAL_SHIPPING.
8

Handed to delivery — HANDED_TO_DELIVERY

For LOCAL_DELIVERY and NATIONAL_SHIPPING orders, the package is handed off to the delivery operator and the status advances to HANDED_TO_DELIVERY. The customer sees Enviado in their order tracker.
9

Order completed — COMPLETED

Delivery is confirmed. The AssignmentStatus is set to COMPLETED. Any CreatorEarning records associated with the order items are released for payout. The customer sees Entregado.

Delivery methods

The DeliveryMethod enum determines how the finished order reaches the customer:
enum DeliveryMethod {
  PICKUP           // Customer collects in person
  LOCAL_DELIVERY   // Delivery within the same city
  NATIONAL_SHIPPING // Inter-city carrier shipment
}
Shipping costs are resolved from ShippingRate records linked to City, State, or ServiceZone. The applicable rate is calculated at checkout and frozen on the Order.shippingCost field.

Workshop payment policies

Each Workshop declares a PaymentPolicy that determines when Krafta settles the production cost with that workshop. This is independent of the customer’s payment timeline.
enum PaymentPolicy {
  DEPOSITO_TOTAL      // Full payment before production starts
  DEPOSITO_PARCIAL    // Partial upfront deposit, balance on completion
  PAGO_AL_FINALIZAR   // Full payment once production is complete
  PAGO_CONTRA_ENTREGA // Payment upon physical delivery of goods to Krafta
}
WorkshopPayable records are generated for each ProductionAssignment according to the workshop’s policy, tracking amounts due, paid amounts, references, and receipt URLs.

Cancellation and refunds

If a CONFIRMED order must be cancelled, the payment status transitions to REFUND_PENDING. Once the refund is processed and recorded the status moves to REFUNDED. A Refund record stores the amount, method, reference, and optional receipt URL. On the assignment side, the AssignmentStatus is set to CANCELLED. Neither the customer nor the workshop can cancel an order already in IN_PRODUCTION without admin intervention.

Build docs developers (and LLMs) love