Hanzo
CommerceAdmin Dashboard

Order Management

View, process, and manage orders through their complete lifecycle

The order management section shows all orders in your store, with tools for processing payments, creating fulfillments, and handling returns.

Order List

The order list displays all orders with:

  • Order number, date, and customer name
  • Payment status (pending, authorized, captured, refunded)
  • Fulfillment status (unfulfilled, partially fulfilled, fulfilled, returned)
  • Total amount and item count
  • Quick-action buttons for common operations

Filter orders using the sidebar controls:

FilterOptions
StatusPending, Processing, Completed, Cancelled
PaymentAwaiting, Authorized, Captured, Refunded
FulfillmentUnfulfilled, Partially Fulfilled, Fulfilled, Returned
Date rangePreset ranges or custom date picker
RegionFilter by shipping region

Search by order number, customer name, or email:

const orders = await sdk.admin.order.list({
  status: 'pending',
  paymentStatus: 'authorized',
  limit: 50,
  offset: 0,
  sort: '-createdAt',
})

Order Detail View

Click any order to see its full details:

  • Summary -- items, quantities, prices, discounts, taxes, and total
  • Customer -- name, email, phone, and link to customer profile
  • Shipping address -- delivery address with map preview
  • Billing address -- payment billing address
  • Payment -- provider, method, authorization details, and capture status
  • Fulfillment -- shipments, tracking numbers, and delivery status
  • Timeline -- chronological log of all order events

Processing Orders

Payment Capture

When a payment is authorized but not yet captured:

// Capture the full authorized amount
await sdk.admin.payment.capture('pay_abc123')

// Capture a partial amount
await sdk.admin.payment.capture('pay_abc123', {
  amount: 1500, // Capture $15.00 of the authorized amount
})

In the dashboard, click Capture Payment on the order detail page. You can capture the full amount or enter a partial amount.

Creating Fulfillments

Once payment is captured, create a fulfillment to ship the order:

await sdk.admin.fulfillment.create({
  orderId: 'order_xyz789',
  items: [
    { itemId: 'item_001', quantity: 2 },
    { itemId: 'item_002', quantity: 1 },
  ],
  trackingNumber: '1Z999AA10123456784',
  carrier: 'ups',
  notifyCustomer: true,
})

In the dashboard:

  1. Click Create Fulfillment on the order detail page
  2. Select which items and quantities to include
  3. Enter the tracking number and carrier
  4. Optionally send a shipping notification to the customer

Partial Fulfillments

For orders with multiple items, you can fulfill them in separate shipments. Each fulfillment tracks its own items, carrier, and tracking number. The order status updates to Partially Fulfilled until all items have been shipped.

Returns and Refunds

Creating a Return

await sdk.admin.order.createReturn({
  orderId: 'order_xyz789',
  items: [
    { itemId: 'item_001', quantity: 1, reason: 'defective' },
  ],
  note: 'Customer reported manufacturing defect',
})

In the dashboard:

  1. Navigate to the order and click Request Return
  2. Select items and quantities being returned
  3. Choose a return reason (defective, wrong item, changed mind, etc.)
  4. Add an internal note
  5. The return creates a pending return request for review

Processing Refunds

Once a return is received and inspected:

// Full refund
await sdk.admin.payment.refund('pay_abc123')

// Partial refund
await sdk.admin.payment.refund('pay_abc123', {
  amount: 2999,
  reason: 'Product defect - partial refund for one item',
})

Refund options in the dashboard:

  • Full refund -- refunds the entire order total
  • Partial refund -- specify an amount to refund
  • Refund to original method -- returns funds to the original payment method
  • Store credit -- issue store credit instead of a monetary refund

Exchanges

For exchanges, create a return for the original items and a new order for the replacement:

// Create return for original item
await sdk.admin.order.createReturn({
  orderId: 'order_xyz789',
  items: [{ itemId: 'item_001', quantity: 1, reason: 'wrong_size' }],
})

// Create new order for exchange item
await sdk.admin.order.createExchange({
  orderId: 'order_xyz789',
  returnItems: [{ itemId: 'item_001', quantity: 1 }],
  newItems: [{ variantId: 'var_large', quantity: 1 }],
})

Order Timeline

Every order has a timeline showing all events in chronological order:

EventDescription
order.createdOrder placed by customer or admin
payment.authorizedPayment authorization succeeded
payment.capturedPayment captured (funds collected)
fulfillment.createdShipment created with tracking info
fulfillment.shippedCarrier confirms pickup
fulfillment.deliveredDelivery confirmed
return.requestedCustomer requested a return
return.receivedReturned items received at warehouse
payment.refundedRefund issued to customer
order.cancelledOrder cancelled
note.addedInternal note added by team member

Add internal notes to any order for team communication:

await sdk.admin.order.addNote('order_xyz789', {
  text: 'Customer called to confirm delivery address.',
  author: 'admin_user_id',
})

All order events are recorded in the timeline and cannot be deleted. This provides a complete audit trail for dispute resolution and compliance.

How is this guide?

Last updated on

On this page