Skip to main content

Fulfillment Providers

Fulfillment providers handle shipping, delivery, and order fulfillment operations. They calculate shipping prices, validate fulfillment data, create shipments, and manage returns.

Available Fulfillment Providers

Manual Fulfillment Provider

The manual fulfillment provider (@medusajs/medusa/fulfillment-manual) is a simple provider for self-managed fulfillment where you handle shipping logistics yourself. Features:
  • No external shipping integrations
  • Manual fulfillment process
  • Supports both regular fulfillment and returns
  • Does not calculate shipping prices

Installation

The manual fulfillment provider is included in the core Medusa package:

Configuration

Configure the fulfillment provider in your medusa-config.ts:

Fulfillment Provider Interface

All fulfillment providers extend AbstractFulfillmentProviderService and implement the following methods:

getFulfillmentOptions(): Promise<FulfillmentOption[]>

Returns available fulfillment options.

validateFulfillmentData(optionData, data, context): Promise<any>

Validates fulfillment data before creating a fulfillment. Parameters:
  • optionData - Configuration data for the fulfillment option
  • data - Fulfillment data to validate
  • context - Additional context including cart/order data

validateOption(data): Promise<boolean>

Validates a fulfillment option configuration.

canCalculate(): Promise<boolean>

Indicates whether the provider can calculate shipping prices.

calculatePrice(optionData, data, context): Promise<CalculatedShippingOptionPrice>

Calculates shipping price (not supported by manual provider). Parameters:
  • optionData - Shipping option configuration
  • data - Calculation data (items, destination, etc.)
  • context - Additional context
The manual fulfillment provider throws an error when calculatePrice is called, as it does not support price calculation.

createFulfillment(): Promise<CreateFulfillmentResult>

Creates a fulfillment (shipment).
Returns:
  • data - Provider-specific fulfillment data
  • labels - Shipping labels (if applicable)

cancelFulfillment(): Promise<any>

Cancels an existing fulfillment.

createReturnFulfillment(): Promise<CreateFulfillmentResult>

Creates a return fulfillment.

Using the Fulfillment Module

Access fulfillment providers through the Fulfillment Module:

Fulfillment Workflows

Use fulfillment workflows from @medusajs/core-flows:

Creating Custom Fulfillment Providers

Create a custom fulfillment provider by extending AbstractFulfillmentProviderService:
packages/modules/providers/fulfillment-custom/src/services/custom-fulfillment.ts
Register your custom provider:
packages/modules/providers/fulfillment-custom/src/index.ts
Configure your custom provider:
medusa-config.ts

Reference

  • Source: packages/modules/providers/fulfillment-manual/src/services/manual-fulfillment.ts
  • Base class: packages/core/utils/src/fulfillment/abstract-fulfillment-provider.ts
  • Types: packages/core/types/src/fulfillment/provider.ts

Next Steps

Payment Providers

Configure payment processing

Notification Providers

Send shipping confirmation emails