Wraps the /orders API endpoints (merchant-authenticated).

const { orders } = await hadawi.orders.list();
const { order, contributions } = await hadawi.orders.get(orders[0].id);
await hadawi.orders.fulfill(order.id);
await hadawi.orders.deliver(order.id);

Constructors

Methods

Constructors

Methods

  • Fetch a single order with its full contribution breakdown. The order.session field includes the item snapshot and funding stats.

    Parameters

    • orderId: string

    Returns Promise<OrderDetail>

  • Transition the order from funded / notifiedfulfilling. Call this when you have confirmed the order and started processing it.

    Parameters

    • orderId: string

    Returns Promise<Order>

  • Transition the order from fulfillingdelivered. Call this once the item has been shipped / handed over.

    Parameters

    • orderId: string

    Returns Promise<Order>